At what freq can i drive a irf520n directly from an avr ?

Go To Last Post
62 posts / 0 new

Pages

Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guyzz

I Just got some irf520n off ebay (220 pcs for $25)
http://www.irf.com/product-info/...

They seem to be "drivable" , by an AVR Vgs(th) 2.7 - 4v

But as you prob. have discovered im not an electronics wizzard :oops:

I was wondering if i read "curves" at Fig. 1/2/3 correct , if i assume i could switch 3A@20uS with an AVR :?:

Well Fig 3 seems to indicate i can switch 3A @Vgs-5v.
So if i just use it at "low speed" 1..10Hz it moght be ok.

Fig 1 seems to indicate that it can do the same @20uS
But can the AVR drive that or do i need a driver / pushpull ?

What would be a "realistic" A/Freq for driving direct by AVR ?

If i need a driver , can i make one from the below comps ?

I have a reel of 2N7002-LT1 (N-Fet) www.spelektroniikka.fi/kuvat/2N7...

And a reel of BSP225 (P-Fet) http://www.nxp.com/documents/dat...

Thanx for any info ...

/Bingo

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

3 More

Edit: Cool ...

Just discovered that "Gimp" (Linux) can read .pdf , and then export as "whatever" , here .png

/Bingo

Attachment(s): 

Last Edited: Fri. Jan 8, 2010 - 08:26 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will try to give some answers. Fig 1,2 and 3
are measured with 20us pulses. It is only
a measurement, the 20us have nothing to do
with the speed you can achieve. Semiconductors
are often measured / specified using pulses, because
otherwise they would overheat.

The mentioned MOSFET has a threshold-voltag somewhere near 4.5 Volts. That means, that you need 4.5V so
that c onduction starts. But at that gate voltage
already for small currents (1Amp) the drain/source
voltage rises and the MOSFET behaves lik a resistor
that is much larger than the specified RDSon.
So I would drive such a transistor using 10 to 15
Volts.

The speed depends on your driver. With self built
drivers I thin switching-times below 1us are easy
to get. Getting switching-times below 100ns
requires good gate-drivers. These I would buy
ready made.

At what speed/frequency do you want to operate ? What is the application ?

Added Later:
Driver 5 is not ok. The gate must be 10V above
the Drain to turn the MOSFET on. That is not reached in
that circuit.

If you would use the MOSFET like a npn with a grounded Source and the lamp in the lamp between
Drain and Plus 12V it should work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Edit: Thanx Ossi & Jim below :-)

Does that mean driver 1..4 would be useable ?

What Fig. did you use for the RDSon ?

And another thing the BSS225 is a D-Mos , is that just a Buzzword ?

/Bingo

Last Edited: Fri. Jan 8, 2010 - 08:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are two problems, here.

One, as ossi discussed, is the matter of gate threshold. It might sound as though 4.5V is OK, but it is only barely "OK". That is the gate voltage where it just starts to conduct (the spec sheet will say how many mA). In order to get it full on, you need to supply a gate voltage several volts higher. You will never reach an an resistance even close to RDSon with 5V of gate drive.

The second issue is switching speed. That depends on how much current you can deliver to the gate while it is switching. The less current you can provide, the slower it will be. Here is where the 4.5V threshold will bite you a second time. The high gate current is mostly needed close to the threshold voltage. So, you have your 5V AVR, You are trying to deliver current into a load that is 4.5V. If you look at your chip's typical output drive characteristics, you will see that is will provide only a few ma at best. To switch fast, you need 100's of mA, if not amperes!

Your FET1 circuit WILL drive the FET hard on since it supplies 12V. However, it will be pretty slow. With the bipolar off, and the gate sitting close to 4.5V, the current available to charge the gate is (12V - 4.5V)/(470 + 100) = 7.5V/570 = 13ma. That is better than what the AVR port pin could supply, but nothing great. However, if you are just turning a load switch on and off (no PWM), it should do fine.

