2 questions about bipolar stepper motor drivers

Thread Starter

CVMichael

Joined Aug 3, 2007
419
Currently I am using L297 with L298 to drive the steppers for my CNC.
The transformer to power each motor is 13.7V, (I am not sure how many amps, but I think it's at least 5 amps). Each motor (3 of them) is connected to it's own transformer.

Right now I get about 300 RPM, higher than that the motor stalls.
I wanted to increase the power so that I can get faster RPM, so I doubled the voltage using the rectifier attached. I measured the output voltage, and it showed 39V, the L298 chip fried in like 2 seconds ! :(

The L298 data-sheet says that it can take up to 46V, so why did it fry ?

The motors that I am using are Nema23 M311 (for z axis), and also Nema23 M254 (for X & Y axis)

Second question: Do you know any chip that is better than the L298 (that can take up to 5 amps) for driving my motors ?

If you want to see my CNC, I posted a video with it in action on YouTube: http://www.youtube.com/watch?v=m2CYttY_xPg
The speed in that video is about 50% (to make sure it does not miss steps)
 

Attachments

rjenkins

Joined Nov 6, 2005
1,013
If you increase the voltage but also add a current limiting resistor in series with each winding to keep the DC current to the same level, you should get better speed and dynamic response.
 

SgtWookie

Joined Jul 17, 2007
22,230
Hi CVMichael,

How do you have your steppers wired; series or parallel?

The M311's, if wired in series, should work OK at 2.5A, they'll have 1.6 Ohms resistance. During hold, they should average 4v across the winding. The L298 drops several volts across itself even when on, so with a 13.7v supply, you might have a max of 10.7v when the bridge is trying to get the current flowing through the windings. You will need large heat sinks on your L298's.

The M254's would also need to be wired in series; for 2A @ 2 Ohms, 4V when idle (holding).

The big question here is how do you have the L297/L298 pair wired up?

What value are you using for the Rs1, Rs2?

If you post your schematics of those portions of the driver, it will help us help you quite a bit.

The relationship between the L297 and L298 took me a few days to figure out at first. Once you "get it", it's reasonably easy.

As far as other IC's, I found the TB6560AHQ interesting. Digikey sells them. Proper heat sinking is mandatory, or you'll burn them up very quickly.
[eta]
See the TB6560AHQ Usage Considerations.pdf, attached.
 

Attachments

Thread Starter

CVMichael

Joined Aug 3, 2007
419
Hi SgtWookie,

"You will need large heat sinks on your L298's.", yup, if you look at the video I posted on YouTube, you can see the L298 attached to a large "L" shaped aluminium 1/8" think sheet. The L298 gets really hot when the motor is not moving (holding), or moving very slowly, but it gets cold when it's moving.
I programmed the microcontroller to disable the driver after a few milliseconds of non use, and enables it back a few ms of when it will be use, essentially when it gets data to move, it delays a few ms before it starts moving again. So now the L298 get's a little bit worm to the touch, and the motors are almost cold.

I don't have any Circuit Design software, I looked up on the net, and installed TinyCAD but it's way too limited on the parts.

Anyways, I found a shematic that is very close to what I have here, (see attached schematic)
But I don't think I have the same resistors for the vref, I will check those when I get home.
For the diodes I am using BYV27-100, and the motor were connected in series.

Since you mentioned about the motors if they are conencted in series or parallel, I tried to see how it is in parallel, and actually I think it's better... I was able to increase the RPM by 30.
Actually I was wrong before with the RPM. Before I had ~270RPM, and NOW I have ~300 RPM when the motors are in parallel.

If I increase the speed gradually, I was able to go up to 556 RPM, that was really enjoying to watch them go so fast :D

What is the normal RPM for these motors used on a CNC ?

By the way, the resistors are 0.5 ohms ceramic, 5Watt.
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
OK, let's look at Rsense vs Vref when you have the motor wired in series.
Your max current is then 2A. 2A/0.5 Ohms = 1V. This means that you also want Vref set to 1V, as that will keep the current through the motor limited to 2A.

If your resistors are 2.2k and 10k as shown in the schematic, then your Vref will be 5v*(2.2k/(10k+2.2k)) = 0.9V. 0.9v/0.5 Ohms = 1.8 Amperes current through the motors. You would actually need a 2.5k and a 10k resistor to get 5v*(2.5k/(10k+2.2k))=1.0v Vref, and 2A current through the motor.

However, you now have them wired in parallel. This will help get the motor up to speed more quickly due to the effective inductance being cut in half, but you actually need 4A current now. This is beyond the capability of the L298 H-bridge. You would need to use a pair of them per motor, or change to a different H-bridge altogether.

Ramping the stepping rate up and down will allow you to reach higher speeds without skipping steps.

Your max RPM/step rate is going to depend on your motor and the amount of force that's needed to move the tool/pen when it's doing work. Stepper motors have very high torque at low speeds, but as the speed increases, torque drops off rather dramatically.
 

rjenkins

Joined Nov 6, 2005
1,013
For any setup using stepper motors, there is a speed that you can start and stop directly from, and another far higher speed that the system will run at.

The speed profile for fast positioning should be trapezoidal - the motor should start at low speed and ramp up to maximum, then ramp down again as it approaches the target position, so it's running slow enough for a dead stop in position.
 

Thread Starter

CVMichael

Joined Aug 3, 2007
419
Thank you SgtWookie,
I can't wait to get home to check the resistors, and the voltage to make sure it is correct.

...This will help get the motor up to speed more quickly due to the effective inductance being cut in half...
That sounds good, I think I wanna keep them wired parallel then....

...This is beyond the capability of the L298 H-bridge. You would need to use a pair of them per motor...
Do you have an example schematic for that ?

...or change to a different H-bridge altogether.
The TB6560AHQ you mentioned before, I see it has a peak of 3 amps, so it's still 2 amp short of the 5 amp that the M311 can take.

What H-bridge do you recommend for my motors (if I wire them in parallel) ?
 

SgtWookie

Joined Jul 17, 2007
22,230
That sounds good, I think I wanna keep them wired parallel then....
You'll need 4A current instead of 2A then.

Do you have an example schematic for that ?
Not offhand. However, it would be the exact same as your existing L297/L298 schematic, except you'll need two of everything per motor, as you need one complete bridge per winding.

When you had the windings wired in series, you effectively had just 2 windings.

But now you have 4 windings. The L298 can't source/sink more than 2A continuously, so you'll need another pair of L297/L298 IC's, or use a different driver.

The TB6560AHQ you mentioned before, I see it has a peak of 3 amps, so it's still 2 amp short of the 5 amp that the M311 can take.

What H-bridge do you recommend for my motors (if I wire them in parallel) ?
Sorry, don't have a recommendation offhand. 5A per phase is a good bit of current for a single IC that contains two complete H-bridges.
 

Thread Starter

CVMichael

Joined Aug 3, 2007
419
Hi SgtWookie,

I modified my schematic for the stepper motor driver, I changed it with 2 L298 in parallel.

I also did what you said here, and I changed the enable pin to always ON, and instead I'm lowering the Vref.

Can you please take a look to see if I have any mistakes ?

Now that I have 2 L298 in parallel, should the Vref stay the same ?

Also, I did not pay too much attention to the Pin 11 (Control) of L297 before, the data-sheet says:
Control input that defines action of chopper.
When low chopper acts on INH1 and INH2; when high chopper
acts on phase lines ABCD.
So what is better ? when it's high or low ?

By the way, the 2 motors might be missleading, I made the schematic like that because when I make the PCB board I want to make a jack for series and also for parallel, but only one motor will actually be connected at any one time.

[Edit]
I measured the frequency at Pin 16 (OSC) of L297, and it is 17KHz, is that the correct frequency ?
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Michael,
I'm currently (sic) investigating some better options than using the L297/L298. In my opinion, there is just too much power being dissipated across the L298's to make them useful. You will continue to be plagued with heating problems vs motor performance.

The basic problem with the L298 is that the bridge is built from Darlington transistors rather than MOSFETs. Therefore, there will always be a rather high Vce on both the high and low sides of each half-H bridge, resulting in a high power dissipation in the package. Losing 4v-5v across a bridge driver used to be the norm, but is no longer acceptable.

MSKennedy has an interesting line of drivers:
http://www.mskennedy.com/store.asp?pid=9949&catid=19680
and they have a sales rep in Toronto:
http://www.mskennedy.com/store.asp?pid=10908&catid=19680
(see the bottom of the above page, on the right).

There is no pricing information available online.
 

Thread Starter

CVMichael

Joined Aug 3, 2007
419
Hi SgtWookie,

I never worked with MOSFETs before.
Do you have an example where a microcontroller is connected to MOSFETs to drive a stepper motor ?
 

SgtWookie

Joined Jul 17, 2007
22,230
Michael,

MOSFETs are cool. You should get familiar with them.

The way you want to use them is as a voltage controlled switch.

I believe you understand BJT's pretty well, correct?
And you know that a relatively small current on the base controls a relatively large collector current, right?

If you want to make a rough comparison between a BJT transistor and a MOSFET, they have three terminals.

Rich (BB code):
MOSFET   BJT
Drain  = Collector
Gate   = Base
Source = Emitter
But, MOSFETs are controlled by the voltage on the gate, in reference to the source terminal, expressed as Vgs.

The gate of the MOSFET is like a capacitor; it takes current to charge it up, and current to discharge it. The gate charge is expressed in datasheets as nC, or nano Coulombs. See Wiki's entry on Coulombs.

The three really important things to look at with MOSFETs is their Vdss rating (maximum voltage from the drain to the source), their Rds(on) (lower is better) and their total gate charge, expressed in nC, usually reported as Qg.

Very generally, you want a low gate charge and low Rds(on) so that you can turn the MOSFET on and off very quickly. The higher in Vdss rating you go, the higher your Qg and Rds(on) go. It can be pretty bewildering in the beginning to make sense out of all of the numbers.

uC's have a pretty limited current source/sink ability. In order to switch MOSFETs on/off quickly, you want to use a gate driver. Since you are looking at an H-bridge configuration (actually, dual H-bridge per motor) you will need four half-H drivers.

I'm kind of running out of time at the moment.
 

SgtWookie

Joined Jul 17, 2007
22,230
Last edited:

Thread Starter

CVMichael

Joined Aug 3, 2007
419
Hi SgtWookie,

You gave me quite some homework :)

I got the kit K158, and I played around with it a bit. I don't like that I don't have too much control like to turn the power off (or half power), and no r-sense, no PWM ...
I also tried to make the H-Bridge connected to a microcontroller, I tried to make the H-Bridge from the K158 kit on a test board when I found out they made a mistake in the schematic, the pins 2 & 3 (Drain & Source) are switched for MOSFET MTP2955. Took me a while to figure that out, especially when this is new for me. (I still could not get it to work, but I want to try "debugging" it more until I post here for help about it)

Also, I went to local electronics store to buy more parts for this schematic, and in the same section with MOSFETs they put the MDJ2955 transistor, and I bought a couple of those thinking that it is the MOSFET I need... Stupid people, they work in an electronics store and they don't know anything about electronics !!!! (I had other similar problems with them to back that up)

Anyways... from the link you gave me before (MSKennedy), I like the MSK3014 most because it is 10 Amps, and it seems easy to use. I can add my own r-sense, and PWM with a fast microcontroller.

Do you think MSK3014 is a good choice ?

I don't see how to order on their web-site, so I will e-mail them and ask.
 

SgtWookie

Joined Jul 17, 2007
22,230
Hi SgtWookie,

You gave me quite some homework :)
It'll keep you off the streets for awhile. :D

