User Guide
www.kitronik.co.uk
Motor/Stepper Motor
Driver Board
Motor/Stepper Driver Board -
5108
(Dimensions in mm Tolerance +/- 0.1)
Board Overview
This circuit uses the DRV8833 and allows up to 2 DC motors or 1 stepper motor to be controlled by a
microprocessor. This is useful as a microcontroller cannot, on its own, output enough power to drive most
motors. Using this board you can control a motor with the digital outputs from your microcontroller while
powering it separately from a suitable power source.
The motor driver operates from a 2.7-10.8V supply, connected to the Vcc Pin and can provide up to 1.5A
per output or 3A if the motor is connected to both outputs in parallel. Exceeding these max current values
will destroy the chip.
IF THIS BOARD SHARES A POWER SUPPLY WITH THE MICROPROCESSOR, ENSURE IT
IS SUITABLE RATED. I.E. DON’T RUN OFF THE ARDUINO 5V OUT LINE.
Each output pin has a corresponding input pin. The table below shows the input/output truth table. The
nSLEEP
pin will put the device into a low power state when brought low to help save power.
If you are
tying this high make sure you do it through a 20k to 75k resistor to limit the current into the pin,
if the
voltage to this pin spikes above 6.5V then too much current will flow into it and damage the structure of
the IC. The resistor limits the current to the pin, preventing this problem from occurring.
xIN1
0
0
1
1
xIN2
0
1
0
1
xOUT1
Z
L
H
L
xOUT2
Z
H
L
L
FUNCTION
(DC MOTOR)
Coast
Reverse
Forward
Brake
Page 1 of 6
User Guide
www.kitronik.co.uk
Motor/Stepper Motor
Driver Board
Functional Block Diagram
Please note: The decoupling capacitor shown is included on the breakout board.
Electrical Characteristics
Min
V
cc
Device Power
supply voltage
range
H-bridge output
current (continuous)
H-bridge output
current (peak)
Externally applied
PWM frequency
Logic level input
voltage
2.7
Max
10.8
1.5
2.0
0
-0.3
250
5.75
Unit
V
A
A
kHz
V
I
out
I
out
f
pwm
V
in
Pinout
Pin Name
Vcc
GND
nSLEEP
Description
Vcc (0-7V)
Ground
Bringing this low enters the
device into sleep mode.
If you are
tying this high make sure you do
it through a 20k to 75k resistor to
limit the current into the pin.
Logic input
Motor output
xinx
xoutx
Page 2 of 6
User Guide
www.kitronik.co.uk
Motor/Stepper Motor
Driver Board
Using the board with an Arduino
Arduino Connections for Single DC Motor
Motor Driver Board
Vcc
GND
nSLEEP
Ain1
Ain2
Arduino
NO CONNECTION – Vcc must
not be connected to a
microprocessor! Use an
alternative power supply!
GND + GND of your motor
power supply
Pin 3 (through a 22k resistor)
Pin 4
Pin 5
1) Connect the outputs 3, 4 and 5 of your Arduino to the pins, nSLEEP, Ain1 and Ain2 respectively.
2) Connect Vcc to your motor power supply
(NOT THE MICROCONTROLLER, THIS WILL DRAW TOO MUCH
CURRENT AND POTENTIALLY DESTROY IT).
The power supply must be 2.7-10.8V DC.
3) Connect GND to the ground terminal on your power source and also to the GND pin on your Arduino.
4) Wire Aout1 and Aout2 to your DC motor terminals.
5) Upload the sample sketch on the next page. The motor should turn on for 5 seconds then reverse for 5
seconds and repeat.
Page 3 of 6
User Guide
www.kitronik.co.uk
Motor/Stepper Motor
Driver Board
Arduino Sketch – Single DC Motor
/*
Motor Test
Sets the motor to forward for 5 seconds then to reverse for 5 seconds, repeats
forever.
*/
//
int
int
int
name the pins you will use:
nSleep = 3;
ain1 = 4;
ain2 = 5;
// the setup routine runs once when you press reset:
void
setup()
{
// set the pins you are using to output mode
pinMode(nSleep,
OUTPUT);
pinMode(ain1,
OUTPUT);
pinMode(ain2,
OUTPUT);
// Set sleep high to wake the chip
digitalWrite(nSleep,HIGH);
}
// the loop routine runs over and over again forever:
void
loop()
{
digitalWrite(ain1,
HIGH);
// Set the motor to forward
digitalWrite(ain2,
LOW);
delay(5000);
digitalWrite(ain1,
LOW);
digitalWrite(ain2,
HIGH);
delay(5000);
}
// wait for 5 seconds
// Set the motor to reverse
// wait for 5 seconds
Page 4 of 6
User Guide
www.kitronik.co.uk
Motor/Stepper Motor
Driver Board
Arduino Connections for Stepper Motor
Motor Driver Board
Vcc
GND
nSLEEP
Ain1
Ain2
Bin1
Bin2
Arduino
NO CONNECTION – Vcc must
not be connected to a
microprocessor! Use an
alternative power supply!
GND + GND of your motor
power supply
Pin 3 (through a 22k resistor)
Pin 8
Pin 9
Pin 10
Pin 11
1) Connect the outputs 3, 8, 9, 10 and 11 of your Arduino to the pins; nSLEEP, AIN1, AIN2,BIN1 and BIN2
respectively.
2) Connect Vcc to your motor power supply
(NOT THE MICROCONTROLLER, THIS WILL DRAW TOO MUCH
CURRENT AND POTENTIALLY DESTROY IT).
The power supply must be 2.7-10.8V DC.
3) Connect GND to the ground terminal on your power source and also to the GND pin on your Arduino.
4) Wire AOUT1 and AOUT2 to across one coil of the stepper and BOUT1 and BOUT2 to the other coil of
your stepper motor.
5) Upload the sample sketch on the next page. The stepper motor should move through 100 steps.
Remember to change the value of the definition ‘STEPS’ to the number of steps your stepper motor
has.
Page 5 of 6