Hi I am testing DualVNH5019MotorShield with Arduino 101 board.
I connected two motors (Item number 2826) to the motor driver and run the demo program from
The demo program just sets the speed sequentially.
Two motors run but the motor with channel 2 (M2A, M2B) has higher acceleration. I can see and feel the difference.
Would you please advise me what causes this difference and how to adjust?
One more thing that I observed. Channel 2 doe not work with speed 200 although it works with speed 300 and 400.
The Arduino library for the Dual VNH5019 Motor Driver Shield uses pins 9 and 10 for PWM1 and PWM2, respectively. According to the Arduino 101’s product page on the Arduino website, pin 10 does not output PWM signals; only pins 3, 5, 6, and 9 provide PWM output, so you will need to remap PWM2 to a different pin. Unfortunately, we have no helpful resources to point you towards, since we have not tried using the Dual VNH5019 Motor Driver Shield with the Arduino 101 and have not heard of anyone who has been successful remapping the PWM2 pin for an Arduino 101.
We plan to test the Dual VNH5019 Motor Driver Shield and its Arduino library with the Arduino 101 soon to see if we can find an simple solution to get the motor driver shield working with the Arduino 101. We will let you know the end result.
I did a quick test on this. I took the driver board out of the 101 board, then connected using jumper wires based on the driver user’s guide on page 16 connection diagram (Using as a General-Purpose Motor Driver).
Also, changed PWM pin number for M2 channel from 10 to 6 and existing _EN1DIAG1 from 6 to 12 in the library files.
This change made it work.
Thanks for the prompt feedback. That helped a lot!
However…, the two motors run differently. That problem is not resolved yet.
The two motors are identical (same item number 2826 , 100:1 gear ratio).
I set the low speed 50 for both motors to observe the speed difference between each motor. I did not connect encoders.
I did following experiments and measured time for 20 rotations to calculate the rpm.
When motor-A is connected to Channel 1, and motor-B is connected to Channel 2
-motor-A runs much faster than motor-B (motor-A: 33.3rpm, motorB: 9.4rpm)
When motor-A is connected to Channel 2, and motor-B is connected to Channel 1
-motor-B runs about 5% faster than motor-A (motor-A: 21.8rpm, motor-B: 25rpm)
I tested several times swapping the motors to channels, the results are about the same although the speed difference percentage is slightly different each time.
Would you please advice me what is wrong?
From your description and values, it looks like the problem follows the motors, and is not an issue with the driver. In general, no two motors are exactly the same even if they are the same model from the same manufacturer and run under the same conditions. The differences are especially noticeable at low speeds or duty cycles where it might be enough to get one motor comfortably turning but barely enough to get another to move. If running the motors at the same speed is important, I recommend using encoders.