I got the kit K158, and I played around with it a bit. I don't like that I don't have too much control like to turn the power off (or half power), and no r-sense, no PWM ...
There are quite a few things that are wrong with that H-bridge design, beginning with using standard-level MOSFETs instead of logic level MOSFETs, mismatched MOSFETs, MOSFETs that have a HUGE gate charge driven by woefully inadequate 4000 series CMOS ICs ... the shoot-through would probably eat those upper MOSFETs like candy.

I also tried to make the H-Bridge connected to a microcontroller, I tried to make the H-Bridge from the K158 kit on a test board when I found out they made a mistake in the schematic, the pins 2 & 3 (Drain & Source) are switched for MOSFET MTP2955. Took me a while to figure that out, especially when this is new for me. (I still could not get it to work, but I want to try "debugging" it more until I post here for help about it)
So, do you want to try to troubleshoot it?
It really needs a complete re-design.

Also, I went to local electronics store to buy more parts for this schematic, and in the same section with MOSFETs they put the MDJ2955 transistor, and I bought a couple of those thinking that it is the MOSFET I need... Stupid people, they work in an electronics store and they don't know anything about electronics !!!! (I had other similar problems with them to back that up)
It's unlikely that you will fiind an electrical engineer working in an electronics parts store nowadays. Also, the sheer number of MOSFETs and transistors available now makes such mistakes relatively easy. You really have to look at the datasheet for the specific part numbers for the specific manufacturer in order to determine what the part really is.

