Hardware Reference
In-Depth Information
DrivingDCMotors
DC motors, which you can find in numerous devices around your home, rotate
continuously when a DC voltage is applied across them. Such motors are com-
monly found as the driving motors in radio control (RC) cars, and as the motors
that make the discs spin in your DVD player. DC motors are great because they
come in a huge array of sizes and are generally very cheap. By adjusting the
voltage you apply to them, you can change their rotation speed. By reversing
the direction of the voltage applied to them, you can change their direction of
rotation as well. This is generally done using an H-bridge, which you learn
about later in this chapter.
Brushed DC motors , such as the one you are using for this chapter, employ
stationary magnets and a spinning coil. Electricity is transferred to the coil
using “brushes,” hence the reason they are called brushed DC motors. Unlike
brushless DC motors (such as stepper motors), brushed DC motors are cheap
and have easier speed control. However, brushed DC motors do not last as long
because the brushes can wear out over time. These motors work through an
inductive force. When current passes through the spinning coil, it generates a
magnetic field that is either attracted to or repelled by the stationary magnets
depending on the polarity. By using the brushes to swap the polarity each half-
rotation, you can generate angular momentum. The exact same configuration
can be used to create a generator if you manually turn the armature. This will
generate a fluctuating magnetic field that will, in turn, generate current. This is
how hydroelectric generators work—falling water turns the shaft, and a current
is produced. This capability to create current in the opposite direction is why
you will use a diode later in this chapter to ensure that the motor cannot send
current back into your circuit when it is forcibly turned.
HandlingHigh-CurrentInductiveLoads
DC motors generally require more current than the Arduino's built-in power
supply can provide, and they can create harmful voltage spikes due to their induc-
tive nature. To address this issue, you first learn how to effectively isolate a DC
motor from your Arduino, and then how to power it using a secondary supply.
A transistor will allow the Arduino to switch the motor on and off safely, as well
as to control the speed using the pulse-width modulation (PWM) techniques
that you learned about in Chapter 3, “Reading Analog Sensors.” Reference the
schematic shown in Figure 4-1 as you learn about the various components that
go into connecting a DC motor to an Arduino with a secondary power supply.
Make sure you understand all of these concepts before you actually start wiring.
 
Search WWH ::




Custom Search