Easy To Build Stepper Controller from Recycled Materials by murray484
Featured
*****You can see more of my projects and updates to my current projects on my website: Colvins.ca*****

***For Support on this Project, Please use the forum on my website. Just go to http://colvins.ca 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

Step 1: Required Parts

The parts that are required for this project are:

In the scanner:
-1 stepper motor
-1 uln2003 chip
-2 steel rods
For the enclosure:
-1 cardboard box
The tools:
-Hot glue gun and glue
-Wire cutters/strippers
-Scissors
-Soldering tools
-Paint
For the controller
-1 DB25 port (recycled from previous project)
-some wire
-1 dc barrel jack (recycled from old RC car)
For the test rig
-1 threaded rod
-1 nut to match your threaded rod
-various washers and screws
-scrap wood (recycled from previous building projects)
For the control computer:
-1 old computer (I used an old laptop)
-1 copy of TurboCNC (get it here)
1-40 of 267Next »
hamdijabihac says: May 4, 2013. 4:06 AM
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.

ThatCrazyFox says: Dec 12, 2012. 11:10 PM
i think i mucked it up, all the motor did was get really hot
edgukated says: Jul 15, 2009. 7:03 PM
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
samee37 says: Aug 21, 2012. 7:19 AM
yes
mykiscool says: Jul 26, 2012. 3:50 PM
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.
ringai says: Aug 10, 2012. 9:07 AM
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.
ringai says: Aug 10, 2012. 6:26 AM
Did you know that you can buy directly from Tayda's website? Much better than eBay, IMHO.
Computothought says: Aug 1, 2010. 3:08 PM
Both the uln2003 and the nte2013 are easy to get on-line. most local (real) electronic stores should have the nte2013.
14341045 says: Dec 1, 2009. 8:54 AM
TE RESPONDO EN ESPAÑOL PERO PUEDES TRADUCIR CON GOOGLE
ES MAS FACIL BUSCARLOS EN IMPRESORAS DE PUNTO, ESTAN CERCA DE DONDE ESTA EL CONECTOR DEL MOTOR PAP, SON 2 CHIP FACILES DE RECONOCER YA QUE ANBOS TIENEN LOS MISMOS NUMEROS EN LA CARA VISIBLE.
EN SCANNER NO HE BUSCADO PERO DEBERIA ESTAR CERCA DEL CONECTOR QUE VA HACIA EL MOTOR, PUEDES BUSCAR LA EQUIBALENCIA EN INTERNET, GOOGLE, ESCRIBES EL DATO DEL CHIP QUE SACASTE Y AÑADES DATASHEET Y TE MUESTRA LA PAGINA CON DATOS DEL CHIP. ESPERO QUE TE SIRVA
-shtoink- says: Nov 8, 2009. 9:59 AM
I have managed to find quite a few of the ULN2003 or equivalent chips. Different manufacturers of these chips had slightly different schemes for naming them. Double check the chips with a search on line for data sheets to see if they are what you need. It did help to look specifically for the really old scanners. Every UMAX Astra I found as well as the really old Mustek had uni-polar steppers and at least one 2003 chip.

I recommend looking for the ones that have parallel or centronix ports on them. Possibly SCSI, too. The older ones were not small and you can easily see the "guts" and make you decision about its usefulness to you. Anything that has USB is probably going to have very little you want. They tend to have very small stepper motors and might be bi-polar. The exception being some of the UMAX Astra scanners that have parallel and USB. I also noticed the older ones tend to have really thick hardened steel rails. An added bonus for linear motion.
lenny25 says: Jul 16, 2009. 3:30 AM
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) says: Sep 12, 2009. 6:45 AM
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.
-shtoink- says: Nov 8, 2009. 7:41 PM
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.
zoot686 says: Jan 9, 2011. 8:20 PM
There's no way without using resistors on the input to assure that the pairs in the array share the current load
-shtoink- says: Jan 17, 2011. 10:10 PM
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.
zoot686 says: Jan 18, 2011. 2:39 AM
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:
http://www.luberth.com/plotter/TIP120schematic.png
http://www.luberth.com/plotter/tip120pcb.htm
Nazir Naseer says: Jan 9, 2013. 11:29 PM
I have 24v 2Amp stepper motor and i am trying to using turboCNC on phase drive so any idea about it??
Nazir Naseer says: Jan 9, 2013. 11:22 PM
Hi sir i try to find those transistors but i cant find it in market so can you tell me an other transistor that work directly work on LPT with out using any ULN ic?? Thanks..
mykiscool says: Jul 26, 2012. 3:54 PM
Will this work on 24v motors if you just switch the input to 24v? Can the Darlingtons do 24v?
mykiscool says: Jul 26, 2012. 3:51 PM
shlxtn says: May 11, 2012. 4:00 PM
HI
please tell me .if i connect it to my computer do not burn my computer processes? because of feedback of electrical current form motor .
or any dangerous on my pc?
murray484 (author) says: May 11, 2012. 5:31 PM
If properly constructed, this circuit should not damage your computer. However, it is not isolated from your computer, so there is a chance that it could cause damage. One way to prevent that is to install a PCI LPT card. This will add an extra printer port to your computer. This way, if it did burn something out, it would only damage the card, and not your computer. Or, you can do what I do and use an old computer that I don't care about for projects like this.

