DIY Stepper Motor Controller

17,430

140

9

About: Being a science student i love to indulge in projects related to engineering as i love to learn things practically...

Remember those DC motors, all you need too do is to hook up the positive and negative leads to a battery and holla it starts running. But as we started doing more complex projects those DC motors doesn't seems to deliver what you need.... yes I mean efficiency, precision and above all torque without any gear reduction.

Well the story started as I planned to built a semi automatic drill press which can help you drill through objects like a usual drill press but with the help of a foot pedal so that you can hold the object with both your hands without the need of a helping hand. Long story short I need a motor that can move the drilling head up and down precisely and also offers a good amount of torque.

Failing to get all those from a simple DC motor I decided to use a stepper motor. Yes the one that has four wires and thats all I knew about them.So I in this instructables we are going to make a controller for these four wire stepper motors that enables us to control the speed and direction of the motor without using a micro controller.

Supplies:

Step 1: Concept and Schematic

The goal of this project is to simplify the use of a stepper motor by making a modular controller that can easily drive the stepper motor without the need of incorporating a micro controller to do the job.

The controller we are going to built is based around A4988 stepper motor driver.Its a relatively cheap and can easily be found on any online electronics store.Now before we get into more details have a look at the data sheet of the stepper driver.

The driver needs a PWM input on the step pin to operate the motor. Increase in frequency of the PWM signal results in higher RPM and vice versa. To control the direction of motor the Dir pin of the driver can be toggled between the VCC and ground terminal.

The driver operates on 5v (VDD) and the VMOT represents the voltage for the motor which can range from 8-35VDC. The coils of the motor is going to be connected to the 1A,2A,1B,2B connections respectively.

Now to generate the desired PWM signal we are going to use a 555 timer IC. Here we are going to use a 10k potentiometer to change the output frequency of the PWM signal which will help us to control the speed of rotation. The rest of them are a bunch of complimentary components.

Step 2: Designing the PCB

After finalising the schematic I have done initial testing over breadboard and everything seems to work flawlessly. The motor precise, efficient and have good amount of torque. But the problem is that its a mess on a breadboard and doing this thing on a perfboard is not going to be an option.

So, I have decided to design the PCB for this controller which took some time but I have made sure that all the connections are correct plus I have also added all the complimentary components to make using this controller as easy to use as possible.

Now with the design of the PCB finalised I headed upto PCBWAY and uploaded my Gerber files to get my PCBs. After going through a bunch of options I have ordered my PCBs. They are offering great quality PCBs at amazing prices. A big thanks to PCBWAY for making this project possible so make sure you checkout their website to order your customised printed circuit boards.

The link to the PCBs and the Gerber files for the circuit boards is:

https://www.pcbway.com/project/sharep...

PCBWAY :

https://www.pcbway.com

Step 3: Tools and Components

The list of tools and component for this project is given below:

TOOLS REQUIRED:

  • Soldering Iron
  • Soldering Wire
  • Pliers

STEPPER MOTOR DRIVER:

https://www.banggood.com/3D-Printer-A4988-Reprap-S...

BILL OF MATERIAL (BOM File):


Step 4: Assembling the Boards

The PCBs arrived within just a week and the quality is flawless. Now as I get my hands on the boards I gathered all the components and started assembling them as indicated on the boards.

The best thing about putting up so much time designing the boards is that now you can produce as many copies as needed and all you need to do is to drop the components as shown on the boards.

Step 5: Setting Up Everything

Once the boards is ready I have inserted the 555 timer and the stepper motor driver in place and connected the motor to the board. After that I have connected the 12v battery by using pair of alligator clips to power the board.

Step 6: End Results

Once the controller is connected to the 12v battery. The motor started to rotate. Everything seems to run as expected. The direction of rotation can be changed by toggling the switch and the speed of rotation can be controlled by turning the knob of the potentiometer.

Share

    Recommendations

    • Party Challenge

      Party Challenge
    • IoT Challenge

      IoT Challenge
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest

    9 Discussions

    0
    None
    CPUDOCTHE1.

    3 months ago

    I didn't look at your design, but from the comments it appears that there are several failures in it. I was wanting to make a variable speed reversible drive for something and found a couple of boards that can just be connected together to drive the stepper motor and they cost less than $20 per set. I think the stepper motor, power supply, and all was less than $50.

    0
    None
    Frere Jacques

    3 months ago

    Take care, your 555 is connected as oscillator, not PWM as you wrote. But you are lucky, because with a true PWM, the speed will never change. A4988 just needs 1 pulse for one step (without µstepping). A4988 manages its internal PWM.
    Your schematic shows couple of mistakes : C2 must be connected between TRIG (2) and 0 V (1), not VCC (8). The 555 frequency formula is F = 1/T = 1,44 / (R4 + 2xR6+R7) x C2
    With your RC values, (10K+1K) as R6+R7 , 1K as R4, and C2 = 47pF, your frequency changes from 1.33 MHz to 10MHz... Not compatible with Stepper motor nor A4988. A4988 minimum STEP pulse width high is 1 µsec and 1µsec low which means 500 kHz maxi.
    To give an idea, a 200 steps/turn common stepper motor, will spin 1000 tr/min with 3333 Hz (1000x200)/60.
    Regards

    0
    None
    RomasP

    3 months ago

    Sorry, but there is poorly documented not usable device for drill press.
    To be working usable device there must be SPDT switch on STEP line for permanent stop of motor. Pedal switch in depressed position must connect pulses from 555 to motor driver STEP trough limit switch. This stops drill in desired top position. Pedal switch in pressed position must connect STEP pulses bypassing top limit switch and change level in DIR input. Simplest way to use a relay. So in normal pedal position drill will stay raised and when pedal is pressed - drill will go down at desired speed. There may be second limit switch for lowest position (disconnecting .STEP line) to stop drill at lowest point.
    This device have nothing in common with mentioned PWM

    0
    None
    colin.riddel

    3 months ago

    Thank you for this design.
    Do you have plans to publish your drill press design as I am looking to make one

    Cheers

    0
    None
    FabienP5PhonX1

    Reply 3 months ago

    it's don't work (broken link too)

    0
    None
    billbillt

    3 months ago

    GREAT JOB!...