Welcome! Log In Create A New Profile

Advanced

Stepper motors for idiots

Posted by cptwinder 
Stepper motors for idiots
August 19, 2009 09:53AM
I apologize if this has been asked a hundred times already. I did some googling and quickly searched the forums; but didn't find what I was looking for.

Last night, I dismantled four printers, 2 laser and 2 ink jets, that I have saved from the landfill. It is amazing what you can get from other people's trash once you get over the fact you are going through someone else's trash.

Anyway, I now have slew of misc junk, and by junk I mean cool stuff to play with. However, not having any electronics background other then what I've picked up paying around, I have one of those burning questions.

Now I have stepper motors, know how they work, and can make then "work", how do I choose the correct driver, power supply, etc? How does one go from a stepper that might say 12v 8.6ohm to, I need this drivers and this power supply? That voltage and resistance may be off as I just pulled the numbers from the sky. I don't have a motor in front of me at the moment.

Any insight or links to pages with insight will be greatly appreciated.

Thanks in advance,

Jeremy
Re: Stepper motors for idiots
August 19, 2009 01:47PM
Current, voltage and resistance are related by ohms law so if you know two of the three you can work out the third. V = IR when the units are volts, amps and ohms.

You can measure resistance with an ohm meter, so if they are just labeled with voltage or current you can work out the rest. If they are not labeled than you you have to start with a small current and work up until it gets too hot. Motor current rating is simply based on how hot it gets. The limit being when the insulation melts.

The current rating is per coil so you need to double that for the power supply load.

If the motor is lower voltage than your supply then the best way is to use a chopper drive to control the current. The PSU current will then be less than the coil current by approximately the ratio of the motor voltage to the supply voltage.

E.g. a 5V 1A motor will take 2 * 1 * 5 / 12 ~ 0.8A when driven from a 12V supply.


If the motor has only four wires you need a bipolar driver. If it has 5 then it really needs a unipolar driver. 6 or 8 then either unipolar or bipolar will work.

For you example of 12v 8.6 ohm then the current per coil will be 12/8.6 = 1.4A. It will work with the standard RepRap drivers if it has anything but 5 wires and take 2.8A from a 12 PC power supply.


[www.hydraraptor.blogspot.com]
Re: Stepper motors for idiots
August 19, 2009 03:24PM
I'm assuming I want to stop increasing the current short of melting the insulation? hot smiley

Next set of questions:

1) Are there chopper and none chopper drivers?

2) Is chopper drivers doing the same thing as PWM for DC motors?

2) I have some end-of-life driver ICs, I wish I was home so I could get the part number off of them. I picked them up a couple years ago because they where used in a robots projects book I had. However, if I remember correctly, they are only rated for 300mA. That is a far cry from 1.4A. There have been several bipolar motors I have tried with them that the motor just vibrates. I assumed it was because the motor required more current the then IC would allow. Given my fictional 12v 8.6 ohm motor, are these drivers useless since they can't handle the 1.4A or am I missing something?

Thanks again,

Jeremy
Re: Stepper motors for idiots
August 19, 2009 04:32PM
1) Yes the simplest drive is constant voltage. It can be used when the supply voltage is the same as the motor voltage. Using a higher voltage supply than the motor and adding series resistors to limit the current gives faster current rise times and faster running. But it wastes lots of power. A chopper drive achieves the same increase in speed, but without wasting power.

2) Similar but it is closed loop. It turns on the full voltage until the current builds up to the required value and then switches it on and off to keep it hovering around the set point. The first pulse is therefore longer then the rest, unlike open loop PWM, which can be used to control the current but gives no speed advantage. It also compensates for the effect of back EMF, which an open loop system cannot.

3) Torque is directly proportional to current so 300ma would give very little torque compared to 1.4A You would either have to limit the current with resistors, or PWM it fast enough to avoid the current exceeding 300ma. I.e. switch it on and off with a 3:14 ratio and a frequency that was high compared to the inductive time constant of the motor, L/R.