Hope this helps
shlxtn says: May 15, 2012. 12:35 PM
Thank you for answering my question.but If I put 4 diodes between steeper control and computer ,will protect my pc?.
Thank you very much
shlxtn says: May 20, 2012. 8:01 AM
answer please
Asa J says: Dec 21, 2009. 10:21 AM
Ok, here it goes again. When I try to jog the motor just vibrates. Also I notice that as soon as i connect the red motor wire to Positive it locks up.
One other thing, the port monitor numbers the port pins differently than you have here, and my X axis seems to run on pins 2, 3, 4, and 5.  Sorry if that's too much to address.
zoot686 says: Jan 18, 2011. 5:44 PM
Ok, it's supposed to lock up when you hook the hot wire up, and the reason it vibrates when you try to jog is because you have two of the other four wires connected in the wrong order, in that it's taking one step forward, then a step backwards, andt hen another step forward over and over again, and it seems like it's vibrating because it's doing this so quickly.
disconnect one two of the four wires and reverse them and try it again
gatts says: May 3, 2012. 10:31 AM
Hi guys need a bit of help here, 2 of my three motors lock nicely (z & x) when I charge them, but 1 (y) does nothing, then when i open turbocnc, the dead 1(y) locks and another 1(x) stops locking, then when i jog, z axis turns 4 increments, y the same, (im guessing this is normal) but when i jog x, y axis makes strange noise, and turns a bit. (x motor still dead). Any idea whats happening here? Help would be REALLY appreciated.
natsud1 says: Jan 26, 2011. 5:50 PM
hello i am in need of your help i cant seem to get your test.cnc to do anything. i believe i have all the settings correct as you stated but my motor doesnt do anything its not locked up or anything its a M42SP-7 stepper motor it seems that all the outputs are always onso i can test each individual output and the motor will step with all of them but it will not turn if i hook them all up to motor . how do i make my motor turn continously? pls advise thank you
gatts says: Apr 16, 2012. 3:05 AM
I found that turboCNC doesnt work with windows 7, that could be the problem, looking for software that supports phase for W7... any ideas???
murray484 (author) says: Apr 16, 2012. 3:58 AM
Very few CNC programs run on windows. This is because windows tends to throw off the precise timing required to run a cnc machine. Mach 3 is one of the only programs that will run on windows and it does not support phase drive. This is why I chose turboCNC. You can still run it by booting into DOS.
murray484 (author) says: Jan 26, 2011. 7:04 PM
Are you sure that you have the motor's wires connected in the correct order? You usually have to try switching the wires systematically until you get the motor to turn. Also, what program are you using to control it?
natsud1 says: Jan 28, 2011. 11:04 PM
ok i got it to work i had everything right it was the stupid db25 cord i had i finally tested continuity from one side to the other but the cord changed the pins around on the other end so number 2 was 15 ,3 was like 13 4 was 12 and 5 was 1 or somethin any way i cut the stupid cord into and just soldered the wires to my circuit . after that the program worked and my wiring to the motor turned out to be right i was thinking it was because i have an xp computer not win98 i just made a dos mode floppy but i think maybe you should mention that you have to have the right kind of cord because that was my last ditch effort to get it to work thanks for such a great instructable and for replying
pfred2 says: Nov 24, 2011. 1:30 PM
Instead of chopping up a printer cable you could have used an old riser cable out of a PC too. That is what I do. I'd love to embed the image inline but of course this website is broken so here is a link to the picture:

http://www.instructables.com/file/FZ0WAKRGT19NJTB/?size=ORIGINAL

From the page:

http://www.instructables.com/id/Parallel-Port-Break-Out-Board-BOB/step3/Whyd-You-Make-it-This-Way/


Which should have been in my image library but having looked through it a half of a dozen times I'm a bit tired of that now. So those links will have to suffice. Fire the webmaster! Or more fitting in this case, web disaster.

The riser cable is of course the flat gray ribbon cable plugged into the printer cable.
Computothought says: Dec 6, 2011. 7:34 PM
Parallel cables are a dime a dozen and nothing I know of uses them anymore. I do have some working spares just in case. . As a starter to an interface, parallel cables can not be beat. The riser is a good idea, but the average person will probably not do that (i.e desoldering).
lu2a says: Dec 22, 2010. 11:46 AM
i have a question :

how can i use the CNC version to drive a bipolar motors ? can i do that ?

thank you , great work
dombeef says: Apr 3, 2011. 5:54 AM
Yes, I need that help too
murray484 (author) says: Apr 3, 2011. 6:04 AM
Unfortunately, this driver only works with unipolar motors. If you would like to drive bipolar motors, you will have to build a different controller. I also know that the Sparkfun Easy Driver will work with bipolar motors of up to 750ma. It cost $15 per axis, and is available here: http://www.sparkfun.com/products/10267
pfred2 says: Nov 24, 2011. 1:03 PM
Not worth the price of admission. These are far better and cheaper too:

http://www.pololu.com/catalog/product/1182

Even my drivers own it handily:

http://www.instructables.com/id/TB6560-Microstepping-Bipolar-Chopper-Stepper-Motor/

Though with built drivers so cheap not worth the trouble building.
cipryon says: Apr 26, 2011. 12:28 AM
can you use a usb- serial port adapter for the newer computers? or do you have to do some other programing?
pfred2 says: Nov 24, 2011. 12:41 PM
USB doesn't do real time. It does pretty good time I guess, but it isn't true real time. So for me the answer is no USB is unsuitable an interface.
1-40 of 267Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!