Your push-pull driver in the first message has the difficulty of making sure that both transistors are not on at the same time. This is harder than it appears, and leads to current (sometimes called "shoot through") going straight from Vcc to ground, and getting those two bipolars hot (if you switch them at a high frequency).

Generally, instead of trying to cut corners on this sort of thing, you are much better off purchasing half-H or full-H drivers!

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

While Ossi ansvered i searched a bit and found this page

Actually a good page i think (ehh .. i have no clue yet) , for a mosfet newbie
http://robots.freehostia.com/Spe...

Lots of good stuff there , listing for "search"
http://robots.freehostia.com/

Opto
http://robots.freehostia.com/Spe...

Shiftregister(s) In/Out
http://robots.freehostia.com/Sof...

Motor Intro
http://robots.freehostia.com/Mot...

Motor Speed
http://robots.freehostia.com/Spe...

Heatsinks
http://robots.freehostia.com/Hea...

EMC
http://robots.freehostia.com/Emc...

Batteries
http://robots.freehostia.com/Bat...

Solenoids and Actuators
http://robots.freehostia.com/Sol...

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did not look into drivers 1..4. Perhaps later I will do. D-MOS is (AFIK) a technology to build Power-MOSFETS.

What is your application ?
Do you have an oscilloskop to watch switching ?

Driver 3 seems ok, but notice that it drives a p-channel MOSFET !

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Ossi

I have no application yet i'm just "warming" up to try FET's instead of BJT's.
And i wondered if those irf520n was a "total waste of money" 220 pcs for 17 Eur.

Well i the thing i need now is to switch a "Burglar Alarm" 12v Siren (150ma) to much for my 2N2007-LT1 (115 ma). but i also have some 2N2222 NPN. But here i do hope the "frequency will be 0 Hz" :-)
In worst case as an on/off switch (think the law says max 30 sec on) , then it must "shut up" until another "activation" is triggering it again.

But i might want to try driving some IR LED's (2 in series , directly or maybe via a smal resistor to vcc) @ 36 - 40 Khz , but it doesn't seem like the irf520n's are optimal for that.

Yes i have a TDS-320 & just reveived my New Rigol DS-1052E yesterday :-)
From (Santa to me ....)

Edit: Ehh isn't driver3 (powerstage) for a P-fet ?
Or are there actually any difference in the driver ?

Edit2: I do beleive Jim meant that fet1.png is "driver5"
Jim says it will do as an On/Off switch , and as i
read it Ossi says it doesn't :?

/Bingo

Last Edited: Fri. Jan 8, 2010 - 08:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

200 POWER-MOSFETS is certainly no waste of money ! I recommend strongly to get the hands dirty and try
some circuits.

Switching some LEDs with current below 0.5A
or the burglar alarm is probably ok with
a gate-voltage of 5 Volts.
Simply connect the gate to the AVR. Source connected
to GND and between drain and +12V (or so) the LEDs including current limiting resistor.
Additionally connect a 100k (or so) resistor
between gate and GND. This resistor keeps
the MOSFET off during resets. Switching up
to a few kHz is probably ok with this simple setup.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Ossi

I will try to get my hands dirty as you say :-)
And if i waste a FET or 2 , i'll survive.

I'll start by reading this
http://robots.freehostia.com/Spe...

And maybe then ask a lot of new questions :-)

Ps: Could you use some of the apps i mentioned in the Linux thread ?

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Up to now I did not proceed with my LINUX
experiments. But I probably will do it this
weekend. Thank a lot for the good advice.

If you start with the MOSFETS I would use a
current-limited lab supply ( limited to 1A or so).
Then you can hardly destroy a power mosfet.

And further questions are welcome. I think there
are some freaks around that can answer them !

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Uhmmm ....

Just had a "nasty idea" :-)

A Max232 (i have here) , can do 115 Kbps , could i use it as an inverting fet driver ?

If yes
Should i use TX for the Gate , and just GND
Or
Could/Should i also use the negative voltage ? (For fast Off)