Anyways... from the link you gave me before (MSKennedy), I like the MSK3014 most because it is 10 Amps, and it seems easy to use. I can add my own r-sense, and PWM with a fast microcontroller.

Do you think MSK3014 is a good choice ?

I don't see how to order on their web-site, so I will e-mail them and ask.
The MSK3014 is basically just four matched MOSFETS connected in an H-bridge configuration. There is no driver circuit provided for the gates.

You would need to buy or build your own gate drivers. They need to be able to source/sink a good bit of current (say, at least 200mA) so that the H-bridge has very short switching times; otherwise the bridge will make a good room heater for a brief peried of time.

If you want PWM control and automatic current limiting, you will need to figure out a circuit to do so to switch the P-ch MOSFETs on and off.

You will also need to add external fast-recovery diodes to decrease heat dissipation in the package. Good heat-sinking is mandatory. An old copper Pentium heat sink with a fan could be a good choice.

Gee, I thought I mentioned that they have a distributor in Toronto?
Click on this link:
http://www.mskennedy.com/store.asp?pid=10908&catid=19680
Scroll to the bottom of the page. There is a telephone number for the Toronto office, bottom right corner.
 

Thread Starter

CVMichael

Joined Aug 3, 2007
419
Gee, I thought I mentioned that they have a distributor in Toronto?
Not anymore it seems, I received the reply to the e-mail I sent them.
This is what I sent:
Sent to: afx@videotron.ca (Montreal Office)
I want to order a couple of MSK 3014 part from your website.

