Hello, I am beginner I am working on project, tying to connect VNH5019 Motor Driver Shield for Arduino (Item# 2507) to two Metal Gearmotor 25Dx65L mm MP 12V with 48 CPR Encoder(Item# 4863).
How to i need to make the connections between Motor and VNH5019
|Red|motor power (connects to one motor terminal) - M1A
|Black|motor power (connects to the other motor terminal) - M1B
|Green|encoder GND| - GND ? is this right?
|Blue|encoder Vcc (3.5 V to 20 V) - ? What should go here
|Yellow|encoder A output - ? is this M1INA? is this right?
|White|encoder B output - ? is this M1INB? is this right?
What should go to M1EN/DIAG and M1PWM ?
and what should the Blue (encoder Vcc ) connect to?
As you described, the red and black wires from the motor should go to the M1A and M1B motor output pins on the Dual VNH5019 Motor Driver Shield. The rest of the wires from the gearmotor are for the encoders, so the red and black wires are the only connections you need to drive the motor.
Please note that the VNH5019 shield does not have any special support for reading or processing encoders, but if you are mounting the Dual VNH5019 Motor Driver Shield on top of the Arduino (i.e. as a shield), you can use the pass-through headers to make the connections to the Arduino. First, you can power the encoders by connecting the green wire to one of the shield’s GND pins and the blue wire to the shield’s VDD pin. The yellow and white wires are the encoder signals; what pins you use to read these signals is up to you and should match your code, but you should not connect them to any of the pins already used by the shield (including the M1INA and M1INB pins). So, unless you know how to account for any potential conflicts it could cause, it would be best to avoid any of the pins called out in this diagram:
Thank you Brandon. I used pins 3 and 5 for the encoder outputs. I connected the blue wire to the 5v pin and the green to the GND beside the 5v pin. I used 8 AA batteries to power the Motor. M1A and M1B are connected to the red and black wired, I used USB power for the Audrino Uno.
I used below code to test the motor. Nothing happened. Also, no LED lights were ON on the shield.
Could you post some pictures of your setup that show all of your connections, including some close-up pictures of both sides of your dual VNH5019 motor shield?