Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm planning to implement a Self Balancing Robot which is usually implemented using a gyroscope sensor which gives feedback to the micro-controller to adjust the position with wheels. I'm looking into an option of controlling using Computer Vision (OpenCV). Firstly, looking at a similar project PID algorithm implementation using computer vision i'm convinced that it is not quiet easy to implement without the right tools and good concept.

I have an Arduino Uno board which i will be using for controlling the DC motors. I still have to decide on the Embedded System board which i should be using (Mostly ARM Processor based, like Raspberry Pi, Beagleboard etc), the selection of processor depends upon the speed of the application. A webcam mostly, but i'm looking into other cameras as well. CMUcam

Control algorithm used will be PID implemented in the Processor. The bound box is what i intend to use to observe the change in motion and then use error correction via a Ethernet port or wireless depending upon the speed needed.

Please do comment about the drawbacks and flaws of the design.

OS of the processor : Linux distro (Ubuntu or Debian), initially i thought about RTOS(Real Time OS), but i guess it is too complex.

Need your valuable feedback.

share|improve this question
The answer that PetPaulsen gave is fairly spot on, but I would like to emphasize that the PID controller is the least of your problems. The main problem is going to be the vision system. Even if you get it running well, you will have major difficulties getting it to run fast enough to keep balance. Even humans have extreme difficulty balancing on vision alone! When someone is very sick with both inner ears infected they will often stagger like they are drunk simply because they can only use their vision and sense of touch to balance them (and can't use the "gyros" in their ears). – user3624 Aug 11 '12 at 4:32

I have worked with self balancing robots in my bachelor and master thesis. Ad hoc I see these problems, that will very likely get in your way.

  1. Self balancing robots are instable by definition. You have to collect data from your sensors (the camera) fast enough, to react to changes in the attitude of the robot. So the question is: can you process the information from the camera fast enough to stabilize the system (dead-time)?

  2. Gyros will give you the angular acceleration along the axis. But with your camera you have something that correspond to the angle. To clarify this, you can not get the angular velocity or even angular acceleration with just one picture. You have to do some processing based on multiple pictures. That means you need more time => greater dead-time. Also this processing will probably introduce noise, which will complicate the controller design.

share|improve this answer
Great Answers.Thank you PetPaulsen and David Kessner . I think i will have to look at some other alternative projects. I'm interested in Computer Vision because i want to do my Master in Optics and Photonics and i thought this project would be a great boost to my CV. Good humorous blog post here! [Stack Exchange is not a forum: the role of “niceness” on a Q&A site] (blog.stackoverflow.com/2012/08/…) – Kishore Kumar Aug 11 '12 at 14:20
Normal CV is a very poor way to do this, but of course your point is to find a CV project... very basic (even analogue) image processing could do this nicely, simply comparing pixel colours from a low-res camera (or just a few light-sensors) and aiming to maintain a given state in a PID loop. However, that ignores most of the "interesting" stuff to do with CV and is probably not the project you want. – John U Sep 13 '13 at 14:13

protected by Community Jul 7 '15 at 7:35

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.