Getting started with Arduino and already did the basic tutorial with the blinking light. Working on a project where I need to control stepper motors and am trying to test out one 4-wire NEMA 17 motor with a Leonardo and the motor shield REV3. Currently have the shield stacked on the Leonardo.
Questions
What is the correct way to power this setup? I plan to have the Leonardo connected to my PC but understand that the stepper motor/shield needs its own power. Do I use the Vin and GND ports for this? If so how would it be wired?
How do I connect up the stepper motor to the shield? My understanding is that the red and yellow wires go together in one +/- set and the green and grey wires go together in the other set but does the polarity matter?
Thanks in advance! I've searched through tutorials and videos but can't seem to find these answers.
That brushed DC motor shield (with L298 dinosaur) is falsely advertised as a stepper motor driver.
It might be OK with a high-impedance stepper motor, but most modern low-impedance steppers can't be used with that driver.
"NEMA 17" is the size of the mounting plate, and tells us nothing about the electrical specs.
Post a link to the stepper motor.
Leo..
That Adafruit V2 motor shield is also a brushed DC motor shield, but with more modern mosfet driver chips.
The stepper you linked to is a high-impedance type (34 ohm), so can be driven with those shields.
Just don't expect high speed/torque with those shields and high-impedance motors.
For that you need a low-impedance (~3 ohm) motor, a current-controlled stepper driver, and a high(er) supply voltage.
Leo..
Which one. The Adafruit or the Arduino one.
Most shields have a jumper, to detach (12volt) motor power from V-in (raw supply) of the Arduino.
The Arduino doesn't get power if you remove that jumper, so it must be powered from USB.
If you leave the jumper on, then the Arduino gets power from the motor supply,
but 12volt is the danger zone for most Arduinos.
You can't power much else from any pin at that voltage without risking overheating of the 5volt regulator.
Leo..
That Adafruit V2 motor shield is clearly documented. This section (setting up your shield for powering...) explains the V-in jumper part, linking/unlinking Arduino power and motor power.
Separate power (jumper removed) is preferred.
Leo..