One channel works, two doesn't. VNH3SP30 Motor Driver Arduino

Hi folks,

I have succesfully connected a Dual VNH3SP30 Motor Driver Carrier MD03A (pololu.com/catalog/product/707/specs) to a Arduino Mega which is driven by the Arduino Toolkit for LabView. Everything works fine for 1 Motor. I can control speed and direction. Im using 2 small gear pumps which I’d like to control via the VNH3SP30 Motor Driver Carrier. However, as soon as I switch on the second motor the pumps start behaving in an alternating fasion. The volumetric flow (in my case oil) starts going up and down and is not continous as it was when only 1 motor/pump was running. However, the flow seems to alternate in a very harmonic way around a fixed value.

I tried interfacing with 2 Arduinos at the same time (a MEga for Pump 1 and a Nano for Pump 2) which worked, but showed the same behavior. Any suggestions why the pumps behave like that when both are switched on? Should I use two seperate motor drivers? Is there any additional capacitor which I might solder to the board? Any suggestions on how I can get the pumps to work with a continous flow would be very much appreciated.

These are the pumps I’m using: ZP30025S
Here is a link to a Datasheet: modelltechnik.at/Downloads/MTHPumps.pdf

Best regards,
Jan

Hello.

I split your post into a separate topic. Please do not post at the bottom of other threads unless you are talking about the same situation/problem.

I suspect your power supply cannot supply enough current to drive both pumps.

The following could help us troubleshoot your problem better:

  • a wiring schematic of your setup
  • a description of your power supply
  • a picture of your setup
  • the simplest complete Arduino program that causes your problem

- Ryan

Hi Ryan,

thanks for your help.
I’m at home now and cannot provide you with a picture of my setup, but I will do so in the morning.
The power supply cannot be the problem as I´m using a 16V 10A Lab Supply. The Motors are talking not more than 6A when running while the voltage adjustment is set to 6V.
Additionally I cannot provide any Arduino Code, as I’m using LabView. The Arduino runs a LabView Firmware which enables the Arduino to be controlled through Labview. In that sense, if any program could be similar, it would be this one:

    int InA1 = 22;
    int InB1 = 23;
    int InA2 = 24;
    int InB2 = 25;
    int PWM1 = 8;  //PWM1 connects to pin 8
    int PWM1_val = 127; //(25% = 64; 50% = 127; 75% = 191; 100% = 255)
    int PWM2 = 11;  //PWM1 connects to pin 11
    int PWM2_val = 127; //(25% = 64; 50% = 127; 75% = 191; 100% = 255)

    void setup() {
    Serial.begin(9600);
    pinMode(InA1, OUTPUT);
    pinMode(InB1, OUTPUT);
    pinMode(PWM1, OUTPUT);
    pinMode(InA2, OUTPUT);
    pinMode(InB2, OUTPUT);
    pinMode(PWM2, OUTPUT);
    }

    void loop() {
    digitalWrite(InA1, HIGH);
    digitalWrite(InB1, LOW);
    analogWrite(PWM1, PWM1_val);
    digitalWrite(InA2, HIGH);
    digitalWrite(InB2, LOW);
    analogWrite(PWM2, PWM2_val);
    }

The LabView Code does the same thing except that it is implemented graphicaly. I’ll post a picture of the program tomorow.

Reading the descriptive text on the Pololu Page of the controler I wondered if I should populate that 3rd capacitor which was not included in the shipment.

“… Two 10mm radial capacitors may be mounted between the motor driver ICs, and an axial capacitor may be mounted between the ICs and power connections. …”

Should this one have the same size (Farad / And how much would that be? Its not on the schematics) as the 10mm round caps? Where is its designated position on the PCB? Could that be any good?

Best regards,
Jan

Hi there,

The statement in the topics headline might not be correct. Both motors are working, just when I switch on the second one I get volumetric ups and downs - meaning an unsteady flow. This effect is gone immiadetly as I switch of one of the motors. It is noteworthy that this is not dependent on the channel I’m switching off. I’m experiencing this problem on either chennel I’use (switch off).

Best regards,
Jan

How long are your power supply leads? The motors you linked to are rated to draw 5A max. If both motors are at the max, that would be 10A, so your power supply is possibly not sufficient (Especially since you haven’t seen them both running at the same time.). Do you have an oscilloscope that you can use to look at what the power line is doing when you drive the motors? This would also help determine if you need more capacitance.

