Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to get four motors to run together #17

Open
craig-w-a opened this issue Jun 27, 2018 · 3 comments
Open

trying to get four motors to run together #17

craig-w-a opened this issue Jun 27, 2018 · 3 comments

Comments

@craig-w-a
Copy link

I have 4 12VDC motors connected to two dual VNH5019 motor drivers. but one M1A and M1B isnt powering the motor. If its not plugged in then the Led indicators lightly glow and nothing glows at all if I plug it into the motor. I tried the motors with other connection and it works fine. Could it be a connection issue?

@photodude
Copy link
Contributor

I would suggest using my modified library if you need two dual VNH5019 motor drivers. https://github.com/photodude/DualVNH5019MotorShieldMod3
it's been specifically set up for running two Pololu Dual VNH5019 Motor Driver Shields on an Arduino Mega. (I do try to keep up with the changes from this parent library, as mine is just a modified version)

@evian5019
Copy link

my modified library if you need tw

Hi photodude, I have two lineer actuator that have digital encoder. They need to work simulataneously. I use arduino uno, dual vnh5019 driver. What should I do that they can work simulataneously ?

Best Regards

@photodude
Copy link
Contributor

photodude commented Aug 24, 2019

@evian5019 There are a lot of limitations and library conflicts with using the Uno for this. I highly recommend using a Mega for driving 4 motors and using things like encoders. Otherwise, you will be fighting library conflicts. Also note that you will only have true PWM on timer 1 pins, so the second driver will not be using PWM for the motors unless you modify the library or use the Timer libraries for modifying the timer frequency. (you can read more about the library conflicts with various timers in the note in my modified library)

You can use my modified library for using one function/library call for both drivers, or just use proper OOP and instantiate two copies of this library. Again note: you will only have true PWM on timer 1 pins, so the second driver will not be using PWM for the motors unless you modify the library or use the Timer libraries for modifying the timer frequency.

// Initialize library for each dual VNH5019 motor driver
DualVNH5019MotorShield MotorsAB(INA1, INB1, PWM1, EN1DIAG1, CS1, INA2, INB2, PWM2, EN2DIAG2, CS2);
DualVNH5019MotorShield MotorsCD(INA3, INB3, PWM3, EN1DIAG3, CS3, INA4, INB4, PWM4, EN2DIAG4, CS4);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants