dc motor control for a balancing platform (segway)

I have just bought an arduino microcontroller and as one of my first projekts I would like to make a small self balancing platform like segway (but tiny one). There is a dc motorcontroller add on to arduino that lets me control two motors (a motor shield). It seems to me that the only thing you can control with any of the shelf controllers is motor speed. But if the platfor is a bit out of balance a would like to stter the motor torque to get it back in balance. Not the speed. The speed would naturally follow. Does that make sense? But how do you control the torque output of (any) dc (brushless?) motor?? Or am I way of here...

Boniq

Reply to
Boniq
Loading thread data ...

I think you're on the right track. If you can calculate the angular offset from vertical (e.g. with an ADXL accelerometer), then you can calculate and apply a correcting torque.

These links show the sensors and control strategy used by another balancing bot.

formatting link

- Daniel

Reply to
D Herring

Torque is controled by the drivers. if the motor has its own drivers, you have little control or a fixed amount of available drive. A DC brush motors torque is controlled by the loop gain of the drivers assuming you have plenty of drive. The loop is the driver, motor, and position feedback.

greg

Reply to
GregS

Thank you very much for valuable feedback :-) Its great to be able to aske people.

There seems to be something called a "torque motor" also that might be useful. Lets say if one stand still in a slope on a segway the motor must be able to produce constant torque even in it doesnt turn.

Boniq

Reply to
Boniq

Torque motors are good, but generally expensive. They aren't needed for most systems like this. Just don't stop on steep slopes. :)

- Daniel

Reply to
D Herring

You get that for free with an ordinary DC motor (brushed or brushless) if you use closed loop motion control.

Here is a web page from a person that built his own version of a Segway and later a powered unicycle:

formatting link
Good Luck, Bob

Reply to
BobH

There have been about a dozen balancers built in the HBRC club and all of them used pretty standard DC motors.

Most of the effort on balancers focuses in on the sensor fusion, not motors. The simplest balancer I saw used a mechanical tilt sensor that drove a potentiometer. From the tilt alone, it was possible to put together the control laws that would keep the robot balanced. The more sophisticated ones use angular accelerometers and Kalman filters to keep the robot balanced. Angular accelerometers are extremely noisy, so the signal has to be heavily processed to get a useful balancer.

I am conflicted about directing you to another location to ask your questions, but a good place to post questions about balancers is the Home Brew Robotics Club mailing list. Numerous people on the list have done balancers and should be able to help you out with you balancer questions. The HBRC web site URL is:

-Wayne

Reply to
waynegramlich

thank you very much for that Wayne. I=B4ll check out your link. I see that a speed controlled dc motor is the way to go. It just seemed a bit counter intuitive to use the speed as the controlling variable and not the torque. A torque proportional to the angular error (or integral/derivative of error) makes sence.

Christian (boniq)

Reply to
Boniq

Christian:

When people have explained their balancing algorithm to me, it sounds a bit more complicated than the description you give.

We usually only get to specify the H-bridge polarity and pulse width for our motor controllers. How that maps to speed and torque gets pretty complicated. Usually people wrap the whole system in some sort of appropriately modified PID motor control loop and and tweak the control laws until it works for their robot.

Getting a balancer to work is not easy, but it is both rewarding and fun when you do so.

-Wayne

Reply to
waynegramlich

If you'd like a site that really goes heavy on description, and also has links to a number of similar implementations, check out dpa's n- bot.

formatting link

Reply to
dan

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.