• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switching larger loads

Status
Not open for further replies.

Tightwad

New Member
I am attempting to build a PIC version of a brake light flasher. I build an Analog version, which works but was rather cumbersome (and boring), so i would like to apply what I am learning on the PICs.

My question (from not knowing a ton of electronics) is how can I switch a 30 watt load? Voltage would normally be 13.5 or so, giving about 2.22 amps?

There are two 15 watt bulbs, in parallel, which would be flashed.

Additionally, would turning them on/off be better than PWM? They are incandescent, not LED, if that matters.

My thought is turning them off to flash them would provide protection against PIC circuit failure?

I think i can figure out the delay sequence based on Nigels tutorials, but if anyone has sample assembly code built around this, I am open to any options. Analog version had adjustment for amount of time to flash, and number of flashes.
 

dougy83

Well-Known Member
To switch a larger load, you may wish to use a transistor - e.g. BJT or [MOS]FET. Attached is the schematic of how it could be done with either type.

Note that a FET will need to be capable of operating with the gate voltage provided by the microcontroller. Alternately, if using the BJT, the current gain must be such that the small base current supplied by the microcontroller can switch the required current; you may need to use a darlington transistor or similar.
 

Attachments

Last edited:

edeca

Active Member
Well I've only just started reading about this so I might be wrong, however..

The gate voltage on that datasheet looks to be between 2-4V, which your micro can supply. So that seems in order. It can handle many more amps than you are switching, so that should also be good.

I don't think that turning on/off an incandescent bulb would be a very good idea, that would reduce the lifetime of the bulb I assume. Perhaps I'm wrong, but mains dimmer switches work by using a triac to only turn the current on during part of the cycle.
 

Sceadwian

Banned
Flashing incandescent bulbs is fine, otherwise car's would be in trouble =)
If I'm reading the PDF right based on Fig3 from the PDF it looks like you'll be able to pass more than 10 amps at a gate/source voltage of 5 volts.
 

edeca

Active Member
Flashing incandescent bulbs is fine, otherwise car's would be in trouble =)
Of course, stupid me! I was thinking about flashing them quickly, which would be a bad idea. Flashing them intermittently would be fine :)
 

Tightwad

New Member
I am not an electrical engineer, so I get easily befuddled by the datasheets and understanding what is important or what will work.

Thanks for the help!
 

Sceadwian

Banned
Actually quickly isn't even a problem, that's how dimmers work. Incadescent bulbs aren't much more than glorified wire wound resistors.
 

Sceadwian

Banned
Tightwad, mosfets can be tricky, because depending on the current you need and the Drain/Source voltage the Gate voltage required varys. Technically your 540 isn't a logic level FET, but it'll work fine for your purpose, if you needed the full 33 amps of current you'd probably have to provide a higher gate drive.
 

dougy83

Well-Known Member
If I can read the datasheet correctly, that fet is not good.

edeca said:
The gate voltage on that datasheet looks to be between 2-4V, which your micro can supply. So that seems in order.
With the threshold at the specified 2-4V, the drain current is specified to be 250uA.

Have a look at Fig 3. For VGS=5, ID=~27A; RON = ~1.85ohms. At your required 2.22A, this will drop ~4V and dissipate ~9W. It will waste power, get hot and possibly warrant heatsinking.

Keep looking through your stash of mosfets for either a logic level one, or one with a lower RON/RDSON.
 

Sceadwian

Banned
dougy how are you calculating those values? All figure 3 shows is Drain current vs gate/source voltage with a drain voltage of 50 volts how are you calculating RON? Mind you the posters Drain voltage is 13.5 volts. If you say I'm wrong I don't mind, but I'd like to be able to figure out how to calculate RDSON for a given DS and Gate voltage from the datasheet. I usually realy on a simulator to figure this stuff out, but I don't have a model for the 540N
 
Last edited:

dougy83

Well-Known Member
For VGS=5, ID=27, VDS=50. RON = VDS/ID = 50/27 = 1.85 ohms. You are correct though, I have missed a few obvious things... such as the fact the Fig 4. shows the normalised RDS, and that Fig. 1 shows the current well pinched at VDS=50, and that RDS is actually 44mR in the top table. I think Fig 1. shows the important information - for VGS=5V, at I=2A, VDS < 0.1V -- so again, my apologies, you are correct, the irf540n should be fine.
 
Last edited:

Sceadwian

Banned
ID=27 amps? He's only passing 3amps, at 13 volts.
 
Last edited:

dougy83

Well-Known Member
I know. I was just reading from one graph assuming RDS would be constant for a given VGS (which it's not) without bothering to look at the graphs right next to it. I've already admitted defeat.
 

Sceadwian

Banned
I found the IRF model for the 540n. With a gate drive of 5 volts, and a 13.5 D/S voltage, with a 4.5 ohm resistor as a high side load I get 400mw's disipated in the package with 3 amps being passed. RDS on is relative to D/S voltage with a constant gate drive. You only run into problems with logic gate drive when you have a high drain/source voltage, or you're pulling a lot of amps relative to the mosfet constructions capabilities.
 
Last edited:

Tightwad

New Member
Wow....most of that was Greek...heck, I probably know more Greek than that.

Power in, Power out, Pic input....what else is needed with that Mosfet? I wonder why I ordered 4 of those things....can't recall what I was supposed to be building.

Forgot to say THANKS!!!!!
 
Last edited:
Status
Not open for further replies.

EE World Online Articles

Loading
Top