Hi , I am new to this group i have developed a mobile robotics platform with wheels and tank track and a differential drive , i had a electrical control system at first now i want to adapt it to a 8051 microcontroller ( P89V51RD2FN ) , what do i need to know about PWM to get accurate movements and control the robot , i don't have any shaft encoders currently i am planning to use proximity sensor input to make a behaviour based robot ...
PWM is a technique that allows smooth changes in motor output, using simple on/off switches. This is achieved by switching faster than the mechanical system can respond, such that the mechanics smooth out the switching to average the switch state.
Sensor feedback (such as from shaft encoders) is required for accurate movement; but for simple tasks it is often sufficient to make a few measurements such as "75% PWM is about X[m/s]" and base your control on that.
The point of PWM is not that you can use on/off switches. The most common "switches" used in motor drives are transistors and are quite capable of operating in linear mode to achieve speed control. However, doing that is inefficient because it's essentially the same as using a big variable resistor.
Further, low frequency PWM is not a great idea. Driving motors with pulsed current makes them whine annoyingly and may cause damage. It is also less efficient because the pulsed nature of the current results in greater resistive losses in the windings. Ideally you operate PWM drives at a sufficiently high frequency that the current is smoothed by inductance. In this mode, the motor driver is essentially a variable dc-dc down-coverter. The "inductance" here can actually be the windings of the motor but in that case you cannot use noise suppression capacitors.
You'll never be able to get precise speed control without feedback, but in the case of treads, even precise speed control doesn't translate to precise dead reckoning.
Also, you can use one bit per motor rather than enough bits to get the desired resolution.
I think you misread his post as suggesting that you sit there toggling a physical switch back and forth with your index finger. He pretty clearly meant something that could be switched "fast enough" to work well, though he focussed on the mechanical system's response speed rather than induction.
Generally PWM rates are in the audio range, from hundreds of hertz to hundreds of kilohertz. The trend is towards higher frequencies, outside the human hearing range. See the Atmel ATA6831, which is a dual PWM driver for automotive applications designed to run at up to 25KHz.
This is for brush-type DC motors. There's also polyphase PWM, where several phases are driven separately and in sync with motor rotation. Brushless variable-speed motors are driven that way. This requires more elaborate drive electronics but is more efficient.
These things are actually quite difficult to design well. They have to deal with brush noise, inductive kickback, short circuit and overcurrent protection, and thermal protection. The ones designed for RC motor speed control are usually quite good at current capacity, efficiency, and protection, but dumb - no feedback or computer interface. The ones designed for hobbyist robotics tend to be smarter, but bigger and not as good on protection circuitry. The ones for industrial motor control are all over the place; some are very robust, and some are underdesigned, and they're all much bigger and more expensive than the R/C units of comparable current carrying capacity.
It's still harder than it should be to get small, fully-protected motor controllers with encoder feedback at low cost.
No. This is not a matter of "fast enough". Inertial and inductive averaging of pwm driver output are different processes, use different switching rules, are described by different math, and he pretty clearly explicitly named the former. A small dc motor driven with a
50% duty cycle at 1khz will behave quite differently from the same motor driven at 20+khz, and for most robotics applications you want the latter behavior. The low frequency pwm response won't even be linear.
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.