

But what the wiring should be? If it had 5 wires I would have done it like this schematics. Since I do not have a driver at hand, I need to convert the circuit so it works with 4 transistors instead. And this is exactly the source of confusion: On arduino website, the sample circuit's stepper has 4 wires and is directly connected to a driver IC (a LMxxx), and the driver is connected to Arduino. Depending on that 500 to 24 steps may be required to complete one rotation.

The step angle can vary from 0.72 degrees to 15 degrees per step. On lines 7-8 we initiate the Wire I2C communication and we assign an event listener for the receive event. Go to step 3 Step Angle The number of steps required to complete one full rotation depends on the step angle of the stepper motor. I use the MOSFETs as fast switches: 4 Arduino pins control 4 MOSFET transistors. On lines 2-3 we set the pin mode for the relay and for the line tracer used to home in the stepper motor. But a 4-wire doesn't make sense! there must be 2 or 4 poles in a motor, and each pole needs a connection to common ground, so there must be 5 wires, how does a 4 wire work? I'm using MOSFET for driving the stepper, not LMxxxīecause I forgot to buy one, and I can't get my hands on one for a couple of days. All the pictures and circuits of easy tutorials I found on Google had 5 wires, (and those with 4 wires had different color coding anyway). Wires are colored: white, blue, red, yellow. Is it okay if my stepper motor has exactly 4 wires? Today I bought a stepper motor to play with, after 12 hours of struggling with it, I haven't been able to figure out how to connect it to an Arduino. Simulate this circuit – Schematic created using CircuitLab
