| Electronics > Beginners |
| How to control dc motor torque using H Bridge? |
| (1/3) > >> |
| lion032:
Hi all! I am working on a force feedback yoke for my home cockpit and I am trying to understand how to control the motor torque using current sensing. I found the following of the motor driver that was used in the Microsoft Force Feedback stick. http://www.simprojects.nl/ms_siderwinder_ff2_hack.htm Being a programmer I am struggling to figure out what is going on in the attached schematic. Thanks in advance, Leon. |
| max_torque:
1) Broadly (in beginner terms) for a motor, Current = Torque and Voltage = Speed of that motor. So to control motor torque you need to control motor current. 2) The current that gets driven through a motor depends on 3 things (broadly speaking, don't write in to point out that there's lot of other more complicated things going on.....!!) a) the voltage you apply to that motor (supplied by the motor driver) 2) the Backemf of the motor (the voltage generated by the motor vs it's rotational speed and c) the impedance of that motor (a mixture of inductance(AC) and resistance(DC). 3) Generally therefore, you'll need to measure the current that is being supplied to the motor, and use some form of closed loop controller to apply a suitable drive voltage to the motor to drive the current through it that you want. Remember though that a motor acts in 4 quadrants! (Forwards motor, Forwards generate, Reverse motor, Reverse generate) so your current sensing and driving may need to both be bi-polar In the case of a force feedback steering wheel, the motor speed (and hence Backemf) is proportional to the wheel speed (how fast you are turning it) and the steering wheel torque to the current flowing through the motor. For example, to generate a fixed constant torque, you'd need your driver to apply a voltage that is maintained at a fixed delta above the backemf, and that of course therefore depends on the speed of turning! The circuit you posted shows current sensing being done at the Bridge common ground reference. This is done to make it simple (no requirement for high side current sensing), the down side being two sets of current sensing parts are required. |
| rstofer:
As I understand it, the motor is being used as a brake. It doesn't rotate in the conventional sense, rather, it makes the wheel harder to turn. More to the point, it can make the wheel harder to turn in one direction than the other. This would attempt to match the dynamics of steering a real car. Both braking functions (left and right) have their own current feedback. The inputs are going to be PWM signals, low percent of on time yields low torque, full on time is going to provide stiff braking. In software, some bit of code determines how much torque should be applied in each direction (control signal) and the motor feeds back how much torque (current) is being applied and the PWM code does its thing with the pulse width. A pair of PID loops but I don't imagine they bother with anything more than the Proportional function. Integral and Derivative would seem to be overkill. I would expect a car in a situation with left hand oversteer (the back end is stepping out to the right) to be easier to steer to the left (increasing the oversteer) than to the right. In a real car, we mitigate that difference by using power steering and lose some sense of pending oversteer or understeer. Understeer happens when the front end breaks free and moves outside the turn radius. Oversteer is fun, understeer, not so much. Basically, the car isn't responding to steering wheel input. Given that, I guess I expect the motor to be running left and right at the same time with a potential unbalance in their torque in each direction. I would use a scope and look at the PWM signals while playing a game. |
| rstofer:
It's obvious that both the right and left drive signals can't be high at the same time, same as with any H-bridge. In applying asymmetric braking, the signals could be interlaced in such a way that the motor turns left for one pulse and immediately turns right for the other pulse and each pulse could provide a different current. I'm not sure this is what is intended. I'm just guessing and the reason I am guessing that braking is asymmetric is that there are two sense resistors when one would do the job if the drive signal only went in one direction for a relatively long time. Not interlaced, so to speak. I would really like to see how the controller works. I would love to get a scope or logic analyzer on the drive signals. |
| Benta:
There's a lot wrong with that circuit. Power transistors with the same part number are depicted as both N- and P-channel, the drive circuit is ridiculous etc. But the OP states it's Microsoft, knowing their software it could be real. :-DD |
| Navigation |
| Message Index |
| Next page |