I did this because I wanted to computerize my milling machine and lathe, and to prove that I could. The strong stepper motors and drivers are expensive and are rated in HOLDING torque so you don't know what you are getting. If I wanted to hold something I would use disc or drum brakes, not a motor. This Alternator, wired as a stepper motor has 30 inch pounds of real torque. With a string on a 1" radius pulley, it lifted 30 pounds.
It uses a PIC 16F628A with step pulses input on RB0. I just used a 555 timer for adjustable frequency. RB7 can be used for direction eventually.
RB1 thru RB6 are outputs to turn on the appropriate FETs in 3 phase sequence. For each coil, it turns on the low side FET and then pulses the high side, longer at first then diminishing to very short positive pulses. That is so if you are turning it slow, it gets power to step but doesn't get hot waiting for the next step. It uses bootstrap circuits to turn on the high side FETs. You need fast diodes and caps for that. If they make real P channel FETs now that are as easy as the low side, use them instead.
You will want large heat sinks on the FETs. When making your first board, make it easy to replace the FETs until you get it perfected. I let the magic smoke out of a few of them.
Some of the PIC program is thanks to Nigel's tutorials, check them for the PIC part of the circuit. Direction input and turning right are in there from notes my but commented out. I had not used them yet.
I did this in 2007. I may have a basic version for LPT1 from 2005. I'm sure you guys can make lots of improvements.
The 1k pull down resistors are going to ground now, thanks to Duffy.
It uses a PIC 16F628A with step pulses input on RB0. I just used a 555 timer for adjustable frequency. RB7 can be used for direction eventually.
RB1 thru RB6 are outputs to turn on the appropriate FETs in 3 phase sequence. For each coil, it turns on the low side FET and then pulses the high side, longer at first then diminishing to very short positive pulses. That is so if you are turning it slow, it gets power to step but doesn't get hot waiting for the next step. It uses bootstrap circuits to turn on the high side FETs. You need fast diodes and caps for that. If they make real P channel FETs now that are as easy as the low side, use them instead.
You will want large heat sinks on the FETs. When making your first board, make it easy to replace the FETs until you get it perfected. I let the magic smoke out of a few of them.
Some of the PIC program is thanks to Nigel's tutorials, check them for the PIC part of the circuit. Direction input and turning right are in there from notes my but commented out. I had not used them yet.
I did this in 2007. I may have a basic version for LPT1 from 2005. I'm sure you guys can make lots of improvements.
The 1k pull down resistors are going to ground now, thanks to Duffy.
Attachments
Last edited: