Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Driving FET.

Driving FET.

2004-01-25 by Wagner Lipnharski

Hi, I am building a 4.2V @ 6A stepper motor (6 wires - unipolar) driver, using the IRL530N or IRLZ24 power N FET. I actually using the Alegro 2398 (twin bridge bipolar driver) dedicated chip for small motors, that chip doesn't stand such 6A current.
As a protection scheme, I am designing a feedback current limit for the FETs, so it won't fry the stepper in case of a mechanical lock or even during steady holding current. The main idea is to measure a 0.05 ohm resistor small voltage drop, connecting FETs drain to ground. The small vdrop is to be compared with an adjusted trimpot voltage at a LM339 comparator. The comparator will cut off the respective FET that had overcurrent. This approach is being used with the 2398, since it has an enable/disable input per side of each bridge.
I already came up with several possibilities, using opto-couplers, or PNP or P Channel (BS110) small switching transistor to fire the FETs, everything under control of an AVR of course, but also with the current limit control by the LM339 and additional circuitry.
Then I thought about the possibility to use some already small dedicated chip for the job of firing the external FET. Something that has current limit sensing, that I can connect to the FET drain resistors, and will cut me some slack in the board and make things better.
Perhaps some stepper motor driver, or a multiple solenoid or small motor driver, enough to have the output as open collector or floating emitter, enough to deal with a pull-up or pull-down resistor at the gate of the IRL530N.
Of course that those small dedicated chips that has "step forward, backward, etc" do not serve, since all the control is being done already by the AVR. All I need is something that can deal with higher voltage at output (20V) and has voltage sensing comparator for current limiting.
I always have the other solutions, using LM339, etc, but why not try something ready...?
+AVRDrive +5V +12V +5V
-------. | | |
| ; | | |
R10k | R1k COIL
| |¯¯¯¯¯| | |
300mV o-----(+)| | | |--' IRF530
| | LM |---o---|--. IRL530N
R620 | 339 | |<-| IRLZ24
| .-(-)| | | w/clamp diode
_|_ | |_____| |
| |
'---------------------o
300mV |
R0.05
|
_|_
R620 could be a trimpot adjusting full span current of 6A over R0.05.
One LM339 houses 4 comparators, so one chip per unipolar motor (4 phases & FETs).
Any known dedicated IC to substitute the LM339 with advantages?
Thanks.
Wagner.

Re: [AVR-Chat] Driving FET.

2004-01-25 by erikc

/* my comments like this. */
Show quoted textHide quoted text
----- Original Message -----
From: Wagner Lipnharski <wagner@ustr.net>
To: <AVR-Chat@yahoogroups.com>
Sent: Sunday, January 25, 2004 17:30
Subject: [AVR-Chat] Driving FET.


Hi, I am building a 4.2V @ 6A stepper motor (6 wires -
unipolar) driver, using the IRL530N or IRLZ24 power N FET.
I actually using the Alegro 2398 (twin bridge bipolar
driver) dedicated chip for small motors, that chip doesn't
stand such 6A current.

As a protection scheme, I am designing a feedback current
limit for the FETs, so it won't fry the stepper in case of a
mechanical lock or even during steady holding current.  The
main idea is to measure a 0.05 ohm resistor small voltage
drop, connecting FETs drain to ground.  The small vdrop is
to be compared with an adjusted trimpot voltage at a LM339
comparator.  The comparator will cut off the respective FET
that had overcurrent. This approach is being used with the
2398, since it has an enable/disable input per side of each
bridge.

I already came up with several possibilities, using
opto-couplers, or PNP or P Channel (BS110) small switching
transistor to fire the FETs, everything under control of an
AVR of course, but also with the current limit control by
the LM339 and additional circuitry.

Then I thought about the possibility to use some already
small dedicated chip for the job of firing the external FET.
Something that has current limit sensing, that I can connect
to the FET drain resistors, and will cut me some slack in
the board and make things better.

Perhaps some stepper motor driver, or a multiple solenoid or
small motor driver, enough to have the output as open
collector or floating emitter, enough to deal with a pull-up
or pull-down resistor at the gate of the IRL530N.

Of course that those small dedicated chips that has "step
forward, backward, etc" do not serve, since all the control
is being done already by the AVR.  All I need is something
that can deal with higher voltage at output (20V) and has
voltage sensing comparator for current limiting.

I always have the other solutions, using LM339, etc, but why
not try something ready...?

