CV-Based Ball-Balancing

About The Project

This project was focused on understanding the control systems applications. It basically uses Computer Vision for locating the ball on the platform and then using the feedback mechanism, i.e, PID Controller in our case, automatically generates the tilt of the surface for balancing the ball on the platform. The servo motors are initially at an angle of 90 degrees and they turn by the angles that is given as an output of the PID Controller. All this is integrated on the Arduino UNO Microcontroller. All the communication between Arduino and the Python Code for OpenCV and controller is handled by Pyserial library.
In many ways, the project exceeded our expectations by being able to tilt the platform fast enough to balance the ball on it. Later on, we found out that the 4 servo motors were a very high load for Arduino.If this project were to be redone, there would be a few things not done the same way as with most first-time projects; but overall, the project was considered to be a success.

Interested people can have a look at the complete documentation of the project here.


Meet The Team

Mentors

team-member

Kolla Ananta Raj

Computer Vision
team-member

Niranjana Madathil

Autonomous Robotics

Mentees

Aryan Satpathy

Computer Vision

He was responsible for detection of ball on the platform using Open CV. Also helped in communicating the PID output to Arduino microcontroller using Pyfirmata.

Ayush Deep

PID and Hardware

He was involved in checking the PID parts and the compatibility of the PID Controller with the CV-based detection which would give the required data to the servo motors.

Kumar Pranjal Tripathi

Control system

He was involved in devising the control law for the controller which takes the OpenCV data and generates the required servo motor response

Rishan Joshua Dsilva

Computer Vision

He was involved in obtaining the homographic image of the detected platform and optimizing the code. This data was sent to the PID Controller to get the required rotations of the servo motor to balance the ball.

Tanushri Tawari

Hardware Assembly

She was involved in the actual assembly of the complete hardware at her home and then connecting the Computer Vision and PID Controller parts through the Arduino alongwith a lot of testing and experimentation.