Could i then just use 5v at the Drain ?
Or was here something about a Gate/Drain voltage limit

Well i'll better start reading that link :-)

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Exotic idea, but I don't think the FET likes negative voltage, and RS232 drivers have slew-rate and current limiting outputs. So while higher voltage sounds nice, it will take forever for the gate capacitance to charge.

Edit:
I was wrong, Vgs(max)=+/-20V, so MAX232 output would drive it voltage-wise.

Edit:
MAX232 transmitter has current limiting of max +/- 10mA. So even AVR can charge and discharge the gate capacitance faster, but just not enough voltage. Also MAX232 output slew rate is 30V/us.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Jepael

So if i tie both TX & RX drivers , i'll get 20ma , and at 30v/us that would be just below 1us to reach +/- 12v
Isn't that 1Mhz ?
I think a Max232 wont like more than 115Kbps maybe due to the above. I seem to remember that there are other MAX drivers to use if you want to run really fast.

I also have 50 Max202 , they have no internal pullups but are SMD. Bad to use for a test on a breadboard , but maybe they are "faster".

I think i'll give it a go :-)

I just have to find out how to apply both TX & RX to the Gate wo short circuiting them , or could i tie the gate to the negative supply via a pull-down ? ...... hmmm ......... that would destroy my rise time ... hmmm better read that Max232 DS , to see what level RX is at when idle & TTL On/Off.

Thought

Quote:
.... if i am using complementary PWM outputs (think tinys can do that, can a M48 ?) , would those drive TTL RX/TX properly ....
Hmmm ... Think connecting RX & TX directly to the Gate is a bad idea , no tristate.
Pulldown might be better ....

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This URL was actually quite good
http://robots.freehostia.com/Spe...

Now i understand that the DS , figures are actually more important than the "numbers" ...
The numbers are "marketing values" (well not all of them but ...) , and if you want it to work in real life. Learn what curves to extract info from.

Edit: I think i am beginning to understand a bit about driving a mosfet.

If i use the Max232 @ 10 or 20ma , i would "suffer" terrible switching losses at high frequencies, as the FET would be in the switching state for a long time during each transition.
Until the gate capacitance is fully charged or discharged.

But if i just use a 10ma TX output (+10v) for a "plain on/off" i would only "suffer" once , and the heat dissipation would prob not be a problem.
The advantage of doing that would be that i can switch the "full" Id(amps) at slow speed (1hz or less).

Did i get that correct ?

Quote:
I'll keep reading a bit more , and play on sunday.

Wifey have made an appointment on my behalf tomorrow. I gotta "date" with my Skill Drilling machine & some shelves all around the appartment :?

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try driving directly from the AVR. I'm doing this with a IRF540 and it can do more than 100 kHz easily with a tiny45 (using PLL). I'm doing about 35 kHz with a mega8.

These pictures are without load. The behave a little better this way.

Attachment(s): 

Felipe Maimon

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:

If i use the Max232 @ 10 or 20ma , i would "suffer" terrible switching losses at high frequencies, as the FET would be in the switching state for a long time during each transition.
Until the gate capacitance is fully charged or discharged.

But if i just use a 10ma TX output (+10v) for a "plain on/off" i would only "suffer" once , and the heat dissipation would prob not be a problem.
The advantage of doing that would be that i can switch the "full" Id(amps) at slow speed (1hz or less).

Did i get that correct ?

Yes, you are definitely getting the hang of it. Weak current drive on gate causes slow switching, and you have switching losses, as the FET is between on and off states for a long time.

But it is hard to determine what is too slow or fast enough. What amount of current were you planning to drive, and what is the voltage?

Because if you do drive too slowly, have big current requirement and big voltage to drive over the load, trying to switch too slowly may mean the FET blows when you try to switch on even the first time, because instantaneous heating is too much, while average heating would still be almost 0.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@fmaimon
Thank you for the pictures , now i know how it ought to look.
What Vds are you using , and what current are you switching ?

@Jepael
I really haven't got an app yet :-)
I'll start out with switching 5v@1A max @38Khz (Peak) , some IR diodes.

Later if i haven't burned them all , i'd like to make a dimmer for my 3 x 20w halogen spots (12v) , but there i will have "Suficcient gate drive current" , from the halogen trafo for Vgs.
For the time being i have a real Iron Trafo , and it's humming quite loudly at times (mechanical mount i think). Was wondering if dimming would introduce even more humming as the load now is PWM'ed.
I was hinking about replacing it with a Switcher.

I understand there was a "limitation" on the Vgs voltage (+/- 20v) , that has to be obayed.
I suppose thats the Vgs +/- 20 under the Max section.

Is there such a limitation on Vgs vs. Vds , i know there is a max Vds (and that Vds has influence on the heat dissipation I=U/R). I actually know Ohms law :-). But i mean as i am understanding it , Vgs has influence on Ids (because it controls if the fet is turned fully on and therefore Rds ==> Heat in fet).
But if i had s setup that ran ok with Vds@12v , would there be any probs. setting Vds to 5v (same Vgs) ?. Right now with my limited knowledge , i can only see a improvement in the Heat dissipated.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will try to explain some MOSFET basics.

The gate/source voltage is typically limeted to be
smaller than +/- 20V. If you make it bigger
(for a short moment) the oxide layer between
gate and the channel will break down nad the MOSFET
is destroyed.

Similar thing happens if you apply a voltage
between drain and source exceeding the maximum.
The max. drain/source voltage is a design parameter
and you select it according to your application.
Typically high-voltage MOSFETs have a higher
RDSon resistance, so you must make a compromise.

Now assume the following simple circuit:
drain is grounded. gate is driven by a gate-driver
that can not supply a high current. Source is
connected to a 10 Ohm resistance. The other
resistance connection goes to +50V.
Initially the gate voltage is 0. No current flows.
The drain/source voltage is 50V. If the max. drain
sourc voltage would be below 50V we already kill
the MOSFET here due to drain/source overvoltage.

Now for simplification we assume we could in no time
lift the gate to 12Volts. This will turn the MOSFET
full on. If now the MOSFET has an ON-resisance RDSon
of say 0.5 Volts, a current of 50V/(10 Ohm+0.5 Ohm)=4.76A will flow. The losses in the MOSFET will be 0.5Om*(4.76A)^2=11.33W. If
we don't have a good heatsink the MOSFET will
heat up in some time and it will be killed by
thermal death. But with a good heatsink 11W in
a TO220 housing is no problem.

No we change the scenario an assume we operate the MOSFET with a gate voltage of sav 4.5V. At this voltage the MOSFET is not fully turned on. Now the
MOSFET limits the voltage to say 2A. At one amp
drain current the resistor gets a voltage drop
of 10 Ohm*2A=20V. The MOSFET drain source voltage
is now 50V-20V=30V and the MOSFET losses are
30V*2A=60W. I the heatsink was big enough for
11, but not for 60W, the MOSFET may now die
the thermal death.

This show, that during times with medium currents
you may have high losses in the MOSFETs. During
switching you go simply through this region
and you have to pass it fast enough, to not
destroy the transistor.

Comments and questions are welcome

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good explanation, Ossi.

I only add that while the FET is turning on, the maximum power dissipated is when the FET is exactly halfway on. Assuming the load is resistive, a 12V 2A load, the peak power is when Vds=6V and Id=1A which is 6 Watts. When the FET is off, Vds=12V but Id=0, thus no power dissipated, and when the FET is fully on, almost not power is dissipated, as Vds is almost 12V and Id is almost 2A because the FET has internal resistance of less than 0.1 ohms or so and thus voltage over this resistance as current flows through it. So the only dissipated power in on state is Vds*Id, or it may be calculated with Rdson and Vds or Id too.