/* Why are you returning the LM339 output to +12V when
everything else is +5V?   LM339 is happy with +5V.
One other suggestion:  Place a 120R resistor in series with
the FET gate.  This suppresses oscillations. */

+AVRDrive         +5V   +12V    +5V
-------.           |      |      |
       |           |      |      |
     R10k          |     R1k    COIL
       |        |¯¯¯¯¯|   |      |
 300mV o-----(+)|     |   |   |--'  IRF530
       |        | LM  |---o---|--.  IRL530N
     R620       | 339 |       |<-|  IRLZ24
       |   .-(-)|     |          |  w/clamp diode
      _|_  |    |_____|          |
           |                     |
           '---------------------o
              300mV              |
                               R0.05
                                 |
                                _|_

R620 could be a trimpot adjusting full span current of 6A
over R0.05.
One LM339 houses 4 comparators, so one chip per unipolar
motor (4 phases & FETs).

/* So you're going to have 4 trimpots? */

Any known dedicated IC to substitute the LM339 with
advantages?

/* LM339 is OK.  This might also work and you only need one
trimpot and fewer resistors:
AVRdrive must be high at the same time the comparator is
turned OFF for the FET to turn on.

                      +AVRDrive
                          |
                  +5V     |          +5V          +5V
                   |      |           |            |
                   |      |           |            |
                   |     1k0         COIL         10k
                |¯¯¯¯¯|   |           |            |
    Vref-----(+)|     |   |        |--'  IRF530    |
                | LM  |---o--120R--|--.  IRL530N   o---Vref
                | 339 |            |<-|  IRLZ24    |  (4
places_
           +-(-)|     |               |            |
           |    |_____|               |            |
           |                          |           1k0<-----o
           '--------------------------o            |       |
                                      |            |       |
                                    R0.05         _|_
_|_
                                      |
                                     _|_
*/

Thanks.
Wagner.






Erikc  - firewevr@airmail.net
///
"An Fhirinne in aghaidh an tSaoil."
"The Truth against the World."
        -- Bardic Motto

Re: [AVR-Chat] Driving FET.

2004-01-25 by Wagner Lipnharski

erikc wrote:
>
> /* Why are you returning the LM339 output to +12V when
> everything else is +5V? LM339 is happy with +5V.
> One other suggestion: Place a 120R resistor in series with
> the FET gate. This suppresses oscillations. */
Some FET requires a little bit more "push" than just 5V to turn on.
The 1k pullup to 12V is just to make sure "any" FET would work in this configuration.
I imagine the situation where the IRLZ24/34/44 would be difficult to find as replacement, and the technician just insert a IRF530 (as posted below). 5V pullup at the gate can fire many of the IRLxxx FETs but not many of others. I have seen several FETs not firing even VGS high as 6V. Sometimes is not just the voltage but the kick of it. How fast the pullup can fill the capacitive charge of the FET gate. Using a lower resistor value instead of R1k when connected to 5V or just pull higher voltage at that pullup can solve both situations, higher voltage and faster charge.

