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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Boniq wrote:

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. http://coecsl.ece.uiuc.edu/ge423/spring04/group9/objectives_sensors.htm http://coecsl.ece.uiuc.edu/ge423/spring04/group9/technical_control.htm
- Daniel
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Boniq wrote:

Torque motors are good, but generally expensive. They aren't needed for most systems like this. Just don't stop on steep slopes. :)
- Daniel
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Boniq wrote:

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: http://www.tlb.org/scooter.html
Good Luck, Bob
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Boniq wrote:

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:
<http://www.hbrobotics.org/
-Wayne
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
thank you very much for that Wayne. Ill 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)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Boniq wrote:

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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.
http://www.geology.smu.edu/~dpa-www/robo/nbot/index.html
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.