Hardware Reference
In-Depth Information
The basics of DC motor
Before you get started with connecting everything and making it all move, let's spend some
time understanding some of the basics of DC motor control. Whether you chose a two or
four wheeled mobile platform or a tracked platform, the basic movement control is the
same. The unit moves by engaging the motors. If the desired direction is straight, the mo-
tors are run at the same speed. If you want to turn the unit, the motors are run at different
speeds. The unit can actually turn in a circle if you run one motor forward and one back-
ward.
DC motors are fairly straightforward devices. The speed and direction of the motor is con-
trolled by the magnitude and polarity of the voltage applied to its terminals. The higher the
voltage, the faster the motor will turn. If you reverse the polarity of the voltage, you can re-
verse the direction the motor is turning.
However, the magnitude and polarity of the voltage is not the only factor that is important
when you think about controlling your motors. The power that your motor can apply to
move your platform is also determined by the voltage and the current supplied at its termin-
als.
There are actually GPIO pins on Arduino that you could use to create the control voltage
and drive your motors directly. The challenge with this method is that Arduino cannot nor-
mally source enough current and voltage, and your motors will not be able to generate
enough power to move a mobile platform.
There are several solutions to this problem. The first is to use a simple transistor circuit and
an external voltage source. You'll use this solution in the first example of this chapter.
Another solution is to use an H-bridge, a chip that Arduino can control but which is con-
nected to a power source and can provide enough current. The second example in this
chapter will show you how to use this sort of chip. The third solution to the problem is to
use a shield that contains all the circuitry and can connect to an external power source input
so that your Arduino can provide both voltage and current and your platform can move re-
liably. The last example in this chapter will use a motor controller shield designed for Ar-
duino to make DC motor control simple.
Search WWH ::




Custom Search