>
> +AVRDrive +5V +12V +5V
> -------. | | |
> | | | |
> R10k | R1k COIL
> | |¯¯¯¯¯| | |
> 300mV o-----(+)| | | |--' IRF530
> | | LM |---o---|--. IRL530N
> R620 | 339 | |<-| IRLZ24
> | .-(-)| | | w/clamp diode
> _|_ | |_____| |
> | |
> '---------------------o
> 300mV |
> R0.05
> ; |
> _|_
>
> R620 could be a trimpot adjusting full span current of 6A
> over R0.05.
> One LM339 houses 4 comparators, so one chip per unipolar
> motor (4 phases & FETs).
>
> /* So you're going to have 4 trimpots? */
Not really, the current limit doesn't need to be that precise. Limiting at 5.9A or 6.1A will not change that much in safety for the transistor or the motor, not even for the power supply. The trimpot idea is just in case to find out the better R620 value. Sometimes the problem is not with the voltage divider R10k/R620, but mostly with the R0.05 part and connections. A not so good soldering or terminal oxidation can change easily those tens of milliohm and that will be a problem. Those expected 300mV can change drastically to 400mV with a simple increase in 20 milli ohm in the shunt resistor. Then, beign prepared for the worst, I guess a R1k small trimpot in place of the R620 is not that bad idea. So, answering, yes, probably will have 4 trimpots per motor.
>
> Any known dedicated IC to substitute the LM339 with
> advantages?
>
> /* LM339 is OK. This might also work and you only need one
> trimpot and fewer resistors:
> AVRdrive must be high at the same time the comparator is
> turned OFF for the FET to turn on.
>
> +AVRDrive
> |
> +5V | +5V +5V
> | | | |
> | | | |
> | 1k0 COIL 10k
> |¯¯¯¯¯| | | |
> Vref-----(+)| | | |--' IRF530 |
> | LM |---o--120R--|--. IRL530N o---Vref
> ; | 339 | |<-| IRLZ24 | (4
> places_
> +-(-)| | | |
> | |_____| | |
> | ; | 1k0<-----o
> '--------------------------o ; | |
> | | |
> R0.05 _|_
> _|_
> |
> _|_
> */
Yes, the above is an idea.
I used something similar with the Alegro 2398 part, a common Vref supplied by a trimpot and 339 comparing and feeding the enable/disable pin of the 2398s, the AVR drive comes via the 339 releasing the feedback signal. Implementing the idea in this circuit, to block the motor, the AVR simply overflows the feedback with 5V (4.3V) and it cuts completely the FET.
+5V +5V +12V +5V
| | | |
| | | |
R10k | R1k COIL
| |¯¯¯¯¯| | |
0.3VREF o-----(+)| | | |--' IRF530
Common | | LM |---o-R120-|<-. IRL530N
>R1k | 339 | |--| IRLZ24
| .-(-)| | | w/clamp diode
_|_ | |_____| |
| |
(XA)o---------R10k-----------o
; _|_ ; 300mV |
A 1N4148 |
-AVRDrive | R0.05
o----------' |
_|_
Here, the LM339 will cut the FET whenever it feeds more than 6A to the COIL, or when the AVR supplies a positive level to the (-) pin via de diode. The only bad part here is to ensure that at power on, before the AVR resets and assert the Drive port pins, the motors stay not running erratic. One way to do that would include an extra "NotErratic" circuit, that will be connected to the (X) point at the above circuit.
Perhaps a general "+MotorHold" circuit like that:
+5V
|
|
R2k2
| 1N4148
o---->|---o Phase XA
|
o---->|---o Phase XB
|
o---->|---o Phase XB
|
o---->|---o Phase XC
|
|
o----'
+AVR_MotorHold
The problem is related to the fact that during RESET, the AVR takes its port pins to high impedance state, and that will not take XA point to +5V to ensure motors holding. They can run erratic. They will not run erratic if all phases will suck power at the same time, but anyway it is not desireable to have 24A being pushed into each motor for few moments. What about if the AVR got stuck during reset? Will have a bad power supply soon enough.
The +AVR_MotorHold above applies aprox 3.4V to XA (XB, XC and XD) whenever the AVR is offline (port pins in high impedance). It means the FETs will be cut as long as the AVR does not supply a negative level to the +AVR_MotorHold. As soon the AVR feels it is safe to release motor operation, just apply a negative level to +AVR+MotorHold, and everything will be ok.
That means, each motor will require:
4 x IRLZ44 or similar FET units
4 x 1N4007 (clamp diode)
1 x LM339
8 x 1N4148
1 x R1k
1 x R120
1 x R0.05
1 x R10k
The common VREF being made with;
1 x R10k
1 x R1k Trimpot
Or an extra 1N4148 and a R divider to
ensure better VREF stability.
You see, initialy it seems to be few components, but then, when thinking about everything (and something will always be missing) the coponents population increases significantly.
This is why I thought to use some ready made FET gate driver circuit with current limit and everything else, like enable, input, pwm counter, etc.
Wagner.

RE: [AVR-Chat] Driving FET.

2004-01-26 by Kathy Quinlan

How about some of the dedicated driver chips like the IRL 6130
Regards,
Kat.
Show quoted textHide quoted text
-----Original Message-----
From: Wagner Lipnharski [mailto:wagner@ustr.net]
Sent: Monday, 26 January 2004 1:31 AM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Driving FET.

