Easy To Build Stepper Controller from Recycled Materials

Picture of Easy To Build Stepper Controller from Recycled Materials
*****You can see more of my projects and updates to my current projects on my website:*****

***For Support on this Project, Please use the forum on my website. Just go to and click the forum link on the side bar.***

I am 14 I have always wanted to build a cnc machine but because inexpensive parts are hard to find in Canada I have had trouble trying to build a decent cnc controller. The purpose if this Instructable is to show that anyone can build a cnc controller using an old scanner. The scanner I used was an old OpticPro scanner. I had previously extracted the stepper motor and experimented with it but not considered it for a cnc controller. All of the controllers on the Internet had a large number of expensive transistors or were ridiculously complex. I finally stumbled across this controller and realized I could build it. By reusing the parts from the old scanner and making the case from recycled cardboard, I am cutting back on my impact on the planet. Also, because this controller is so simple, it only needs one power suply, so, it only needs 1 12 volt (for both the logic and the motors), instead of 1 5volt (for the logic) and 1 12 volt (for the motors). This saves energy, especially when you run it for a long period of time.

If you don't already know what a cnc machine is, it is a machine that uses special motors called stepper motors to moce an object a percise distance. The difference between a stepper motor and a regular DC motor, is that stepper motors "Step", not spin. if you don't understand, refer to this artical. There are two types of stepper motors. There is Bipolar, and Unipolar. Bipolar motors have 4 wires. Unipolar motors can have 5, 6 and 8 wires. The difference between these two types of motors is that unipolar motors have 4 coil inside that, when energized in a certain order, allow it to step forward and backwards. This makes them easy to control and is why we are going to use them in this instructable. Bipolar motors only have two coils that can be energized in forward, or reverse. To drive a bipolar motor you need two H-bridges. Because of this, bipolar motors motor controllers are much more complex.
Remove these adsRemove these ads by Signing Up
1-40 of 266Next »
arun kumar5 months ago

i want to drive a S M with following details on it,

model PH 268-21

make VEXTA 2 Phase 1.8Deg/step.

DC 5.4v 1.5A

it should rotate 72Deg per every signal input

signal in put is through a cam (notched) within an opto coupler

can any one help me?

