This is essentially common named the monster shield that replace the popular l298n H-Bridge motor driver with a pair of VNH2SP30 a full bridge motor driver, this board is capable of driving a pair of high current motors. The VIN and motor out are pitched on a 5mm screw terminal but it is not included on the package for easy wiring using larger gauge wires.
The VNH2SP30E is a full bridge motor driver intended for a wide range of automotive applications. This technology incorporates a dual monolithic high side drivers and two slow side switches. The high side driver switch is designed using ST Microelectronics well known as proven proprietary VIPOWER MO Technology that allows to efficiently integrate on the same die a true Power MOSFET with intelligent signal protection circuitry.
The Low Side switches are vertical MOSFET manufactured using ST Microelectronics proprietary EHD STRIPFET process. The three concept are assembled in Multipower SO-30 package on electrically isolated lead frames. This package are designed for the harsh automotive environment offers improved thermal performance by using exposed die pads. Moreover, its fully symmetrical mechanical design allows superior manufacturability at the board level. The input signals INa and INb can directly interface to the Microcontroller to select the motor direction and the brake condition. The DIAGa/ENa or DIAGb/ENb when connected to an external PullUp resistor, enable the one leg of the bridge. It is also provide a feedback digital diagnostics signal. The CS pin allows to monitor the motor current by delivering a current proportional to its value. The PWM (Pulse with modulation) up to 20KHz to control the speed of the motor in all possible condition. In all cases a low level state on the PWM pin will turn off both the LSa and LSb switches. When PWM rises to a high level the LSa or LSb will turn on again depending on the input pin state.
When using this board in extreme high load application it may be necessary to improve thermal performance with a heat sing or a fan and solder the wires directly to the board instead of using a screw terminal in addition to the myriad other complications present in a high-current system however when using the board at current up to 6 amp the chip will barely become noticeable warm.
The VNH2SP30 / Monster Motor Features:
- Voltage max: 16V
- Maximum current rating: 30 A
- Practical Continuous Current: 14 A
- Current sensing available to Arduino analog pin
- MOSFET on-resistance: 19 mΩ (per leg)
- Maximum PWM frequency: 20 kHz
- Thermal Shutdown: Undervoltage and Overvoltage shutdown
Components Required.
- Arduino Board
- Monster Moto Shield
- Jumper Wires
- DC Motor / Gear Head Motor
To get the Monster Moto works external microcontroller, you have to wire the two boards described as follows: if you want to run as a shield just plug the Monster Moto to Uno, Mega, DUE, Leo.
Note: Be aware about short circuit, the wiring should meet the specifications.
The board can run up to 3 motors using one Arduino. If you want run 3 motor see the pin-out illustration below.
Motor 1.
Pin 2 (Motor 1 HBridge / ENA) > Pin 7 and Pin 8 (INA1 and INB1)
Pin 3 (Motor 1 HBridge / ENB) > Pin 4 and Pin 9 (INA2 and INB2)
Pin 9(Motor 1 PWM) > Pin 5 and Pin 6 (PWM1 and PWM2)
Motor 2.
Pin 4 (Motor 2 HBridge / ENA) > Pin 7 and Pin 8 (INA1 and INB1)
Pin 5 (Motor 2 HBridge / ENB) > Pin 4 and Pin 9 (INA2 and INB2)
Pin 10(Motor 2 PWM) > Pin 5 and Pin 6 (PWM1 and PWM2)
Motor 3.
Pin 6 (Motor 1 HBridge ENA) > Pin 7 and Pin 8 (INA1 and INB1)
Pin 7 (Motor 1 HBridge ENB) > Pin 4 and Pin 9(INA2 and INB2)
Pin 11(Motor 1 PWM) > Pin 5 and Pin 6 (PWM1 and PWM2)
Note: The output of:
A1 and B1 are the same polarity.
A2 and B2 are the same polarity.
Wiring Diagram
Source Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
/* MONSTER MOTOR SHIELD TEST CODE www.14core.com / */ #define MtrBrake 0 #define ClockWise 1 #define CClockWise 2 #define GndBreak 3 #define CounterSenseThresHold 100 /* VNH2SP30 pin definitions xxx[0] controls '1' outputs xxx[1] controls '2' outputs */ int inApin[2] = {7, 4}; // INA Clockwise Controll int inBpin[2] = {8, 9}; // INB Counter-clockwise Controll int pwmpin[2] = {5, 6}; // PWM (Pulse with modulation ) Input int cspin[2] = {2, 3}; // CS Current sense for analog input int enpin[2] = {0, 1}; // EN Status of switches output (Analog pin) int statpin = 13; void setup() { Serial.begin(9600); pinMode(statpin, OUTPUT); // Initialize digital pins as outputs for (int i=0; i<2; i++) { pinMode(inApin[i], OUTPUT); pinMode(inBpin[i], OUTPUT); pinMode(pwmpin[i], OUTPUT); } // Initialize braked for (int i=0; i<2; i++) { digitalWrite(inApin[i], LOW); digitalWrite(inBpin[i], LOW); } // motorGo(0, ClockWise, 255); // motorGo(1, CClockWise, 255); } void loop() { motorGo(0, ClockWise, 255); motorGo(1, CClockWise, 255); delay(500); motorGo(0, CClockWise, 255); motorGo(1, ClockWise, 255); delay(500); if ((analogRead(cspin[0]) < CounterSenseThresHold) && (analogRead(cspin[1]) < CounterSenseThresHold)) digitalWrite(statpin, HIGH); } void motorOff(int motor) { // Initialize the brake for (int i=0; i<2; i++) { digitalWrite(inApin[i], LOW); digitalWrite(inBpin[i], LOW); } analogWrite(pwmpin[motor], 0); } /* Monster Motor will set a motor going in a specific direction the motor will continue turns in that direction, at that speed until told to do otherwise. Motor: this should be either 0 or 1 will selet which of the two motors to be controlled Direct Should be between 0 and 3, with the following result 0 - Brake to VCC 1 - Clock wise 2 - Counter Clockwise 3 - Brake to GND PWM (Pulse with Moduleation) should be a value between 0and 1024, higher the number, the faster turns */ void motorGo(uint8_t motor, uint8_t direct, uint8_t pwm) { if (motor <= 1) { if (direct <=4) { // Set to INA[motor] if (direct <=1) digitalWrite(inApin[motor], HIGH); else digitalWrite(inApin[motor], LOW); // Set to INB[motor] if ((direct==0)||(direct==2)) digitalWrite(inBpin[motor], HIGH); else digitalWrite(inBpin[motor], LOW); analogWrite(pwmpin[motor], pwm); } } } |
Downloads
Download the VNH2SP30 Datasheet Here | PDF