Hi, I am building a 4.2V @ 6A stepper motor (6 wires - unipolar) driver, using the IRL530N or IRLZ24 power N FET. I actually using the Alegro 2398 (twin bridge bipolar driver) dedicated chip for small motors, that chip doesn't stand such 6A current.
As a protection scheme, I am designing a feedback current limit for the FETs, so it won't fry the stepper in case of a mechanical lock or even during steady holding current. The main idea is to measure a 0.05 ohm resistor small voltage drop, connecting FETs drain to ground. The small vdrop is to be compared with an adjusted trimpot voltage at a LM339 comparator. The comparator will cut off the respective FET that had overcurrent. This approach is being used with the 2398, since it has an enable/disable input per side of each bridge.
I already came up with several possibilities, using opto-couplers, or PNP or P Channel (BS110) small switching transistor to fire the FETs, everything under control of an AVR of course, but also with the current limit control by the LM339 and additional circuitry.
Then I thought about the possibility to use some already small dedicated chip for the job of firing the external FET. Something that has current limit sensing, that I can connect to the FET drain resistors, and will cut me some slack in the board and make things better.
Perhaps some stepper motor driver, or a multiple solenoid or small motor driver, enough to have the output as open collector or floating emitter, enough to deal with a pull-up or pull-down resistor at the gate of the IRL530N.
Of course that those small dedicated chips that has "step forward, backward, etc" do not serve, since all the control is being done already by the AVR. All I need is something that can deal with higher voltage at output (20V) and has voltage sensing comparator for current limiting.
I always have the other solutions, using LM339, etc, but why not try something ready...?
+AVRDrive +5V +12V +5V
-------. | | |
| | | |
R10k | R1k COIL
| |¯¯¯¯¯| | |
300mV o-----(+)| | | |--' IRF530
| | LM |---o---|--. IRL530N
R620 | 339 | |<-| IRLZ24
| .-(-)| | | w/clamp diode
_|_ | ; |_____| |
| |
'---------------------o
300mV |
R0.05
|
_|_
R620 could be a trimpot adjusting full span current of 6A over R0.05.
One LM339 houses 4 comparators, so one chip per unipolar motor (4 phases & FETs).
Any known dedicated IC to substitute the LM339 with advantages?
Thanks.
Wagner.


Yahoo! Groups Links


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 8/01/2004


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 8/01/2004

RE: [AVR-Chat] Driving FET.

2004-01-26 by Dave VanHorn

At 03:24 PM 1/26/2004 +0800, Kathy Quinlan wrote:
>How about some of the dedicated driver chips like the IRL 6130

Pricey, but they work nicely.
Pay careful attention to bypassing and layout.

In my charger, I'm using such a driver. The T26 pumps out 500kHz PWM, and 
the driver snaps that monster fet on and off with edge rates approaching 
20-40 MHz.
That's quite a few amps for a few nS to charge the gate capacitance.

It's one happy fet though, at 20W output it's barely warm.
The inductor next to it is much warmer, but because of space constraints, 
there isn't much I can do there.

Re: [AVR-Chat] Driving FET.

2004-01-26 by Wagner Lipnharski

Kathy Quinlan wrote:
> How about some of the dedicated driver chips like the IRL 6130
>
> Regards,
>
> Kat.

I would love to take a peek in such unit, but can't find it anywhere in the
net, mostly at irf.com.
Don't you hate when a manufacturer website don't give you the numeric order
part/numbers list?

RE: [AVR-Chat] Driving FET.

2004-01-26 by Kathy Quinlan

> -----Original Message-----
> From: Wagner Lipnharski [mailto:wagner@ustr.net] 
> Sent: Tuesday, 27 January 2004 1:31 AM
> To: AVR-Chat@yahoogroups.com
> Subject: Re: [AVR-Chat] Driving FET.
> 
> 
> Kathy Quinlan wrote:
> > How about some of the dedicated driver chips like the IRL 6130
> >
> > Regards,
> >
> > Kat.
> 
> I would love to take a peek in such unit, but can't find it 
> anywhere in the net, mostly at irf.com. Don't you hate when a 
> manufacturer website don't give you the numeric order 
> part/numbers list?

Sorry Mate, I gave the wrong part number it is an IR2131 it has 3 high
side drivers and 3 low side drivers. Here is the selector page that
would help you more:
http://ec.irf.com/v6/en/US/adirect/ir?cmd=catNavigateFrame&punchInID=333

Regards,

Kat.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 8/01/2004

Re: [AVR-Chat] Driving FET.

2004-01-27 by Ken Holt

