This motor power is fed to a 5V regulator that is mounted to the bottom of the shield. This 5V feeds the
white servo connector. This isolates any servo electrical noise from getting back into the main 5V that
powers the logic. For this 5V regulator to function, the VMS voltage must be at least 6.3V.
Note that if you have the OPT jumper in place and USB connected, but there is no power on the VMS motor
connector, it will try to use the USB power to power the DC motors. This should be avoided.
If you have the OPT jumper in place and power coming on the DC Jack on the Arduino, it will work but
the DC motor noise will be coupled into the 5V logic power supply and may cause eradicate behavior and
so it is not really recommended. In general, if you are using the motors, you should plan to bring the motor
power in on the VMS power connector for the most stable operation.
Driving DC Motors
The L298P contains two full H-Bridge drive channels that provide full speed and direction control. The 2
DC motor drive channels can operate at voltages from 4.8 – 24V and at currents of up to 2.0A (2.5A peak)
per channel.
You can also have 2 motors share a motor drive channel if the combined current stays within the 2A and
you do not mind the motors turning the same direction and speed. This is typically the case when you have
a 4-wheel drive robotic vehicle and the 2 wheels on each side operate at the same speed and direction.
The L298P motor driver uses Arduino pins D10, D11, D12 and D13 for motor control. Pins 10 & 11 are
PWM pins and connect to the chip EN pins to provide speed control by modulating the enable input. D10
controls speed of motor A and D11 controls speed of motor B.
Pins 12 & 13 are connected to the IN inputs to provide direction control. Pin 12 controls direction of motor
A and Pin 13 controls direction of motor B. Usually there are 2 pins used to determine the direction of
rotation for each motor, but this shield has an inverter that provides an inverted version of the signal to the
two pins. This reduces the number of pins used on the Arduino, but it does remove the ability to do dynamic
braking which usually isn’t an issue for most projects. Reducing the speed control pins to a PWM value of
zero will get things stopped.
DC Motor Connections
The motor connections are via a 4-screw terminal block with 2 terminals for each motor that are labeled
MOTORA and MOTORB. The +/- pins for each motor are not labeled, so it is somewhat arbitrary how
your wire them and relative to what you consider forward vs reverse motor operation. Basically, if the
motor goes in the opposite direction than you expect, simply reverse the wiring for that motor.