The program you provided is useless because it isn’t what you are running. Can you try making an Arduino program that you load directly onto the Arduino to rule out a problem with your LabView program and communication? Or, better yet, all your control parts by hard-wiring the pins of the VNH3SP30 to something that will drive the pumps and see if it does.

Please post a picture of your setup when you can, and a wiring schematic of your setup could still be helpful.

- Ryan

Hi Ryan,

wow youre answering lightning fast. Some things I will do when I’m back at the office:

  • I’ve an DSO Quad - I’ll try to see what the power line (you mean the main power support for both motors right?) is doing. Have to check out first if the DSO Quad can handle the job.

  • Make a Picture of my setup.

  • Flash the Code I posted above directly to the Arduino and see if the problem is still persistent. I should have thought of this earlier.

The power supply leads are 20cm maximum.

I could’nt find a description for our LabSupply but I dont think that this is the problem. It would be, if the LCD current reading of that power supply would be somewhere near the 10 Amps, which it is not. If both motors are running it shows something around 5-6 A. The 5A for one Motor -as stated in the datasheet - is under full load and pressure. Until now the pumps are working against ambient pressure.

Best regards,
Jan

Hi Ryan,

here is a picture of the LabView program I used. I added it for future reference.

Best regards,
Jan

Hi Ryan,

here is a video I just made to show the effect. I’m sorry but I did not have any better video equipment at my disposal. Anyhow, I hope this video does somehow illustrate the effect.

Best regards,
Jan

Hi Ryan,

here are some pictures from the oscilloscope showing the main power supply for both motors.

Whern no motor is turned on:

When Motor 1 is turned on:

When Motor 1 and Motor 2 are turned on:

Best regards,
Jan

Hi Ryan,

I just tested the code above directly on the Arduino Mega (I used the Arduino IDE v.1.0) . Both Motors did work but motor 1 was very slow. Thus, pump 1 did not work propoerly. Any suggestions why that is? However, I did not get any alternating fluid flow. Motor 2 was just turning more slowly than Motor 1.
I then tried both motors separetly with the above given code, which worked flawlessly.

Best regards,
Jan

It looks like your motor supply is at about 6V and dropping more than 1V - below the lower limit of the operating voltage range (5.5V). It should work better if you up the supply voltage. If you want to supply a lower voltage to the pumps, you can use PWM.

- Ryan

Hi Ryan,

do you think that your suggestion above is the same reason why the Arduino code did not work properly? As described I did test the code which I posted above directly on the Arduino Mega and this was’nt succesful either - though the problem encountered was different.

Thanks,
Jan

I am not sure why the problem is different when you use the Arduino code by itself, but it should be easy for you to turn up the voltage on your lab power supply and see if that helps.

- Ryan

Hi Ryan,

well I just turned up the Power on the lab Supply (~8V) and there was no change in the alternating pumping behavior when using the LabView Program. Afterwards I used the same setting and flashed the Arduino directly with the code given above and it worked. The Pumps where delivering a continous flow just as I wanted it.
Guess I have to dive into the depths of the LabView Interface for Arduino (LIFA). Thank you Ryan for your help.
I’ll post my problems in the LIFA Forum.

Best regards,
Jan

I’m glad you got it working one way. Please let us know what turns out to be the trouble with LabView.

- Ryan

Hi everybody,

I found the solution to my initial problem. The LIFA Toolkit for Arduino in its current form does only support PWM outputs on the pins 3,5 and 6. This means that even if the Arduino Mega supports up to 13 Pins, these are not fully exploitable. I change my LabView code accordingly and the alternating fluid flow is gone.
Please see the thread at https://decibel.ni.com/content/message/42395#42395 for some more reference and pictures.
I additionally attached my working LabView VI which can be used to controll 2 Motors (Pumps) using the VNH3SP30 Motor Driver from Pololu and the LabView Toolkit for Arduino (I used Version 2.2.0.79). Thanks for the help provided.

Best regards,
Jan
Pumpensteuerung v4.vi (524 KB)

Thanks for the update; I am glad you got it working!

- Ryan

Its good practice to include a delay in the loop, normally “wait until millisecond multiple” (icon looks like a metronome).
I suspect your labview loop was running too fast and overflowing a serial buffer, causing corruption in the data transmitted.

Also consider using Firmata to do a quick validation that the arduino / hardware is behaving as desired