balak954 years ago
do you have to buy the 60$ registration fee for the sortware to work??
murray484 (author)  balak954 years ago
No, the software itself is free. If you would like the source code so that you could modify it to fit your need better (you probably don't need to), then you need to pay the registration fee. But to just use the software as it is written, you do not have to pay the fee.
thanks im ordering my un2003 chips tommorow it should be here on saturday so i can build the cnc over the weekend. I got steppers out of an old brother fax machine will those work.
murray484 (author)  balak954 years ago
It depends. How many wires do they have. How many amps do they draw? The ULN2003 can only handle motors that take 500ma. Also, what is the voltage of the motors. The closer to 12volts they are the better.
one of them is actually the exact same as in the do you draw in turbo cnc....can you upload something to the software and it will automaticlly cut it out.
murray484 (author)  balak954 years ago
Provided that all of the motors have similar specs, it should work fine. In order to make stuff with the cnc you will need to use a CAD/CAM program to create G-Code files. I personally use MasterCam X4, but that is expensive and most likely out of the question for most people. CamBam is a popular one and there is a free version (available here: To use it, you have to import a DXF file or image, and create a toolpath. There are plenty of tutorials here: . You can also use Desk Engrave to do simple text engravings (available for free here: or Ace Converter to do simple jobs from dxf files (available for free here: If you are looking for a good CAD program, I recommend Google Sketchup. It is super easy to use. The one limitation is the lack of a DXF export option. There is a plugin that will do that for you though (just google sketchup to dxf converter). Another great option if you are a student is to use the free student version of AutoCAD or Autodesk Inventor. (go to and create an account).

This should get you off the ground. It may seem complicated at the start, but once you get using it, it becomes quite simple.

Hope this helps.
Draftsight is a great free alternative to AutoCAD. We used this in our drafting class when we could not afford AutoCAD and we actually learned draftsight out of an AutoCAD book because it is that similar.
i have two stepper motors one with 4 wires the other with 6 will these work???
murray484 (author)  balak954 years ago
The one with six will, provided it is not over the current limit of the ULN2003. The one with 4 will not, as it is bipolar, not unipolar.
what is thr highest amp stepper motor i could use that would work...with this chip.
murray484 (author)  balak954 years ago
500ma (0.5A) is the highest that this controller can handle. Also, be sure to heatsink the chip if you use anything between 400-500ma.
is there anyway to run a 1.2 amp stepper on it at 12 vdc.
murray484 (author)  balak954 years ago
To run a motor at that current, you would have to use a different controller. Another simple one is this: where I1-I4 are the inputs from the parallel port, gnd is connected to both the ground of the parallel port and the power supply, Q1-Q4 are the 4 wires on the stepper motor, and the stepper motors + is connected to the power supply's +.

what if i were to use 0.8 amps
murray484 (author)  balak953 years ago
You might get away with 0.8 amps for a while if you used some really big heatsinks, but it would significantly lower the life of your chips.
walter19681 year ago
In your schematic, it shows pins 18-25 grounded. But in your picture and your text, you state only pin 25. Can you clarify this please? Thank you.
jduffy541 year ago
If you replace the

section with

spread over 8 lines , and change "last phase" to 8 (like you did with the four from the instructable), you will double the resolution, without doing anything else!
Hi! I have been successful driving PM motor with this schematic,even using different driver MP4102.
Does anybody know is it possible to adapt this circuitry to work with hybrid motors?
Because they draw current way to much.
I have tried putting light bulb in series on the ground then it gets really weird.
After first jog with turbocnc light bulb lights up then it wont stop even without jogging.

sxyuklad4 years ago
And if my motor is more than 500mA and it is alot more than what a ULN2003 can handle. What should I do? Because when I connect it blows up the chip everytime. Please help.Does the motor coiling start from yellow or black? which is A1, A2, B1 and B2?
1k resistors + 3055 transistors?
Tip142 transistors are probably better for this application
tip142 aka nte270 that is a Darlington transistor? I have used the nte2013 (aka uln2003) with a 1k resistors with no problem.
yes the TIP 142 is a darlington transistor rated at 10 amps(20 amp peak current) at 100 volts
Those must be for the biggie stepper motors......
It isn't so much the size but the current requirements, and the recent "hybrids" really suck the current.
By the same token, I've got boxes of little Nema 23 40 oz steppers that only suck 0.4 amps(400 ma) and by setting my harbor freight minilathe clone(soldby cummins tools) up with the gibs rather loose, I can drive that lathe using those 40 oz stepper motors and this circuit.

And no, I'm not pulling 36" per minute rapid travels or cutting at .015 feed per revolution in hard steel.
Think 5 inches per minute rapid travels as the torque curve of stepper motors starts at it's highest and goes down as the pulses per second increases.

After all, you're not going to built a hurco vertical machining center using this circuit.
This circuit is designed to be built for pocket change and run a little homebrewed cnc mill, router, or lathe for hobby use.
Good point. You need to check the specs to see what you have before just randomly using any old part.
gatts zoot6862 years ago
Would you know how to wire this hybrid- ??? Cant find a sch for it anywhere. Help would be much appreciated!!!
i think i mucked it up, all the motor did was get really hot
edgukated5 years ago
I removed the circuits from 5 different models of HP scanners. They all have different chip sets and none have a ULN2003 chip. Does anybody have any suggestions how I can find an equivalent chip on these boards? ...timmy
Go to Tayda electronics on eBay I believe their username is tayda2009. That is where I get all my electronics parts, they are cheap because the parts come directly from the source in china bypassing companies like radio shack therefore saving precious money.
I just received an order from Tayda. I ordered on 02 August and received it this morning, 10 August. Not a bad turn around, IMHO.
Did you know that you can buy directly from Tayda's website? Much better than eBay, IMHO.
I've got the same issue, I've been ripping apart scanners, printers, photocopiers. Got lots of unipolar and bi polar motors and plenty of cool steel rods, but no uln chips. Are there any alternatives? I mean something must be controlling the stepper motors.
murray484 (author)  lenny255 years ago
You can buy the chips for $0.50 at most electronics stores. I noticed that most scanners from big companies did not have the chip.
I think that it is worth it to source some ULN2803A chips since they cost about the same but allow you to run the arrays in pairs so you can push up to 1A. The 2803A has an array of 8 instead of the 7 that the 2003A has. You could get away by using 4 2003A chips, but it could get a little kludgey.

You can see a simple 1 axis version implemented like that here.
There's no way without using resistors on the input to assure that the pairs in the array share the current load
Would you mind elaborating on this one, please. I am far from an expert and a little bit more info on this whole thing might prove most helpful.
It's called manufacturing tolerances, and each darlington transistor in that array will be "slightly" different.
And thus the transistor that turns "on" first will take the full current load unless some sort of regulation is supplied to assure that each transistor in the array is "exactly the same"....
And to be truthful, I don't think there's any way to do that as the base leads to each transistor in the array are internal.

This circuit is good for 500ma per phase and there's a lot of small surplus nema 17 and nema 23 stepper that can be used with this circuit, but a lot that can't.
For those that can't, instead of using the ULN2003/ULN2803 just use a set of 4 TIP120's or TIP142's instead of the ULN chips.

look at these links for an idea of how this works and what your ratings will be:
1-40 of 266Next »