Hi Wagner -
I have been driving power FETs in 2 projects this past month, both
with lower voltage and power than yours.  I'm down in the 3V / 1A
region, and have had good results with the Fairchild FDG311N
and FDG312P, which were used in one project as a bridge driven
directly from a PIC18, and in the second project, only the 311N
is driven, for powering a laser diode; contolled from a Tiny26.

The LD needs current sensing and feedback, but little power
can be spared for the sensing resistor.  I thought that I was
cutting it too close to zero ohms with my .1 ohm resistor, but
you're even less with 50 mohm.  I would think with higher voltages
and a bigger power budget that you would use a higher value resistor.
These smaller R's are hard to use because the effective resistance changes
so much (proportionately) because of board placement and soldering
variations, etc.  My resistor is placed between the FET and the LD.

I use use the differential x20 A-D inputs on the tiny26 to measure the current
during pulses, and feedback a very slow correction voltage to the LD supply.

Ken Holt




You Wrote:


Hi, I am building a 4.2V @ 6A stepper motor (6 wires - unipolar) driver,
using the IRL530N or IRLZ24 power N FET.  I actually using the Alegro 2398
(twin bridge bipolar driver) dedicated chip for small motors, that chip
doesn't stand such 6A current.
  
As a protection scheme, I am designing a feedback current limit for the
FETs, so it won't fry the stepper in case of a mechanical lock or even
during steady holding current.  The main idea is to measure a 0.05 ohm
resistor small voltage drop, connecting FETs drain to ground.  The small
vdrop is to be compared with an adjusted trimpot voltage at a LM339
comparator.  The comparator will cut off the respective FET that had
overcurrent. This approach is being used with the 2398, since it has an
enable/disable input per side of each bridge.
  
I already came up with several possibilities, using opto-couplers, or PNP
or P Channel (BS110) small switching transistor to fire the FETs,
everything under control of an AVR of course, but also with the current
limit control by the LM339 and additional circuitry.
  
Then I thought about the possibility to use some already small dedicated
chip for the job of firing the external FET.  Something that has current
limit sensing, that I can connect to the FET drain resistors, and will cut
me some slack in the board and make things better.
  
Perhaps some stepper motor driver, or a multiple solenoid or small motor
driver, enough to have the output as open collector or floating emitter,
enough to deal with a pull-up or pull-down resistor at the gate of the
IRL530N.
  
Of course that those small dedicated chips that has "step forward,
backward, etc" do not serve, since all the control is being done already by
the AVR.  All I need is something that can deal with higher voltage at
output (20V) and has voltage sensing comparator for current limiting. 
  
I always have the other solutions, using LM339, etc, but why not try
something ready...?
  
  
  
+AVRDrive         +5V   +12V    +5V
-------.           |      |      |
       |           |      |      |
     R10k          |     R1k    COIL
       |        |¯¯¯¯¯|   |      |
 300mV o-----(+)|     |   |   |--'  IRF530 
       |        | LM  |---o---|--.  IRL530N    
     R620       | 339 |       |<-|  IRLZ24
       |   .-(-)|     |          |  w/clamp diode
      _|_  |    |_____|          |
           |                     |
           '---------------------o 
              300mV              |
                               R0.05
                                 |
                                _|_
  
R620 could be a trimpot adjusting full span current of 6A over R0.05.
One LM339 houses 4 comparators, so one chip per unipolar motor (4 phases &
FETs).
  
Any known dedicated IC to substitute the LM339 with advantages?
  
Thanks.
Wagner.

Re: [AVR-Chat] Driving FET.

2004-01-28 by MuRaT KaRaDeNiZ

internal clamping diodes of the IRF530 like
transistors are of fast recovery type, as documented,
so supplying external clamping diodes (1n4007 in your
part's list ) is not needed, and but if you insist on
using them, try to use fast recovery shottky ones.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

Re: [AVR-Chat] Driving FET.

2004-01-28 by Wagner Lipnharski

MuRaT KaRaDeNiZ wrote:
> internal clamping diodes of the IRF530 like
> transistors are of fast recovery type, as documented,
> so supplying external clamping diodes (1n4007 in your
> part's list ) is not needed, and but if you insist on
> using them, try to use fast recovery shottky ones.

Exactly, I was trying to get the partnumber for fast recovery units.
The main issue is allow protection for *any* possible FET transistor to be
plugged there.
We never know what will happens in the field.  A bad choice replacement
transistor and puff.
A simple $0.50 diode there will not harm, and can save the day in case of a
bad replacement.

Thank you for calling up the issue.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.