Introduction: Tutorial for Monster Motor Shield VNH2SP30

Picture of Tutorial for Monster Motor Shield VNH2SP30

Description

VNH2SP30 is a full bridge motor driver intended for a wide range of automotive applications. The device incorporates a dual monolithic high side driver and two low side switches. The high side driver switch is designed using the STMicroelectronic’s well known and proven proprietary VIPower M0 technology which permits efficient integration on the same die of a true Power MOSFET with an intelligent signal/protection circuitary. The VIN and motor out are pitched for 5mm screw terminals, making it easy to connect larger gauge wires. INA and INB control the direction of each motor, and the PWM pins turns the motors on or off. For the VNH2SP30, the current sense (CS) pins will output approximately 0.13 volts per amp of output current.

Features

  • Voltage Range : 5.5V - 16V
  • Maximum Current rating : 30A
  • Practical Continuous Current: 14 A
  • Current sense output proportional to motor current
  • MOSFET on-resistance: 19 mΩ (per leg)
  • Maximum PWM frequency: 20 kHz
  • Thermal Shutdown
  • Undervoltage and Overvoltage shutdown

Step 1: Material Preparation

Picture of Material Preparation

Before getting started, make sure to prepare all of below:

1. Arduino Uno Board and USB
2. Monster Motor Shield VNH2SP30
3. 2 DC Motor 12V
4. Jumper Wires / Crocodile Clip
5. Adapter / Battery (5.5V - 16V)

Step 2: Pinout Details

Picture of Pinout Details

Hardware Pinout

A0 : Enable pin for motor 1

A1 : Enable pin for motor 2

A2 : Current sensor for motor 1

A3 : Current sensor for motor 2

D7 : Clockwise (CW) for motor 1

D8 : Counterclockwise (CCW) for motor 1

D4 : Clockwise (CW) for motor 2

D9 : Counterclockwise (CCW) for motor 2

D5 : PWM for motor 1

D6 : PWM for motor 2

Truthtable to make motor to rotate :

Motor 0

STOP : D7 0, D8 0 & D7 1, D7 1
CCW : D7 0, D8 1
CW : D7 1, D8 0

Motor 1

STOP : D4 0, D9 0 & D4 1, D9 1
CCW : D4 0, D9 1
CW : D4 1, D9 0

Step 3: Attach Your Monster Motor Shield VNH2SP30 to Arduino Uno Board

Picture of Attach Your Monster Motor Shield VNH2SP30 to Arduino Uno Board

Step 4: Connect DC Motor

Picture of Connect DC Motor

Connect Motor 1 to VNH2SP30 Monster Motor Shield VNH2SP30 A1:B1 and Motor 2 to VNH2SP30 Monster Motor Shield A2:B2

Step 5: Power Supply

Picture of Power Supply

Connect your Monster Motor Shield VNH2SP30 board to a power supply in range between 5.5V to 16V. We use a 9V power adapter.

Step 6: Assembled Circuit

Picture of Assembled Circuit

You will have the whole circuit like this after following previous step. Now, connect your Arduino Uno Board to your computer using the USB.

Step 7: Sample Source Code

Picture of Sample Source Code

This is a sample source code for the circuit, you may download, open and and upload it into your Arduino Uno Board. Make sure to go Tools and select the correct board and port.

Step 8: Serial Monitor

Picture of Serial Monitor

After you have finished compiling the sample source code into your arduino uno board, go to Tools > Serial Monitor and you will get a serial monitor as shown in the picture above.

Step 9: Result

Picture of Result

This is the result of this tutorial :

i. when user enter number '2', dc motor start to rotate forward and serial monitor will print forward.
ii. when user enter '3', dc motor start to reverse and serial monitor will print reverse.
iii. when user enter '1', dc motor stop from rotating and serial monitor will print stop.
iv. when user enter '+', dc motor's speed increase by 10 and serial monitor will print the motor's speed. However, dc motor maximum speed is 255, thus, when user enter '++' more it will still print 255 and never more than 255 (as shown in the pic).
v. when user enter '-', dc motor's speed decrease by 10 and serial monitor will print the motor's speed. However, dc motor minimum speed is 0, thus, when user enter '--' more it will still print 0 and never less than 0 (as shown in the pic).

Step 10: Video

This video demonstration show how the DC motor function according to the sample source code.

Comments

vinderoed12 (author)2017-10-22

do you know how too connect the motor shield too an rc reciever

kind regards Tom Jensen

АлексейН17 (author)2017-10-01

I connect Li-Po battery with 8V voltage value.

When D7 is HIGH and D8 is LOW there is 8V on A1-B1 pins. But when D7 is LOW and D8 is HIGH there is only 3V. And chip become very hot in a moment.

Whats wrong?

NevzatT (author)2017-06-05

Hi. Thanks for this great tutorial. I am wondering that is there any significant voltage drop between input and output voltage of the driver module for one motor. I want to use this driver for high current applications. Thanks for your reply for now. Good job :D

RichardA213 (author)NevzatT2017-09-28

NevzatT, the solid state part that implements the switch on this board has a very low series resistance (0.019 ohms when in the "on" state). This should allow you to predict how much voltage drop you would get from your high current application. Just multiply the current you are using by 0.019 and you will have the voltage drop. Be aware that the 30 amp rating of this switch is actually for peak, short duration, current flow like a starting current transient in a motor. If you were to run 30 amps continuously, you would cause about 17 watts of power to be dissipated in the switch, which would cause it to overheat and die given the amount of heat sinking is built into this little board. I would guess that you can get away with 5 to 10 amps steady state, but things would be getting quite warm at 10 amps (~2 watts dissipation in switch). I plan on using this for 4 amps steady state on some Peltier Coolers, so I should be OK.

barbarerik (author)2017-08-30

Thanks a lot!

I am trying to connect my VNH2SP30 single motor board to WeMos D1.

But getting errors:

ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset

load 0x4010f000, len 1384, room 16

tail 8

chksum 0x2d

csum 0x2d

v180000ca

~ld

Went through many forums but no success.

Any idea?

eslipak (author)2017-03-13

Great tutorial. I do needed to interface this shield to an ESP8266 and this tutorial helped me to identify the pinout. Thanks!

About This Instructable

22,541views

50favorites

License:

More by mybotic:How to use ESP32 to Control LED With Blynk Via WiFiTutorial for ESP8266 ESPDuino NodeMcu SPI Module Using Arduino UnoTutorial for L298 2Amp Motor Driver Shield for Arduino
Add instructable to: