Pololu Dual VNH5019 not giving correct current

When I try to measure the current with the shieldsit’s always 0 or 34 mA, how can this be as the chip gets hot?

This is the code in my arduino:

DualVNH5019MotorShield motors;

void setup()
{
			motors.init();
			motors.setM1Speed(65);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			delay(100);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			delay(100);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			delay(100);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			delay(100);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			delay(100);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			delay(100);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			delay(100);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			delay(100);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			delay(100);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			delay(100);
			Serial.print("M1 current: ");
			Serial.println(motors.getM1CurrentMilliamps());
			motors.setM1Speed(0);
			Serial.println("DONE");
}

and this is the output after a few runs:

Uploading to I/O board
Port open
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 102
DONE
Port closed
Uploading to I/O board
Port open
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 34
M1 current: 34
M1 current: 34
DONE
Port closed
Uploading to I/O board
Port open
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 34
M1 current: 34
M1 current: 34
DONE

What can be wrong? I triple checked the wiring in the female pins.

Hello.

How hot was the driver getting (e.g. was it warm to the touch or hot enough to burn)? Could you tell me more about your setup? Do you have a motor or load connected to your dual VNH5019 motor driver? If you do, how much current do you expect it to draw? Could you post pictures of your setup that show all connections?

- Grant

it did get warm to touch, every second hotter when running continously

About the wiring: it’s just every pin number on the shield connected to the same number on arduin (aka shield mode), nothing else.

I am currently in build of a new setup which has cooling on the chips, one GPU desktop grade heatsink combined with a CPU laptop grade heatsink, both coolermaster, and 3 fans, each 0.5A so they go pretty fast. I hope that will eliminate any hotness. I used high quality thermal foil to connect the 4 chips to the heatsinks. Additionaly I provided my own 15A fuses so should anything go wrong - it won’t be in the arduino or the shield :slight_smile: I will post pictures soon! :slight_smile:

The motors I use are Asima 165W 7.4V motors, so 165/7.4=23 A / motor, hence my own fuses.

Also, is there a way to get the current input voltage? or do I have to make my voltage divider (30 Mega Ohm) where I connect the + and - to 3x 10 Mega Ohm resistors in series and measure the voltage on one resistor with the arduino ? Is that safe?

Edit:

Alright, here is an album of the process of creating a complete motor controller which can be remotely controlled by a laptop :stuck_out_tongue:

imgur.com/a/Pol77

It is still not clear to me from your response how hot the driver is getting and if it was getting hot before or after you added your cooling system. Hot to a person isn’t necessarily hot for electronics, and this driver can get too hot to touch during normal operation and still run fine, so if your board is only getting warm to the touch (without the heatsinking) there might not actually be much current flowing through it.

There seems to be a lot of things in your setup. Are you only having problems with the current sense on the board? Do the other components in your system all work as expected? Are you able to control the motors through the VNH5019 shield?

I am not sure what you meant by this. Where are you trying to read the input voltage?

- Grant

as for the heat: it’s warm to the touch, eventually it gets so hot you can’t touch it.

as for the voltage question: I want to know how much voltage the battery connected to the shield has, so I can know when to stop and charge.

The shield works totally okay, motors do their job, faults reported are 0, forward backward in any combination works

Also, the current sensing seems to have fixed itself? It does now give a value

Most electronics is rated up to 85 C, which is almost hot enough to boil water (way past “scalding hot”)
Some electronics designed for power control is rated up to 175C at the operating junction, which is pizza oven hot, way past boiling.
That being said, cooler chips are happier chips :slight_smile:

To read the battery voltage, you can build a resistive divider between VCC and GND and hook that into an analog input on the Arduino.
If your battery is “12V” then perhaps a 10 kOhm resistor to the ADC in, and a 4.7 kOhm resistor from ADC to GND, will let you read the voltage. You’ll see the maximum value (1023) at approximately 15V, depending on the tolerance of the resistors. Measure at a few known input voltages to calibrate your particular setup.

I am glad everything is working for you now.

By the way, your project looks interesting. What does it do?

- Grant