So as you see, the faster you get from fully off to fully on state or back, the less time you dissipate the maximum power, but certainly every time the state is changed, the maximum power will be dissipated. Most equations may deal with frequency how often you switch state, and how long it takes to switch to get amount of wasted power or energy.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ossi wrote:

No we change the scenario an assume we operate the MOSFET with a gate voltage of sav 4.5V. At this voltage the MOSFET is not fully turned on. Now the
MOSFET limits the voltage to say 2A. At one amp
drain current the resistor gets a voltage drop
of 10 Ohm*2A=20V. The MOSFET drain source voltage
is now 50V-20V=30V and the MOSFET losses are
30V*2A=60W. I the heatsink was big enough for
11, but not for 60W, the MOSFET may now die
the thermal death.

This show, that during times with medium currents
you may have high losses in the MOSFETs. During
switching you go simply through this region
and you have to pass it fast enough, to not
destroy the transistor.

Uhmmm .....

I think i get it , but have never thought about the above.

I fully understand that if Rload is 10 Ohm , and Id is "limited by Vgs" to 2A , there will be 20v over Rload.
And as there is 50v over Vds , the missing 30v must dissapear somewhere , and that is apparently in heat :?

Now i understand why it's important , turn the fet fully on.

Yesterday i assumed ,that if i ran the fet at "lov Vgs" , it would not matter if i just kept Id low.

But the above example clearly shows that the FULL Vds * id energy , always have to go somewhere ... either in Rload , or in the fet. And this regardless to the switching speed.

Since Rload and Vds are the same in the 2 scenarios , i can clearly see that Vgs must have influence on Rds , and the example shows that the Id limit (2A) must be due to a higher Rds.

That was a good "basic electronics refresher".

Thanx Ossi

@Jepael
Oki .... So getting out of "Half 0n/Off" in a hurry , is important , because thats where the internal FET losses are higest. And that's why FET drivers can provide "several amps in a short time" to get those electrons flowing , and get the Gate-Capacitance charged/discharged in a hurry.

Freaks is an awesome place
Thank you to all the contributors , to lift my basic FET knowledge from Zero to "I now have an idea about what to do , and especially why it should be done".

As Arnold says (.. Not you Arnold B ..)

I'll be back

Time to get my hands dirty ..

And hopefully without blisters on my finger (from touching the TO220).

I think i'll follow Ossi's advice and limit my PSU to 12v/1A , and i'll see if i have a Heatsink for the FET.

I'll start with Vgs@12v and Vds@12v (I only have one current limiting PSU) , and get the "good experience" first , then i have scope images of how it should look :-)

After that , i'll cook some FET's @Vgs=AVR.

I'll try things out on a Breadboard , would the capacitance from the BB influence the Gate ? , or is it not worth to worry about.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think for the first experiments a breadboard is suitable.
Late if you want to switch fast at high currents i
would not recommend a breadboard due to the
wiring-resistance and inductance. Capacitance is not so
much a problem.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:
@fmaimon
Thank you for the pictures , now i know how it ought to look.
What Vds are you using , and what current are you switching ?

I'm doing a boost converter, so it is an inductive load. I'm swithing about 9V @ 1A to get and 60V @ 0.1A output to drive an IV-18 VFD. Something like this: http://web.jfet.org/inGrid/ , but not a clock. I still haven't quite decided what it will display.

Felipe Maimon

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

fmaimon wrote:

I'm doing a boost converter, so it is an inductive load. I'm swithing about 9V @ 1A to get and 60V @ 0.1A output to drive an IV-18 VFD. Something like this: http://web.jfet.org/inGrid/ , but not a clock. I still haven't quite decided what it will display.

Moon phase! And make it blink once in a blue moon!

Seriously, I once started a moon phase indicator project with AT90S2313 or was it Tiny2313, and I have some hardware and software for it that works.

But it did not track the actual moon phase, as it differs a bit per month, but it did track the mean value, and software was more accurate than the actual crystal.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Now my pwm is ready

I'm using a M88 & a 14760300 Oscillator

Here are some pics from my new Rigol