[www.hydraraptor.blogspot.com]
Re: Stepper motors for idiots
August 19, 2009 04:53PM
But to get around the 300mA limit of the IC could I not use a L298N full-bridge driver? Not that I totally understand what a full-bridge driver is, but I believe I understand the concept.

Things are starting to make sense, finally. There are too many pages on the web describing what a stepper motor is and how they work, but not enough giving the big picture. Either that, or other people fill in the blanks easier then I do.

Thanks again Nophead I do appreciate it,

Jeremy
Re: Stepper motors for idiots
August 19, 2009 11:35PM
Ok let me make sure I have this right. First the IC is a Motorola MC3479 and the stepper is a NMB PM42M-048.

The IC can support 7.2v to 16.5v at 350mA/Coil. It does not look like a chopper driver.

The motor in bipolar mode is rated at 24v, 500mA/phase, and 6 ohm phase.

In the data sheet for IC in the section talking about the Bias/Set resister. It is as follows:
Quote

This pin can be used for three functions. a) determining the maximum output sink current. b) setting the internal logic to a known state; and c) reducing power consumption.
a) The maximum output sink current is determined by the base drive current supplied to the lower transistor (QLs of Figure 5) of each output, which in turn, is a function of IBS.
The appropriate value of IBS is determined by:
IBS=IOD X 0.86
where IBS is in microamps, and IOD is the motor current/coil in milliamps.
The value of RB (between this pin and ground) is then determined by:
RB = (VM - 0.7V)/IBS

So if I understand this correctly and I drive the motor with 12V I get the following:
AmpCoil = 12/6 = 2A/Coil Which doesn't make sense to me because the data sheet said 500mA/Coil. So what am I missing?
If I continue the math.
IBS = 2000mA X 0.86 = 1720uA
RB = (12v - 0.7v) / 1720uA = 6.5 kohm

Am I on the right track here?

Thanks,

Jeremy
Re: Stepper motors for idiots
August 20, 2009 04:29AM
The L298 is rated for 2A. Full bridge means bipolar.

The only data I could find on the motor is here: [www.nisiki.net]

It implies there are two versions. One is for a unipolar constant voltage drive and is 24V 80R so will take 0.3A. It will have 5 or 6 wires.

The other is designed for a bipolar chopper drive. It is 500ma and 6R so it is actually a 3V motor. It will have four wires.

If you use the bias pin as a means of controlling the output current on the MC3479 it will overheat. I don't think it is intended to be used like that.

How many wires does the motor have? Can you measure its coil resistance?


[www.hydraraptor.blogspot.com]
Re: Stepper motors for idiots
August 20, 2009 09:58AM
That link is for the motor in question. I have the bipolar version of it. It has only four wires. I'll measure the coil resistance when I run home for lunch.

However, this is where I start becoming extremely confused. I get how you figured out the 3V for the motor; but why does the data sheet say 24V? Are they saying 24V with a chopper drive to bring the current down to 500mA max? In which case the actually supply voltage doesn't really mean anything as long as I don't exceed 500mA. And if the MC3479's bias pin isn't used to control the output current, what is it doing?

It seems the best solution is going to be to find a chopper driver. I may be able to find one on the boards from the printer I took the motor from. But I would still like to understand the above.

Thanks again Nophead. If you ever need help analyzing packet dumps from an IP network, configuring Cisco routers/switches, or any other network related activity, I'm your man. smileys with beer

Jeremy
Re: Stepper motors for idiots
August 20, 2009 01:23PM
When I went home for lunch I checked and rechecked, read the manual for the meter, then check again the resistance of each coil. They are roughly 20 ohm. So much for data sheets.

That would make then a 12V motor? I say 12V instead of 10V because it was a cheap analog meter and 10V seems weird. I'll have to pick up new batteries for my digital meter.

