This is a ball-balancing robot. It will try to balance the ball in the middle with Object Detection & Image Recognition through Arduino & Python. We have used distance sensors and image recognition techniques to keep it balanced.
Why did you decide to make it?I wanted to balance a ping-pong ball in the middle of a plane, to do so I made this robot.
How does it work?The concept of the ball-balancing robot is simple. The ball must remain in the middle of the box. If it rolls towards the left, the box is raised from the left. So, that it rolls down the other end. This process repeats until the ball gets in the middle.
Image RecognitionThen we used the image recognition technique, OpenCV. In python programing language. It has a threshold set for the orange color. It encircles any orange-colored object seen from the camera.
There is an imaginary line separating the video on the left and right.
So, whenever it detects the object on the left side, it displays the word "left" in blue color. And whenever it detects the object on the right side, it displays the word "right" in red color.
After detection, Python serially sends the data to the microcontroller. And microcontroller moves the motor based on the input. For this period, the ultrasonic sensor is disconnected. And All the balancing work is done by camera and servo.
Comments