I have attached the original pic , saved to an usb stick.

And a resized version

I wonder witch one yoy shink i should use when posting ?

Sorry the pictures are shown in reverse

TDS-320 , Rigol Resized , Rigol Original

/Bingo

Attachment(s): 

Last Edited: Sun. Jan 10, 2010 - 04:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good results !

Both pictures look OK, although the 2nd one is just 5kb. The first one is twice as big in pixels (hor&ver) but 100kb in size. From a forum POV, the 2nd is the best choice. But don't hesitate to use the larger one if you think it needs that reolution. The .png format is great for these purposes.

Nice scope :!: as well, Bingo

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanx Nard

Here are the same view , but with the probe in X1 instead of X10

Seems to remove some of the "noise"

/Bingo

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So it seems to work. Could you give a schematic ?
I would also like to see a picture of the
gate voltage. Especially the rising edge, where
the voltage goes fro 0 to the final voltage.
That should happen within some hundred nano-seconds.

To remove noise in a periodic waveform you
may use an averaging mode of the scope.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Ossi

I haven't connected the FET yet :oops:

I just finished doing the basic AVR on breadboard , and playing with the scope.

Now its time to play with the FET :-)

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A probe in 10x mode has a higher frequency limit than in 1x mode. Therefor less noise :)
In general I keep my scope in 20MHz BW limit as that gives a "cleaner" picture. But when it comes down to measuring rise- and fall-times like ossi mentions, the full BW is the way to go.

About breadboards and SMPS experiments: with one of BloodyOrc's projects, my experiments on a breadboard resulted in a .... uhm .... a smoking board :)

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wooaa

Don't sell that schematic to Osama.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Okay ...

I have played a bit.
But just with VCC = 5v and a led via 330 ohm as load.

Schematic (quick) , Drain to VCC - Gate to AVR OCR1A
And [FETsrc]--[R330]-[LED]--[GND]

On all Pics Yellow is avr pwm

The Output really from IRF520N Sucked :-(
My led only just lit up , and there was no change over the full pwm scale. But i guess the voltage as you can see was very low for 330ohm.

.
/Bingo

Attachment(s): 

Last Edited: Tue. Jan 12, 2010 - 06:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well we gotta blow some stuff :-) (Nard showed me that ...)

I wasn't impressed at all , so i had to drive the IRF520N better ...

I was lazy and had a MAX232 besides me 8)

And voila , and i'm just using only one TX set on the Max ... PIN 7/10.

Now i'm convinced that a MAX232 inverts :-)

Attachment(s): 

Last Edited: Mon. Jan 11, 2010 - 09:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Same as above , but Blue is directly on source.

This helped on my led PWM , it is even brigther than the BSS100 , and pwm shows fine

He..He this is fun :-)

Next thing to try wednesday ...

Change VDS to 12v , and try with a 20w Halogen bulb.
I have found a Heatsink for the Fet.

It will be exciting to see if i can drive the Fet ok via a Max232 , or if i have to take the other TX channel in use , or if i have tu build a Totempole.

/Bingo

Ps: Thanx guyzz for making me have so much fun (and learn my new scope , at the same time).

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When driving a 20w Halogen , what kind of surprises can i expect ?

Will the rise/fall times on Source change , or will the fet just get a bit hotter ?

Ehh ...

Has anyone else wondered why the Vmax/Vmin shows up as 10v in difference ?
My VCC is 5v ?

And Pic11 seems to have more swing than 5v ?

/Bingo
/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Has anyone else wondered why the Vmax/Vmin shows up as 10v in difference ?
If you're talking about the gate: that's what the MAX232 does.

I find it hard to think along without a schematic. Any chance you have one ?

I know from experience that once you start with this stuff, it's hard to stop :)
Have fun :)

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:

Schematic (quick) , Drain to VCC - Gate to AVR OCR1A
And [FETsrc]--[R330]-[LED]--[GND]

The Output really from IRF520N Sucked :-(

Sorry to say but you are doing it wrong :)

