03-20-2013 07:16 AM
I am trying to build a PID control that will be controlling two motors for a small balancing robot. I am using an accelerometer and am unsure how to build a vi that will be used with a the arduino mega.
03-20-2013 11:32 PM
03-25-2013 10:10 AM
i have a small amount of experience with labview, and i am using the arduino mega for the last 3 months. I have done some vis that control the movement of a servomotor but i am lost when it comes to pid control and accelerometer.
03-25-2013 08:26 PM
What did you make your servomotors do? (I suspect it would have at least involved Proportional control, which is the first part of PID control).
I recommend you start by learning basic PID theory (http://www.ni.com/white-paper/3782/en , or Google some lecture notes). Apply that knowledge on a single motor, to control its position via PID. I assume you're using a servomotor, so use the Encoder signal as your PID feedback.
Then, learn how to interpret your accelerometers (Google it).
Then, combine those to use both your accelerometer and encoder as PID feedback, to control one motor's position.
Then, combine two motors to build your balancing robot.
These will probably take you a few weeks. Good luck!