Lets make sure I'm understanding everything. I will be able to use a 7.5V regulator to step down the voltage from the 12V power supply to power both my MC3479 and motor. CoilOhm*maxAmps=22ohm*.350A=7.7V This will keep my MC3479 under it's 350mA limit and it's voltage above it minimum. I will however be giving up torque. Is this correct? Also, if the coils come out to be a lower ohm on my digital meter, can I just add a resister to each coil to bring it up to 22ohm?

Then for my bias resister I would use a 2.2 kohm resister?
IBS = 350mA X 0.86 = 301uA
RB = (7.5v - 0.7v) / 301uA = 2.2 kohm

Thanks again,

Jeremy
Re: Stepper motors for idiots
August 20, 2009 03:20PM
Yes the datasheet had 24V in the bipolar column just to indicate it was intended for a 24V chopper drive that would limit the current to 500ma.

If it 20R then I am not sure what the voltage will be. It will have more turns than the 6R version and less than the 80R version. Torque is proportional to current times turns so it is likely the correct current is somewhere between 300ma and 500ma. If it was 400ma then it would be an 8V motor. 350ma seems reasonably close.

Yes you can limit the current by using a lower supply but if it is a linear regulator it will produce quite a lot of heat. E.g. suppose each coil is 0.35A and you use an 7.5V supply regulated from 12V. If you have three motors then the current is 3 * 2 * 0.35 = 2.1A. The regulator will dissipate 4.5V * 2.1A = 9.45W, so it will need a medium sized heatsink, something like 4C / W would keep it below 60C. You can run chips hotter bit I prefer not to burn myself!

Yes you can simply add resistors in series with the coils, but they need the correct power rating. In this example you would need 12R 2W resistors. That would give you slightly more speed compared to dropping the supply voltage. They will get hot.

If you reduce the current by reducing the bias then the chip will dissipate the power. In this example it would be 2 * 0.4A * 4V = 3.2W. I think it will be difficult to keep the chip cool enough for that sort of power dissipation.

So I think the best option is to use the resistors. A chopper drive like the gen3 RepRap stepper driver would only give slightly better performance unless you used a higher supply voltage.


[www.hydraraptor.blogspot.com]
Re: Stepper motors for idiots
August 21, 2009 09:14AM
Quote
Nophead
In this example you would need 12R 2W resistors.
How did you come up with the 2W?

If I use resisters in series with my coils. What do I need the bias resister to be? The IC won't run without one.

In the long run, I'll probably use a chopper drive like the gen3 RepRap driver; but this will allow to me experiment and I believe I'm finally understanding how all of the math fits together. Knowing Ohm's Law does nothing for me if I don't understand how it applies to the real world. winking smiley

Jeremy
Re: Stepper motors for idiots
August 24, 2009 08:05AM
Power is I^2 x R so 0.35^2 * 12 = 1.47W. 2W gives some margin.

I would set the bias for more than 0.35A, say 0.4A, so that the transistors are fully saturated to keep the chip dissipation to a minimum.


[www.hydraraptor.blogspot.com]
Re: Stepper motors for idiots
August 27, 2009 10:21AM
Possibly a cheap easily avalible component Ive seen used on a home brew controlers of this type. Was a halogen car bulb instead of a power resistor it could have been instructables from the same guy who did the small cnc if I remember correctly

It will make a flashy display too.


Bodge It [reprap.org]
=======================================

BIQ Sanguinololu SD LCD board BIQ Stepcon BIQ Opto Endstop
BIQ Heater Block PCB BIQ Extruder Peek clamp replacement BIQ Huxley Seedling
BIQ Sanguinololu mounting BIQ standalone Sanguinololu or Ramps mounting Print It Stick It Cut it


My rep strap: [repstrapbertha.blogspot.com]

Buy the bits from B&Q pipestrap [diyrepstrap.blogspot.com]
How to Build a Darwin without any Rep Rap Parts [repstrapdarwin.blogspot.com]
Web Site [www.takeaway3dtech.com]
Sorry, only registered users may post in this forum.

Click here to login