VNH5019 Motor Driver Carrier + Stepper Motor

Hello!

Sorry for my english in advance :slight_smile:

My motor shield isn’t running at all.

I have a VNH5019 Motor Driver Carrier, Arduino Uno and this Stepper-Motor. I soldered the terminal blocks onto the Motor Driver and wired as shown in the instructions. I’m using a power source, that can deliver 12 VDC and a current up to 5000mA. As far as I could figure it out, the soldering connects to the motor driver, because the resistance was unlike to infinity. Here are two pictures of my wiring and soldering:
Picture 1, Picture 2

Because my motor has an Encoder there are a few other cable I did not use so far. If I connect the motor directly to the power supply it runs at full speed. I connected INA, INB and PWM from the motor shield to the Arduino.

I’m using a very simple code, which is an Example from Arduino:

void setup() {
 pinMode(2, OUTPUT);
 pinMode(3, OUTPUT);
 pinMode(4, OUTPUT);
}

void loop() {
 motorForward(200);                        //(25%=64; 50%=127; 100%=255)
 delay(5000);

 motorStop();
 delay(2000);

 motorBackward(200);
 delay(5000);
}

void motorForward(int PWM_val)  {
 analogWrite(4, PWM_val);
 digitalWrite(2, LOW);
 digitalWrite(3, HIGH);
}

void motorBackward(int PWM_val)  {
 analogWrite(4, PWM_val);
 digitalWrite(2, HIGH);
 digitalWrite(3, LOW);
}

void motorStop()  {
 analogWrite(4, 0);
 digitalWrite(2, LOW);
 digitalWrite(3, LOW);
}

Now my questions:
There is an led on the motor shield. Is it supposed to light up as soon as I plug the power source in?
Is there anything I do wrong with the wiring?

Thanks a lot for your help :slight_smile:

Hello.

I am sorry you are having problems with your VNH5019 carrier; thank you for posting your code and pictures. It looks like you are using one of our 37D gearmotors, which are brushed DC motors (not stepper motors). Your soldering looks like it is making good connections with the board for the most part. However, I noticed you are not powering the logic side of the driver through the VDD pin and it does not appear to have a common ground with your Arduino. Could you try connecting the 5V pin from your Arduino to the VNH5019 carrier’s VDD pin and the GND pin from the Arduino to the driver’s GND pin so that your connections match the ones shown in the “Using the Motor Driver” section of the VNH5019 carrier’s product page?

Brandon

Hey!
Thanks for your quick response.

Of course it is a DC-Motor, my mistake!
I tried powering the arduino via the motor driver by wiring as told in the instructions, but unfortunately the arduino got no power at all. On top of that I changed the terminal blocks for the male pins, but that didn’t fix it either. I measured the resistance between the pin I soldered to VIN and VDD, which was a finite resistance. And same for the resistance between GND (next to VIN) and GND on the other side of the motor driver. So I assume from that, that the soldering works fine.

Could the motor driver be broken already? And could I give it back, because I bought it last week!?

Daniel

It sounds like you might have misunderstood what I suggested. Your Arduino should still be powered separately (with a USB cable like shown in your pictures is fine). But the driver needs separate power connections for the logic and motor power. Since you are using a 5V Arduino board, you should connect the VDD pin on the driver to the 5V out pin on your Arduino, and the GND pin on the driver to the GND pin on the Arduino. Please note that the VIN pin on Arduino boards is typically not powered when the board is powered through USB. Also, the VDD pin on the VNH5019 driver should be powered from the same voltage as your logic signals. Since the recommended voltage to power the Arduino through the VIN pin is 7-12V, connecting the Arduino’s VIN pin to the driver’s VDD pin could damage something.

Could you try making that change and seeing if it helps? If you continue to have problems after making the change, can you post some updated pictures of your setup that show all of your connections?

Brandon

My connections look like shown on this picture, but unfortunately it still doesn’t work. Here is an overview of my wiring (Arduino - Motor Driver):

Black: Pin 2 - INA
Blue: Pin 3 - INB
Green: Pin 4 - PWM
Grey: GND - GND
Purple: 5V - VDD

Red and black cables on the other side connect the external power supply and the motor to the motor driver.

Daniel

Thank you for the extra picture. It looks like you are trying to get a PWM output from pin 4 on the Arduino Uno. Please note that analogWrite() only works with pins 3, 5, 6, 9, 10, and 11 on the Arduino Uno. Could you try changing the PWM pin to one of those and see if that helps?

Brandon

Thank you really much for your help Brandon!
I made the changes you mentioned, but still no reaction at all.
I contaced the customers support, who tested the motor driver for any damages
and in fact it was broken. I got a new one and now it works fine.
Unfortunately they didn’t tell we what exactly was broken.

Thanks
Daniel

I am glad you were able to get a working replacement. Thank you for letting us know.

Brandon