Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Alternator as a stepper motor

Status
Not open for further replies.

ClydeCrashKop

Well-Known Member
Most Helpful Member
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.
Stepinator.jpg

The 1k pull down resistors are going to ground now, thanks to Duffy.
 

Attachments

  • Stepinator.asm
    4.7 KB · Views: 89
Last edited:
I like it! You even used the rectifier block as a protection device. Sweet.

That 1k resistor on the P-channel IRF1104 gate should pull to ground instead of back to source.
 
Last edited:
Thanks Duffy
I think you are right about the 1k pull down resistors. If none of the low side FETs are on, the pull down resistors are not grounded. I did find out that if the gate floats, it can turn on and cook things.
 
More importantly, if they are connected to the source terminal you have to add the absolute value of the turn-on gate voltage to the total Drain-Source voltage drop. Then THAT gets multiplied by the Drain-Source current to show the total wattage being burned off in the transistor as heat. So, because the MOSFET isn't as "on" as it can get, it runs hotter than it needs to.

When I'm using steppers, I always use a higher voltage than the rating to improve acceleration and max RPM - the inductive reactance at high stepping speeds really starts to limits the power a stepper can handle. Have you tried driving this at higher voltages?
 
duffy, there better be some way to deal heavy loads or stalls from a rotor lock or whole thing will go up in flames fast. Not bad in many situations but it's very application dependant on weather or not that it's safe.
 
I changed the schematic with the pull down resistors going to ground now.
I probably put 24 volts on the rotor but I don't think it helped much.
I thought I was already abusing the poor MOSFETs so I didn't try more voltage on them.
 
Hi Sceadwian
The positive pulses shorten quickly for each step, until it is only on about 2% of the time.
I don't know what the holding torque would be but you can stop it or go 1 step at a time.
 
Last edited:
I've got a dumb question about using this for CNC. How are you getting around the giant steps? Most alternators that I've taken apart only have 12 rotor poles in them. 360° divided by 12 rotor poles is 30° per step, divided by 3 phases = 10°per step. Most steppers used in a CNC are 1.8° (200 steps per revolution). Or am I missing something?
 
Open-source mill driver programs have provisions to change the steps/inch settings.
 
You are right. That is pretty coarse. I planned on gear reduction or cogged timing belts to get at most .001" per step. That would raise the torque quite a bit too.
 
Many years ago I purchased an instructional video on VHS tape to convert car alternators to stepper motors. I wish I still had the tape. I figured it would be online these days but I have not stumbled across it yet. I tried to click on your circuit link but it tells me there was a problem and to try back later.
 
I refreshed the schematic in post #1

This is the original schematic that I had working as per the description in post #1.
Stepinator First.jpg



This is the schematic after modifying the 1k pull down resistors going to ground, thanks to Duffy. I didn't get it working that way. By then I had installed large stepper motors on my milling machine. After burning up a few more MOSFETs, I lost interest.
Stepinator.jpg
 

Attachments

  • Stepinator.asm
    4.7 KB · Views: 81
Thanks for the refresh, it's visible now. You mentioned you never got it working with the pull down resistors. Was that because of the larger steppers, a revision in code or the pull down resistors being added to the circuit? Which MOSFETs were the weak link; the IRL3103's or the IRF1104's? How are you driving those larger steppers now?
 
I played with an alty as a motor, but not like this, just connected 2 alty's together, one driven off an engine generating 3 phases, and the other wired to it as a motor.
Worked well as a sawbench.
 
The PC board that I made didn't turn out well but I used it anyway. One of the phases didn't look right on the scope. Notes say that 2 low side MOSFETs burnt. That would be the IRL3103. I really wasn't motivated to pursue it after that.

All the relevant files are in the ZIP file, including Eagle PC board & schematic & mill/drill files. You will notice that the MOSFETs only have 2 terminals. On high amp circuits like this, I use a 2 pin terminal strip for MOSFET pins 1 & 3 and bolt a wire to the tab for #2 pin. Like this.

MOSFET mounting.jpg


Here is info on the motors & drivers I am using now. This is an excerpt from this thread.

https://www.electro-tech-online.com/threads/cnc-victory.129154/#post-1076547

The motors on the table are the biggest ones MPJ&A had, 7.8V, 2A, 1.8 Deg. NEMA 34 Step Motor https://www.mpja.com/Stepper-Motor-18deg-NEMA-34-8V/productinfo/17457+MS and they're only $80.00. There is no question about these having enough horse power. The next size smaller (half as long) may be strong enough. I am using the Step Motor Driver, 5A Max, Wide Range CW250 https://www.circuitspecialists.com/stepper-motor-controller-cw250.html They are $50.00 each. They get step and direction signals from data bits 0&1, 2&3. I put off spending the money for years. I'm glad I finally did.

And more here What I did today.... and here Small CNC Machines For Making PC Boards
 

Attachments

  • Stepinator.zip
    588.8 KB · Views: 90
You mentioned Compucarve software. I have a Compucarve version and a Carvewright too. The biggest problem with these machines is the cost of their software upgrades. I'm always looking for a way to run the small servos in the Carvewright and Compucarve machines to get away from their propitiatory software.

There's a guy on the net driving homemade servos with an Arduino! Link here:
I think he's on to something. I just want a user interface that's a little more user friendly than his and will run standard G-code. Checkout his website for hardware details and info on his do it yourself cnc builds.

I also have another mill and a lathe running quite content on the old Dos program TurboCNC. I have a Shopsmith Patriot lathe/mill unit running on Mach 3. If I was doing another stepper motor conversion I'd be tempted to dump the computers and buy one of these cheap Chinese cnc controllers like in this link here:
You can pick these up for about $130.00 bucks from vendors such as Banggood. They would make a much cleaner build and no PC to mess with.

Those stepper drivers are cheap that your using. I went with Gecko's for my last couple of builds and at that time nothing like those you used existed.

Have you converted your Compucarve over to run on G-code?
 
I like that 4 axis CNC Controller,50KHZ CNC 4 Axis SMC4-4-16A16B offline CNC controller and will probably buy one.

Have you converted your Compucarve over to run on G-code?
I wrote my own Windows program to follow outlines on a bitmap picture and modified it to carve 3-D from a gray scale bitmap picture. I use Mach 3 to cut circuit boards from G code.
 
There's a guy on the net driving homemade servos with an Arduino!

I like that one too. I have the X , Y from a 4 foot wide printer that uses a servo motor and an optical linear scale that I have been wanting to play with. That will be a good start.
 
I prototyped one of those servos in the homofaciens video, it worked well.
I went on to do something with the arduino Pid library instead.
Not that theres anything wrong with homofaciens, its a perfectly good servo, I seem to recall the code you can download runs 2 servo motors.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top