After trying a lot of things, I'm calling for help to make my stepper work. I think it's not working because I don't know how to wire it properly on my shield to control it.
· My stepper motor is a Nema 17 42A02C
The documentation about this motor is saying that A and C (red and blue wires) are connected to make it rotate in a way. And B and D (green and black wires on my picture) are connected to make it rotate in an other way).
For my shield I've put the jumper of PWMA to 3 and DIRA to pin 2 but I don't know which wire from my motor I should plug. Same for the "motor" on the shield, I've got a number 1 and 2 for A but I don't know which color of wire should go in there. I already have plugged the external alimentation for the motor. The only thing missing is the wiring of the motor to the shield. If you could help me, I'll be so happy. Thank you for your time (a short code to make it spin in a way and and the in the other way would be really appreciated). Thank you so much <3
helpmymotor:
The documentation about this motor is saying that A and C (red and blue wires) are connected to make it rotate in a way. And B and D (green and black wires on my picture) are connected to make it rotate in an other way).
That's not correct.
Both coils of the stepper motor are used for both directions. It is the order in which the coils are magnetised that determines the direction.
The diagram for the shield seems to show quite clearly how the motor should be connected. It does not matter which motor coil is connected to which pair of connectors. Nor does it matter which wire from a coil is connected to which input of the connector pair.
In general, motor shields are a poor choice for driving stepper motors - they are intended for DC motors. Please post a link to the datasheet for your stepper motor.
That driver is not suitable for that motor. It is a current-driven motor. If you try to drive it with the nominal 3.6v the performance will be very poor. If you use a higher voltage without limiting the current the motor will overheat.
You need a specialised stepper motor driver such as a DRV8825 because it allows you to adjust the maximum current to protect the motor. The DRV8825 will also make the programming easier as it just needs step and direction signals from the Arduino.