Okay, so first of all, it is a N-channel FET, so you should switch the GND side of the LED, not the VCC side. Normally you would not switch VCC side with NPN or GND side with PNP transistor either.

Why?

Assuming you use 5V PWM from AVR, when AVR pin is 0V, there is not current through FET so S pin has approximately 0V too so it does not conduct as Vgs is low.

But, when AVR starts outputting 5V, the Vgs is positive and turns FET on. But when current flows through the resistor, the FET S voltage rises, and Vgs voltage drops while current rises and cannot turn the FET fully on anymore.

Edit2: So the system is in equilibrium state, the Vgs voltage is determined by current Id which in turns is determined by Vgs.

So the correct way to use it would be like NPN transistor. G to AVR, S to GND, D drives resistor and LED. Like open-collector output, this is the equivalent, named open-drain.

Edit: So why MAX232 makes things better? It has about 10V output, so when G is at 10V the S cannot be more than 5V, so Vgs is 5V, enough to power your LED.

Edit3: Halogen lamps. Well, most problems would be that lamps tend to be inductive (don't know how much) and when lamps are cold their resistance is smaller than when lit, so the initial current can be something like 2-20 the steady-state on current. So assuming you put your lamps between 12V and drain, I'd put a diode there in reverse over the lamp to protect the FET. And maybe when turning the lamps on, you could ramp up the PWM duty from 0 to target slowly, instead of for example setting it from 0% to 100%. Also when running halogen lamps dimly lit, they run cooler, but cooler halogen gas does not protect the tungsten filament as well when running at normal power, so it may not last as long. But then again, usually running lamps at bit less power than specified lengthens the life exponentially.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh man, I could continue forever.

Regarding the lamps, the filament may vibrate according to the driven current - I've seen a lamp used as a dummy load for audio amplifier, and the lamp emitted nice clean sine wave :)

So you should select a PWM frequency higher what you can hear. Or dogs/bats/whatever. I don't know what is too high.

It also occured to me based on the cold vs warm current, that when giving a PWM pulse, the filament should not heat to 100%, and when giving a PWM space, the filament should not get too cold, or you are cold starting the filament every cycle. Worst case is 50% duty, but definitely 1 second on, 1 second off is bad, while 1us on, 1us off is also bad. 8 MHz oscillator and 8-bit timer without prescaling gives you 256 steps and 31 kHz PWM frequency, which should be a good starting point. I still can hear 15kHz, most apparent at TV stores, it was unbearable to walk near all the TVs emitting the sound simultaneously.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
Quote:
Has anyone else wondered why the Vmax/Vmin shows up as 10v in difference ?
If you're talking about the gate: that's what the MAX232 does.

I find it hard to think along without a schematic. Any chance you have one ?

I know from experience that once you start with this stuff, it's hard to stop :)
Have fun :)

Nard

I meant "Newfile 11/12 pict" , where im measuring directly on the Source pin.
Pict 12 shows : Vmax=4.8 & Vmin= -6.4

But as Jepael writes i have "goofed" , as an N-Fet should have Source directly to GND , i haven't :?
That's where i have inserted my led+330R resistor.

Maybe that is "lifting the voltage or ??"

I'll change it , so the load is connected between VCC and the Drain pin.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jepael wrote:
. 8 MHz oscillator and 8-bit timer without prescaling gives you 256 steps and 31 kHz PWM frequency, which should be a good starting point. I still can hear 15kHz, most apparent at TV stores, it was unbearable to walk near all the TVs emitting the sound simultaneously.

I'm using a 14.760300 Mhz oscillator , that i have a "kazillion" of. They are fine on breadboards , and can drive 10 TTL.

