Pages: [1] 2   Go Down
Author Topic: PWM to limit current to bipolar stepper  (Read 1588 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The SN754410 driver I am using works fine on a breadboard powered by a 12v, 500ma wall wort but burns very hot and fails to run the bipolar stepper when wired to my project board, which has a 12v, 8amp supply. I am assuming that the current must be limited?  If so, can this be accomplished with PWM?  A search of this topic offers a number of discussions, none of which I fully understand.  The same board uses a ULN2003 to drive a unipolar stepper without a problem. 
Logged

NYC
Offline Offline
Newbie
*
Karma: 1
Posts: 31
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You might just want a lower current wall wart.  The Arduino analogWrite will change your average current, but it will more directly change your voltage. So if you need a 12v power supply for the stepper, the PWM from Arduino will drop the voltage and give your problems with the stepper.  Or you could build a current limiting circuit on your device, but that will probably also get hot.  If you're just testing and you have no other power supply, try hooking up a few other devices to your supply to drop the current.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 8amp, 12v power supply is running three servos, three DC motors, the two steppers, LED's, etc., so I thought it was necessary but now I face the dilemma of controlling current. The unipolar on an ULN2003 is running but extremely hot, even with the three servos, and DC motors running simultaneously. What current limiting circuit can handle this?
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Since the motor is an inductor, pwm is as good a way to reduce the average current as any other, but you would need to ensure that the pwm frequency was substantially higher than your maximum stepping frequency. I'd much prefer to use pwm to limit the average current rather than try to drag the supply voltage down or simply dissipate the excess voltage.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can a simple delay microseconds do the trick or something more complicated?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can a simple delay microseconds do the trick
No because there is no feedback as to the load it is under.

As the load changes the current requirement changes and so the pulses automatically get wider if you are monitoring the current.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So would a more complex PWM get around this problem? http://www.flickr.com/photos/50454200@N06/8597337363/ is a crude drawing of the project.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So would a more complex PWM get around this problem?
No you need a proper current sensing driver.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Since I have so many motors, can this be built from scratch or will I need a bunch of prefab drivers?
Logged

Mid-Atlantic, USA
Offline Offline
God Member
*****
Karma: 30
Posts: 515
"Remember kids, the only difference between Science and screwing around is writing it down." - Adam Savage
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would suggest evaluating STMicroelectronics' L297 stepper controller. Not only does this PWM the stepper signals based on feedback from the coils to control the current, but it also simplifies your sketch because you only need to set one pin for direction and toggle another pin for each step. And a third pin that controls the mode (normal drive (two-phase-on full step), wave drive (one-phase-on full step), or half-step) can either be hard wired to one mode, or you can use a third pin for changing the mode. I'm using one with a L298 in a schematic that I still need to breadboard...

Get the datasheet and price quotes from http://octopart.com/l297%2F1-stmicroelectronics-2330
Logged


Mid-Atlantic, USA
Offline Offline
God Member
*****
Karma: 30
Posts: 515
"Remember kids, the only difference between Science and screwing around is writing it down." - Adam Savage
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You might just want a lower current wall wart.  The Arduino analogWrite will change your average current, but it will more directly change your voltage. So if you need a 12v power supply for the stepper, the PWM from Arduino will drop the voltage and give your problems with the stepper.  Or you could build a current limiting circuit on your device, but that will probably also get hot.  If you're just testing and you have no other power supply, try hooking up a few other devices to your supply to drop the current.

This is incorrect due to a common misconception of power supply ratings. The actual current in a circuit is determined by the resistance (or reactance with AC circuits) for a given voltage level. The 12V 8A supply in question will not force 8A, rather it will supply a 12V level as long as the current draw is 8A or less. So you don't need any other devices to "drop the [excess] current". If you try to draw more than 8A many things may happen, among them:
A) a fuse (thermal or otherwise) or breaker will trip cutting the voltage off
B) the supply voltage will drop
C) the supply may melt down in a ball of fire.
Most commercial devices will either be A, or B followed by C. My laboratory grade bench supply at work will do B to maintain the maximum current (set by a dial instead of a rating...)

In the real world, however, there may actually be a minimum current where the output voltage may not be stable. Unfortunately, this value is rarely if ever given on commercial equipment. I remember building low power computers (anyone ever hear of the AmigaONE computers?) and having to make sure I used low wattage computer power supplies. This was because most of the high wattage computer power supplies didn't regulate the 5VDC and 12VDC lines well with the low power draw of the motherboard.
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have two of these https://solarbotics.com/product/k_cmd/ I wanted for another project but, if they are appropriate, I'll have to sacrifice them. What do you think?
Logged

Mid-Atlantic, USA
Offline Offline
God Member
*****
Karma: 30
Posts: 515
"Remember kids, the only difference between Science and screwing around is writing it down." - Adam Savage
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, if you look at the data sheet for the L297 controller, you see that one of the suggested circuit configurations (actually the first one) is using the L298 as the driver. You would have to hack the solarbotics module to have the L297 current limit with PWM. You would need to disconnect pins 1 and 15 from the board and somehow connect the flying pins to the rest of a L297 circuit because these are the sense output from the L298 driver that the L297 controller needs.
Logged


UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can a simple delay microseconds do the trick
No because there is no feedback as to the load it is under.

If the goal is just to make a higher voltage power supply act like a lower voltage one then I don't see any reason why plain simple fixed PWM modulation wouldn't work. It would mean the peak torque capability of the stepper motor would be reduced (just as it would be if you reduced the supply voltage). The only reason I'd consider a more complex solution is if you need to vary the available torque - perhaps to extend battery life or something. But just reducing the average current to reduce heat output seems like a pretty straight forward requirement and doesn't IMO need anything more than simple PWM modulation.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When you say "simple fixed PWM modulation", does that mean a micro second delay?
Logged

Pages: [1] 2   Go Up
Jump to: