Pololu VNH5019 User Manual

Pololu Dual VNH5019 Motor Driver Shield User’s Guide © 2001–2014 Pololu Corporation
Pololu Dual VNH5019 Motor Driver
Shield User’s Guide
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.a. Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.b. Included Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3. Getting Started with an Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.a. What You Will Need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.b. Assembly for Use as an Arduino Shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.c. Shield Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.d. Programming Your Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4. Using as a General-Purpose Motor Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.a. Assembly for Use as a General-Purpose Motor Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.b. Board Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5. Schematic Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6. Customizing the Shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.a. Remapping the Arduino Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.b. Accessing ENA/DIAGA and ENB/DIAGB Pins Separately . . . . . . . . . . . . . . . . . . . . . . . . 23
7. Using the Driver in Single-Channel Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8. Differences between board revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
http://www.pololu.com/docs/0J49/all Page 1 of 28
Pololu Dual VNH5019 Motor Driver Shield User’s Guide © 2001–2014 Pololu Corporation

1. Overview

This user’s guide focuses on the latest version (ash02b)
[http://www.pololu.com/product/2507] of the Pololu dual
VNH5019 motor driver shield, but most of the information also applies to the earlier ash02a
[http://www.pololu.com/product/2502] version. See Section 8
for details about the differences between board revisions.
The Pololu dual VNH5019 motor driver shield for Arduino
[http://www.pololu.com/product/2507] and its corresponding Arduino
library make it easy to control two bidirectional, high-power DC motors with an Arduino [http://www.pololu.com/product/2191] or Arduino clone. The board features a pair of robust VNH5019 motor drivers from ST, which operate from 5.5 to 24 V and can deliver a continuous 12 A (30 A peak) per channel, and incorporates most of the components of the typical application diagram on page 14 of the VNH5019 datasheet [http://www.pololu.com/file/download/VNH5019A-E.pdf?file_id=0J504] (629k pdf), including pull-up and protection resistors and FETs for reverse battery protection. It ships fully populated with its SMD components, including the two VNH5019 ICs, as shown in the picture to the right; stackable Arduino headers and terminal blocks for connecting motors and motor power are included but are not soldered in.
Pololu dual VNH5019 motor driver shield
for Arduino.
This versatile motor driver is intended for a wide range of users, from beginners who just want a plug-and-play motor control solution for their Arduinos (and are okay with a little soldering) to experts who want to directly interface with ST’s great motor driver ICs. The Arduino pin mappings can all be customized if the defaults are not convenient, and the VNH5019 control lines are broken out along the left side of the board, providing a convenient interface point for other microcontroller boards. This versatility, along with an option to power the Arduino directly from the shield, sets this board apart from similar competing motor shields.

1.a. Features

driver shield, assembled and
connected to an Arduino Uno R3.
1. Overview Page 2 of 28
Pololu Dual VNH5019 Motor Driver Shield User’s Guide © 2001–2014 Pololu Corporation
• Wide operating voltage range: 5.5 – 24 V
1
• High output current: up to 12 A continuous (30 maximum) per motor
• Motor outputs can be combined to deliver up to 24 A continuous (60 A maximum) to a single motor (see Section 7)
• Inputs compatible with both 5V and 3.3V systems (logic high threshold is 2.1 V)
• PWM operation up to 20 kHz, which is ultrasonic and allows for quieter motor operation
• Current sense voltage output proportional to motor current (approx. 140 mV/A)
driver shield for Arduino, bottom
view with board dimensions.
• Motor indicator LEDs show what the outputs are doing even when no motor is connected
• Can be used with an Arduino or Arduino clone (through shield headers) or other microcontroller boards (through 0.1″ header along the left side)
• When used as a shield, the motor power supply can optionally be used to power the Arduino base as well
• Arduino pin mappings can be customized if the default mappings are not convenient
Arduino library [http://github.com/pololu/dual-vnh5019-motor-shield] makes it easy to get started using this board as a motor driver shield
• Reverse-voltage protection
• Robust drivers: ◦ Can survive input voltages up to 41 V
◦ Undervoltage and overvoltage shutdown
◦ High-side and low-side thermal shutdown
◦ Short-to-ground and short-to-Vcc protection
1
While the overvoltage protection typically activates at 27 V, it can trigger at voltages as low as 24 V, so we do not recommend using this motor driver with 24 V batteries, which significantly exceed 24 V when fully charged. If the shield is configured to power an Arduino or Arduino clone, the supply voltage must conform to that Arduino’s input voltage requirements.
1. Overview Page 3 of 28
Pololu Dual VNH5019 Motor Driver Shield User’s Guide © 2001–2014 Pololu Corporation

1.b. Included Hardware

This motor driver board ships with all of the surface­mount parts populated. However, soldering is required for assembly of the included through-hole parts. The following through-hole parts are included:
• one extended/stackable 1×10 female header (for Arduino shields)
• two extended/stackable 1×8 female headers (for Arduino shields)
• two extended/stackable 1×6 female headers (for Arduino shields)
• three 2-pin, 5mm terminal blocks
[http://www.pololu.com/product/2440] (for shield power and
motor outputs)
• 40-pin 0.1″ straight breakaway male header [http://www.pololu.com/product/965] (may ship in several pieces, such as two 20-pin strips)
A 0.1″ shorting block [http://www.pololu.com/product/968] (for optionally supplying shield power to Arduino) is also included.
Pololu dual VNH5019 motor driver shield for
Arduino with included hardware.
You can use the terminal blocks to make your motor and motor power connections, or you can break off an 12×1 section of the 0.1″ header strip and solder it into the smaller through-holes that border the six large motor and motor power pads. Note, however, that the terminal blocks are only rated for 16 A, and each header pin pair is only rated for a combined 6 A, so for higher-power applications, thick wires should be soldered directly to the board.
When not using this board as an Arduino shield, you can solder the 0.1″ headers to the logic connections along the left side of the board to enable use with custom cables [http://www.pololu.com/category/70/crimp-connector-housings] or
solderless breadboards [http://www.pololu.com/category/28/solderless-breadboards], or you can solder wires directly to the
board for more compact installations. Note that motor and motor power connections should not be made through a breadboard.
The motor driver includes three 47 uF electrolytic power capacitors, and there is room to add additional capacitors (e.g. to compensate for long power wires or increase stability of the power supply). Additional power capacitors are usually not necessary, and no additional capacitors are included with this motor driver.
The two mounting holes are intended for use with #4 screws [http://www.pololu.com/category/101/nuts-and-screws] (not included). They have a horizontal separation of 0.30″ and a vertical separation of 1.70″.
An Arduino [http://www.pololu.com/product/2191] is not included.
1. Overview Page 4 of 28
Pololu Dual VNH5019 Motor Driver Shield User’s Guide © 2001–2014 Pololu Corporation

2. Contacting Pololu

We would be delighted to hear from you about any of your projects and about your experience with the dual VNH5019 motor driver shield for Arduino
[http://www.pololu.com/product/2502]. If you need technical support or have any
feedback you would like to share, you can contact us
[http://www.pololu.com/contact] directly or post on our forum [http://forum.pololu.com/viewforum.php?f=15]. Tell us what we did well, what we
could improve, what you would like to see in the future, or anything else you would like to say!
driver shield, assembled and
connected to an Arduino Uno R3.
2. Contacting Pololu Page 5 of 28
Pololu Dual VNH5019 Motor Driver Shield User’s Guide © 2001–2014 Pololu Corporation

3. Getting Started with an Arduino

As with virtually all other Arduino shields, connections between the Arduino and the motor driver are made via extended stackable headers that must be soldered to the through-holes along the top and bottom edges of the shield. This section explains how to use this motor driver as an Arduino shield to quickly and easily add control of up to two DC motors to your Arduino project. For information on how to use this board as a general-purpose motor driver controlled by something other than an Arduino, see Section 4.

3.a. What You Will Need

The following tools and components are required for getting started using this motor driver as an Arduino shield:
An Arduino. Using this product as an Arduino shield (rather than a general-purpose motor driver board) requires an Arduino [http://www.pololu.com/product/2191]. This shield should work with all Arduinos and Arduino clones that behave like a standard Arduino. You will also need a USB cable for connecting your Arduino to a computer. We have specifically tested this shield (using our Arduino library) with:
Arduino Uno [http://www.pololu.com/product/2191] (both original and R3)
Arduino Leonardo [http://www.pololu.com/product/2192]
Arduino Due [http://www.pololu.com/product/2193]*
Arduino Mega 2560 [http://www.pololu.com/product/1699]
◦ Arduino Duemilanove (both with ATmega168 and ATmega328P)
◦ chipKIT Max32 Arduino-Compatible Prototyping Platform (PIC32-based Arduino clone)
A soldering iron and solder. The through-hole parts included with the shield must be soldered in before you can plug the shield into an Arduino or before you can connect power and motors. An inexpensive soldering iron
[http://www.pololu.com/product/156] will work, but you might consider investing in a higher-performance, adjustable
soldering iron if you will be doing a lot of work with electronics.
A power supply. You will need a power supply, such as a battery pack, capable of delivering the current your motors will draw. See the Power Connections and Considerations portion of Section 3.c for more information on selecting an appropriate power supply.
One or two brushed DC motors. This shield is a dual motor driver, so it can independently control two bidirectional brushed DC motors. See the Motor Connections and Considerations portion of Section 3.c for more information on selecting appropriate motors.
* Note for Due users: The voltage on the current sense pins will exceed the Due’s 3.3 V limit when the current draw exceeds ~23 A. The Due should generally be able to handle this since the MCU’s integrated protection diodes will clamp the input voltage to a safe value (and since the CS circuit has a 10 kΩ resistor in series with the output, only a few hundred microamps at most will flow through that diode). However, if you really want to be safe, you can use a 3.3 V zener diode to clamp the current sense output voltage to a maximum of ~3.3 V. If you want to get the full range of current feedback while using the Due, you can disconnect the shield’s current sense pins from the Due and then reconnect them through a voltage divider; see Section 6.a for more information.
3. Getting Started with an Arduino Page 6 of 28
Pololu Dual VNH5019 Motor Driver Shield User’s Guide © 2001–2014 Pololu Corporation

3.b. Assembly for Use as an Arduino Shield

1. Stackable Arduino headers: Before you can use this board as an Arduino shield, you need to solder four of the five included Arduino header strips to the set of holes highlighted in red in the picture above. The headers should be oriented so that the female sockets rest on the top side of the shield and face up while the male pins protrude down through the board, and the solder connections should be made on the underside of the shield. The newest Arduino boards, including the Uno R3 and the Leonardo, use one 10×1 header, two 8×1 headers, and one 6×1 header, as shown in the left picture below; older Arduino boards use two 8×1 headers and two 6×1 headers, as shown in the right picture below (the two pairs of pins highlighted in darker red should not be populated if you are using this board with an older Arduino that does not support these additional pins). Please make sure you solder the appropriate headers for your particular Arduino!
2. Motor and power connections: The six large holes/twelve small holes on the right side of the board, highlighted in yellow in the above diagram, are the motor outputs and power inputs. You can optionally solder the included 5mm-pitch terminal blocks to the six large holes to enable temporary motor and motor power connections, or you can break off a 12×1 section of the included 0.1″ header strip and solder it into the smaller through-holes that border the six large motor and motor power pads. Note, however, that the terminal blocks are only rated for 16 A, and each header pin pair is only rated for a combined 6 A, so for higher-current applications,
3. Getting Started with an Arduino Page 7 of 28
Pololu Dual VNH5019 Motor Driver Shield User’s Guide © 2001–2014 Pololu Corporation
thick wires with high-current connectors [http://www.pololu.com/product/925] should be soldered directly to the board. The smaller holes are intended only for 0.1″ header pins, not for the terminal blocks!
3. Arduino power jumper: If you want the option of powering your Arduino and motor shield from the same source, you can solder a 2×1 piece of the included 0.1″ male header strip to the pins highlighted in orange in the above picture. Shorting across these pins with the included shorting block will connect the shield power to the Arduino’s VIN pin. You should not use this to power the shield from the Arduino as this connection is not designed to handle high currents, and you must never supply power to the Arduino’s VIN pin or power jack while this shorting block is in place, because it will create a short between the shield power supply and the Arduino power supply and will likely permanently damage something.
4. Additional power capacitor: The motor driver shield includes three pre-installed 47 uF electrolytic power capacitors, and there is space—highlighted in blue in the above picture—to add an additional capacitor (e.g. to compensate for long power wires or increase stability of the power supply). An additional power capacitor is usually not necessary, and no additional capacitors are included with this shield.
The other through-holes on the shield are used for more advanced things like customizing the Arduino pin mappings and are not necessary for getting started using this shield with an Arduino. They are discussed in more detail later in this guide.

3.c. Shield Connections

Dual VNH5019 motor driver shield with an Arduino (shield and Arduino powered separately).
All of the necessary logic connections between the Arduino and the motor driver shield are made automatically when the shield is plugged into the Arduino. However, the shield’s power connections must be made directly to the shield itself via its large VIN and GND pads. The picture above shows the typical connections involved in using this board as an Arduino shield.
3. Getting Started with an Arduino Page 8 of 28
Pololu Dual VNH5019 Motor Driver Shield User’s Guide © 2001–2014 Pololu Corporation

Default Arduino Pin Mappings

The following table shows how the shield connects your Arduino’s pins to the motor drivers’ pins:
Arduino Pin VNH5019 Driver Pin Basic Function
Digital 2 M1INA Motor 1 direction input A
Digital 4 M1INB Motor 1 direction input B
Digital 6 M1EN/DIAG Motor 1 enable input/fault output
Digital 7 M2INA Motor 2 direction input A
Digital 8 M2INB Motor 2 direction input B
Digital 9 M1PWM Motor 1 speed input
Digital 10 M2PWM Motor 2 speed input
Digital 12 M2EN/DIAG Motor 2 enable input/fault output
Analog 0 M1CS Motor 1 current sense output
Analog 1 M2CS Motor 2 current sense output
See the Pinout portion of Section 4.b for detailed descriptions of the VNH5019 driver pins and Section
5 for a schematic diagram of the shield. See Section 6.a for instructions on how to customize your
board’s Arduino pin mappings if the above defaults are not convenient.
3. Getting Started with an Arduino Page 9 of 28
Loading...
+ 19 hidden pages