I suppose that will give a freq of (F_CPU/(PWM-TOP * 2) = (14760300/(256*2)) = 28.828 Khz.

I have lost my "Tv-Ear .. 15Khz" hearing , but the wife can detect a "Switcher" within 50m radius :-(

So i'll remember to use 8-bit pwm if i ever uses it on my string of 3 x 20w Halogen. I'm actually suspecting that the trafo actually gives out AC (cheap china set) , but then again .... I have some Triacs , and have never ...... :-)

12v is prob a good startingplace for playing w. Triacs.

I'll be back

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:

I suppose that will give a freq of (F_CPU/(PWM-TOP * 2) = (14760300/(256*2)) = 28.828 Khz.

Yes if you use a PWM mode where the counter runs up and down. You get double that if you use fast pwm.
Anyway, sounds good.

Bingo600 wrote:

So i'll remember to use 8-bit pwm if i ever uses it on my string of 3 x 20w Halogen. I'm actually suspecting that the trafo actually gives out AC (cheap china set) , but then again .... I have some Triacs , and have never ...... :-)

12v is prob a good startingplace for playing w. Triacs.

For experimenting, you could just full-wave rectify the AC. I have seen one halogen trafo that was dimmer compatible at 230V side. There was a high freq square wave carrier at 12VAC side (somewhere between 20 an 100 kHz) that was amplitude modulated with 50Hz mains. Or actually, frequency modulated, so that lower speed square wave had bigger amplitude and higher speed square wave had lower amplitude.

Actually, grab an unused PC power supply. It gives your AVR 5V standby power, and you can turn the 12VDC on with AVR by pulling a pin low.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the cheap 'trafo's as you refer to them as are just a simple switch mode power supply. There is no filter capcitor so the output is modulated by the mains.

The usual circuit is based on this:

http://www.st.com/stonline/produ...

You can phase control these by adding an optoisolator and using dimmer code for the AVR. This way you don't need to get to involved with the mains voltage side of things.

You can pull a similar trick with the dimmable CFL lamps.
http://www.st.com/stonline/produ...

The circuit is similar to the GE dimmable CFL units I've pulled apart.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have 3 x 20W Halogens on the "string" , thats 5A@12v.
The flyback diode mentioned above , should it handle the same 5A ?
I only think i have some 1A/1N5818 & 3A/1N5821 Schottkeys.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am back playing with my IRF520N

I made a schematic , showing the way i drive it (MAx232) , and the current DUT (Led + 330R).

I corrected the error that Jepael was pointing at , me putting the DUT between GND & Source on a N-Fet. So now the DUT is between Drain & VCC

/Bingo

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is the fet Gate (ch1 yellow) , and the Drain (ch2 blue).

I have a spike on the Drain at the start of a pwm cycle, does anyone have an idea ?
The load is just a Led via 330R ?

Could it be because i drive the Gate with +/- 8.2v ?

.

Attachment(s): 

Last Edited: Sun. Jan 17, 2010 - 06:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here the same , but at 2uS

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I really don't know that much about MOSFETS, but given that the gate is a capacitor relative to the source-drain channel, that looks like a capacitive spike, the drain following the gate +going pulse through the G-D capacitance until Vgs gets high enough that current starts to flow and brings the drain low.

So I think what you're seeing is an artifact of your rather slow gate rise time, combined with a high-resistance load (especially at the beginning of turn-on, given the diode characteristics of the LED) which cannot shunt the capacitive spike. Try it with a lower value pure resistive load and see what changes.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here i try to see if one or both of the Max232 output gates does make a difference.

First Directly connected to Gate

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here i try to see if one or both of the Max232 output gates does make a difference.

Second connected to Gate via 100R

It's becomming round in the top when only 1 MaxGate and 100R , and the risetime changes a bit.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kk6gm wrote:

So I think what you're seeing is an artifact of your rather slow gate rise time, combined with a high-resistance load (especially at the beginning of turn-on, given the diode characteristics of the LED) which cannot shunt the capacitive spike. Try it with a lower value pure resistive load and see what changes.

Oki , i will try with a resistor.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What happens if you switch a heavier load,
say 10 Ohms at 12 Volt meaning 1.2Amp ? The
overshoot in drain-voltage will probably
disappear.

Pages