Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
You begin by powering up with the variable resistor set to 0 ohms. Then you dial it to about where 112 ohms would be. The motor is a little sluggish, but it seems to work and it is definitely slower. Then, you turn the circuit off. When you next turn the circuit back on (still set to 112 ohms), the motor doesn't turn at all!
The problem is that a motor is a varying electrical load. A motor needs a lot more power at startup that it does when running. The 112 ohm resistance is far too large for the motor to start turning at power up. Motors also draw a lot more power when a robot goes uphill or pushes something. There is another reason why a resistor is not a good choice for controlling the power delivered to a large load. As the power requirements increase, it will quickly exceed the power rating on a resistor or potentiometer. The electronic component will get very hot and then will likely fail permanently. Furthermore, a resistor wastes excess power as heat. In a battery powered robot, we'd prefer to not waste energy. Pulse-width modulation to the rescue!
By replacing the potentiometer with a transistor, the speed of the motor can be controlled by the duty cycle of the square wave. There are two differences between the driver portion of this circuit and the LED circuit:
The transistor, Q3, should be more powerful than a 2N3904. A 2N2222 is okay for smaller motors. A diode, D3, has been added to reroute inductive motor spikes. A 1N914 or 1N4001 is okay for smaller motors, but I prefer a 1N5817.
(For more information on driving motors, see Bipolar H-Bridge. And, yes, you can feed the pulses into R3 and R1 of the H-bridge to control speed.)
In the above schematic, notice that the motor can receive 12V even though the 74AC14 logic chip is only powered by 5V. This is possible because the logic chip output feeds into the resistor of the transistor, not directly to the motor. The resistor, transistor, and diode all help isolate the logic voltages from the motor voltages.
This circuitry is superior to using a fixed or variable resistor for heavy or varying electrical loads, such as motors and LED displays. A microcontroller-based PWM solution uses fewer components and has the flexibility of varying the duty cycle and frequency on-the-fly through software. This can be an advantage in a mini sumo battle, where searching might be performed at a slower motor speed, but the duty cycle needs to be increased to 100% "on" for pushing an opponent. However, you can add chips to this circuit if you want to be able to select from various speeds. For example, using a demultiplexer or other path-selection chip, you could wire up the path between the 74AC14 output and the potentiometer to pass into different potentiometers dialed to different settings for various occasions.