How much is each ?
How do I place an order ?
Can you give me a quote ?


I first sent an e-mail to salessupport@ohmage.ca and I got a "Delivery Status Notification (Failure)", so I think you should update your website with the correct e-mail.
And this is what I got back
Unfortunately OHMAGE does not represent MS Kennedy anymore. Thanks for your comprehension.
So i'm out of luck with this one...
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
If you want to get going with the L298's, then wire your steppers in series, and wait until we figure out a better way to drive them using the parallel configuration.

I'm in a bit of the same dilemma, as I have several NEMA23 steppers around here, plenty of MOSFETs to use, just not a wonderful way (wonderful = cheap, easy, full control w/PWM, no shoot-thru, etc) to drive them as of yet.

I had a few new arrivals; PIC16F1933's. These are new and darn nifty if I say so myself.

I'm thinking of using those to control some FOD3180 opto-gate drivers that I found when trying to lend RobbJohnson a hand with his tank motor driver project; Robb was nice enough to send me a couple of them.

I'm going to be using IRLR7807 N-ch power MOSFETs (Vdss=30,Rdson=13.4m,Id=30A,Qg=7nC; because I happen to have quite a few, and pretty good specs for the project even though they are a few years old; someone starting in could use IRLR7821's that have somewhat better specs in the same footprint) and building a SMPS for the motor and high-side supply (I have several IC options on hand here).

But I'll be starting from the ground up.

Want to play along? :)
 

Thread Starter

CVMichael

Joined Aug 3, 2007
419
Want to play along? :)
Sure, but I will probably be watching mostly... unless you need help with programming in C for the microcontroller (I use mikroC PRO)

I got the H-Bridge to work ! yeeey :). I used the MOSFETs from the K158 kit, but it turns out that 2 of the MTP2955 were damaged, and that's why I could not get it to work before. I tested it with a small DC motor.
Now I don't have MOSFETs to make another H-Bridge so I can plug a stepper.

I plan to go today to another local electronics store to see if I can find any MOSFETS. I called them and they said they have "old IRF MOSFETS" ? hmmm will see...
 
Last edited:

coldpenguin

Joined Apr 18, 2010
165
If you want to see my CNC, I posted a video with it in action on YouTube: http://www.youtube.com/watch?v=m2CYttY_xPg
The speed in that video is about 50% (to make sure it does not miss steps)
Impressive, I am jealous.

I have always wanted to make a CNC cutter for doing balsa wing ribs, but never had the opportunity.
I don't even get the opportunity to use the balsa wing ribs in planes any more.
 
Top