Hardware Reference
In-Depth Information
transistor to make a simple electrically controlled switch. Every BJT has three
pins (see FigureĀ 4-2): the emitter (E), the collector (C), and the base (B).
C
B
E
3C
2B
1E
Figure 4-2: An NPN BJT
Current flows in through the collector and out of the emitter. By modulating
the base pin, you can control whether current is permitted to flow. When a suf-
ficiently high voltage is applied to the base, current is allowed to flow through
the transistor, and the motor spins as a result. The 5V generated by the Arduino
I/O pins more than suffices to turn on the transistor. By taking advantage of
PWM, you can control the speed of the motor by rapidly turning the transistor
on and off. Because the motor can maintain momentum, the duty of the cycle
of the PWM signal determines the motor's speed. The transistor is essentially
connecting and disconnecting one terminal of the motor from the ground and
determining when a complete circuit can be made with the battery.
Using Protection Diodes
It is important to consider issues caused by DC motors acting like inductors.
( Inductors are electrical devices that store energy in their magnetic fields and
resist changes in current.) As the DC motor spins, energy is built up and stored
in the inductance of the motor coils. If power is instantaneously removed from
the motor, the energy is dissipated in the form of an inverted voltage spike,
which could prove harmful to the power supply. That's where protection diodes
come in. By putting the diode across the motor, you ensure that the current
generated by the motor flows through the diode and that the reverse voltage
cannot exceed the forward voltage of the diode (because diodes allow current
to flow in one direction only). This will also absorb any current generated by
you forcibly turning the motor.
Search WWH ::




Custom Search