
STEPPER MOTOR DRIVER CONTROLLER BOARD FULL
Do not get confused on steps and full rotation because a step on our motor is a 1.6 degree angle and a full rotation is 360 degrees angle so our stepper will almost spin for 5 rotations in each direction.Īfter preparing the circuit as it shows the above photo all what it need now is uploading the code, then we plugin the external power supply for the stepper and it should be applied on Vmot input pin.ĭo not forget to connect the reset pin and the sleep pin to each other.įollowing this tutorial you are now able to control and test your stepper motors coming from electronic devices like 3D printers. Now every pulse on the direction pin will push the motor to make a step and in this code our motor will perform 1000 steps forward then it will spin 1000 steps backward. *-LOOP FUNCTION-*/ĭigitalWrite(dir,LOW) // SET DIRECTION LOW FOR FORWARD ROTATIONįor(int x = 0 x < 1000 x++) // LOOP 1000 TIMES FOR 1000 RISING EDGE ON STEP PINĭelay(10) // DELAY BEFOR SWITCH DIRECTIONĭigitalWrite(dir,HIGH) // SET DIRECTION HIGH FOR BACKWARD ROTATIONĪbout the direction pin once we set it to LOW the stepper will move forward and for HIGH the stepper will spin on the backward direction

PinMode(dir,OUTPUT) // DIRECTION AS OUTPUTĭigitalWrite(EN,LOW) // SET ENABLE TO LOW One important thing is connecting the sleep and reset pins to each other, otherwise the motor will be trembling and won’t move.Ībout the control program, no libraries required for this task so just some pinmode() and giditalWrite() functionsįirst we set the pins and we configure them as OUTPUTs and we set the initial value of the Enable output to LOW to activate the stepper motor driver. ★☆★ JOIN ME ON JLCPCB COMMUNITY HUB ★☆★Invitation link : īacking to our circuit diagram as it shows the photo above we have the Arduino board connected to the stepper motor through the A4988 driver.Ībout the driver we will need three pins to connect to Arduino which are the Enable, the step and the direction pins.Ībout the driver output you will connect each pin the appropriate coil end. by the way guys I invite you to join me in the new community HUB released by JLCPCB for makers in order to more engage the community.
STEPPER MOTOR DRIVER CONTROLLER BOARD PDF
Moving the circuit diagram I used EasyEDA platform to create the above schematic (you can have it from the download link PDF Format), EasyEDA will help you to establish your circuit diagram easilly and then convert it in PCB due to its builtin features you can then place and order for your PCB from JLCPCB.
