Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

VNH5019 won't run both of my motors in the same time

Hi there!

I’m trying to power two 24V truck wiper motors with the VNH5019 Dual driver.
Every time I power only one of the motors everything works as I want it to. But as soon as I connect both motors and instruct the driver to power both of them in the same time I see weird results:

a) Most of the time the driver just signals a fault on one of the motors (it’s random which motor triggers the fault).
b) Some times they do run but not in the same time and at very low speeds even though the speed I set in code is 400. So basically instead of both of them spinning one of them starts spinning really slow, then the other one starts spinning while the 1st one stops.

Is there a way to understand what a fault means? It’s kind of hard to debug the problem.

My power source is a 24V 21A, btw. And I’m using an Arduino Nano which I connected to the shield via a custom PCB board respecting the required connections.

If I can provide any more information, let me know, I’ll gladly do so.


Hello, Mickey.

That behavior makes it seem like your power supply is inadequate for your motors. Can you post some pictures and a connection diagram for your setup along with more information about your power supply and motors, like datasheets or links to where you got them? Also, can you look at what is going on with the supply voltage and the motor driver outputs on an oscilloscope and post some screen captures?

- Patrick

Hi Patrick!

Thanks for your fast reply, and pleas excuse my late one. I was gone for the weekend and just saw you’ve managed to have a look at my issue.

Here’s my custom PCB that connects my Arduino Nano to the driver:

For reference:

  • the USB port on the Nano is facing the bottom of the picture
  • The two 3 pin connections at the top right are my 2 potentiometers which I use as feedback to control motor position.

I’ve been playing around some more with my setup and I found something strange going on: when one of the motors is running my Arduino’s readings on A6 and A7 (which are the analog connections for my pots) start to show up wrong values. Measuring the voltage on the potentiometer itself the value does not change. So I guess that some kind of interference is going on.

These are datasheets I have for my 2 motors:
404.933 Wischermotor.tif (213.3 KB)
405.001 Wischermotor.tif (216.4 KB)

This is my power supply (RSP-500-24):
RSP-500-spec.pdf (1.9 MB)

My Arduino is powered from the USB port. Also the 5V input and 2 grounds next to it on the driver are connected to the Arduino’s 5V output and GND. The 3rd GND pin on the driver from the other side is not connected to anything.

Let me know if I can provide more information.

Thank you,

It is hard to tell what all of your connections are just from looking at your PCB layout. Can you post some pictures of your actual setup and a connections diagram?

Unfortunately, it looks like your motor datasheets do not include any current specification, so it is hard to tell if this is a power supply issue or if something else is going on. I suggest you try to simplify your setup as much as possible (e.g. make a simple test program that does not use the potentiometers) and look at what is going on with an oscilloscope to isolate the problem.

- Patrick

Hi Patrick!

Thanks for your attention. Here’s a drawing showing how the 2 boards are connected. I hope it’s clear enough for you to understand.

P.S: Red and black are always used for positive (+) and negative (-) terminals. The big terminals at the bottom of the board are connected to the 24V - 21A power supply I’ve mentioned in my previous post and to the 2 motors respectively.

The Arduino is powered by the USB connection from the computer.

There’s a GND pin on the VNH5019 board which is not connected (circled in red in the picture above).

Unfortunately I don’t have any other information about the motors :frowning:

I’ve also tried running the motors by themselves in a simple program that copies the demo one. Basically I was just accelerating both of them in one direction and then in the other direction in an infinite loop. With that little program everything seemed to be ok. Whenever I try to move them in the same time taking in account the potentiometers values everything goes crazy.

Thank you for the wiring diagram. Have you tried monitoring your setup with an oscilloscope like I suggested yet? If you cannot access an oscilloscope, or if that does not help, then I suggest you make a simple test program that only reads the potentiometers and reports their values, since it is sounding like that might be closer to the source of the problem. Then, iteratively start adding in code to run your motors again, starting with a program that runs the motors completely independently from the potentiometers, but continues monitoring the potentiometers too so you can see what is going on.

- Patrick

Hi Patrick! Thanks again for your reply.

I’ve tried that. To be more specific this is what I’ve done:

  • Disconnected the pots from my motors such that when the motors spin they don’t turn the pots anymore/
  • Ran both motors using the setSpeeds(x, y) method from the library. Both motors seemed to run ok.
  • When looking at the pots values read by the arduino the values are jumping around whenever one of the motors, or both for that matter, are running.

If I go back to my original code which basically needs to spin each motor individually such that their paired pot reached a specific value the motors do 2 random things:

a) they other spin in turns at very low speeds and making weird noises
b) the driver sets a fault on one of them (it seems to be random which on of them gets the fault).

Looking at my diagram above do you see anything strange about it? Am I correct to assume that the driver needs the 5V and the 2 GND connections to the Arduino? Or can I break the connections there and have the driver powered only by the 24V current, in the hopes that I can isolate my Arduino power circuit from the driver one as it now seems to be influenced by the large current that drives the motors?


P.S: As I’ve mentioned before, the voltage on the potentiometers measured with a multimeter does not change when the motors are running even though the Arduino reports the value as changing


I just discovered that if I unmount my motors from the supports that I’ve mounted them on, which are made of metal, everything works correctly. When I’ve mounted them back on it went back to everything going crazy. I’ve then discovered that the motors share an electrical connection through their casing which is bolted on the metal support. I guess that make everything go crazy…

I’ll try to figure out how I can isolate them now and get back at you in case that fixes the problem.