MOSFET High Side Switching - Page 1
Forum section: electronics / projects

author: Things
author_rank: Regular Contributor
timestamp: July 24, 2012, 12:12:26 pm
content: Hey all,I'm working on a giant RGB LED clock project that'll eventually span over 6 metres in length, and offer control of each individual segment.However, I'm a bit stuck with driving the LED strips. They are 12V and common anode, and because of this, I need to be able to switch the anodes of the strips also.This is how I was considering doing it, with a zener for 7.2V or so and a resistor, to drive some P-chan MOSFET's, however I was wondering if there is a better way to do this, as the zener will determine the operating voltage "range" of the device.Cheers,Dan

author: Psi
author_rank: Super Contributor
timestamp: July 24, 2012, 12:27:32 pm
content: If they're common anode leds why can't you just tie the common to VCC and use N-channel fets to pull the individual cathodes to ground?Need more info about the setup i think.

author: Things
author_rank: Regular Contributor
timestamp: July 24, 2012, 12:40:09 pm
content: Because the Anodes will be what controls each individual segments, while the RGB cathodes will be used to control, well, the RGB, as well as which digit is on.Scuse the messy schematic, but it's the NPN's on the left I need to figure out how to control properly:I also meant to include this in the OP:Dan

author: KTP
author_rank: Frequent Contributor
timestamp: July 24, 2012, 12:55:31 pm
content: So you want to use the breakdown of the zener (you said 7.2V) to apply a Vgs of -4.8V to your Pfets when the micro TTL lines go low?What type of Pfets are you using? What are the specs at a Vgs of -4.8V? How much current will they be driving?

author: Things
author_rank: Regular Contributor
timestamp: July 24, 2012, 12:58:36 pm
content: These are the Pchans I was considering:http://www.digikey.com/product-detail/en/DMP2035U-7/DMP2035U-7DICT-ND/2181234I would still love to use NPN's though, as 1. They're cheaper, and 2. Generally have better specs, and current handling. Current through those Pfets would be up to about 1A.Dan

author: KTP
author_rank: Frequent Contributor
timestamp: July 24, 2012, 01:39:14 pm
content: Those Pfets are fine I guess. There are Pfets with a lower gate charge...I am using some FDS9953A Pfets from digikey with a somewhat lower gate charge (still logic level) which might be easier to drive faster.You could drive the Pfet gate with a simple npn transistor in place of the zener. The collector of the npn to the Pfet gate, the emitter to ground, and the base to your microcontroller through a 1K current limiting resistor. Keep the 1K resistor from Pfet gate to 12V, or possible lower it a bit if you need faster switch times. Even a lowly 3904 npn would work here.

author: SeanB
author_rank: Super Contributor
timestamp: July 24, 2012, 03:23:28 pm
content: Use a PNP power transistor, and drive it from a uln 2003 driver. A base resistor and a base emitter resistor will work well. No need to worry about voltage, and will work over a large supply range with suitable scaling of the resistors.

author: gxti
author_rank: Frequent Contributor
timestamp: July 24, 2012, 08:11:57 pm
content: The basic template for P-type switching is that you need a companion N-type switch to drive it when the switched voltage exceeds your logic voltage. The P-type can be a MOSFET or BJT, and the N-type can also be a MOSFET or BJT. BJTs of course always need a current-limiting resistor on the base, and a high-side MOSFET needs a resistor to pull the gate high when the low-side switch is off, but a low-side MOSFET does not need one as long as it's being driven by push-pull logic, which is typically the case with microcontrollers and other modern logic. The N-type need not be high-power so a ULN2003 is overspec'd, but it does roll up lots of NPNs into a single package so that might save enough space to be worthwhile. The only thing to watch out for is that the low-side (N-type) switch has to have a breakdown voltage higher than 12V, which of course the ULN2003 has. It's not hard at all to find 12V parts, just something to check off before you buy. The left side of this schematic is an example of how to do it with two FETs. but again either part can be a BJT by adding/moving a resistor:http://partiallystapled.com/~gxti/circuits/2011/06/03-buck.pngThe alternative is to use N-type switches on the high side, but that only makes sense when you're switching many amps because to do it you need a control voltage that exceeds the power rail, and switchingthatvoltage in turn requires more circuitry. The benefit only comes when the power transistors are big and expensive enough that the cost savings of changing a P-FET to a N-FET with the same resistance specs is big enough to cover the cost of the controller.Because of the added cost of high-side switching, you'll want to arrange your circuit so there are fewer high-side switches and more low-side switches. Ideally I'd control the segments by cathode and the PWM by anode, but if you already have the parts or the opposite configuration isn't available then you'll have to make do. The other caveat is that the PWM one will of course have to switch faster, and then the pull-up resistor on your P-FET becomes more important. The schematic I posted above lists a 100K resistor for R3, but that was way too high for the frequency I was switching at so I had to reduce it to (I think) 100 ohms to get it to pull up fast enough. 100K would have been fine if switching at 100s of hz or less. This was for a buck converter though, for LEDs you can switch at 1khz or less so you won't need quite so low a pull-up resistor value.I've probably written far more than was called for, but maybe it'll be useful to someone and maybe even some of it is correct...

author: poorchava
author_rank: Super Contributor
timestamp: July 24, 2012, 08:40:10 pm
content: Use smart high-side switch. They typically incorporate N-MOS + level shifting circuitry + optionally some control/safety features. For low current they are rather cheap. Check IRF, they are the best at this I think. Also ST, Infineon, Fairchild and Freescale have their piece of cake.

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 26, 2012, 01:21:20 am
content: I would prefer a MOSFET anyway. Because they are dirt cheap in that power class f.e. only 10€Cents for a 30V 3A MOSFEThttp://at.farnell.com/taiwan-semiconductor/tsm3455cx6/mosfet-p-kanal-30v-3-5a-sot26/dp/1864594.They also produce less power dissipation, because the Rds(on) resistance is usually very low. On the other hand a BJT has always a Uce (Collector-Emitter voltage drop) of approx. 0.2V. So if you do the math:BJT: 0.2V*1A = 200mWMOSFET: 0.08Ohm*(1A)^2 = 0.08W = 80mW!So you get almost 3 times more power dissipation than with a mosfet.You can also directly connect the MOSFET on the high side of your LED array. Because almost all MOSFETs have a maximum gate source voltage of +/-20V. So if you can ensure that your supply voltage never rises above 20V you can use the MOSFETs directly without the use of a zener diode. This zener you only would use if you have higher supply voltages or if there is the possibility of voltage surges exceeding the 20V limit in both directions.

author: poorchava
author_rank: Super Contributor
timestamp: July 26, 2012, 08:40:11 am
content: Common practice when i use when high-side switching with a MOSFET is connecting 10-15V Zener diode across drain and source + a resistor in series between the gate and whatever drives it. This ensures that Vgs will never go into oxide breakdown region. I generally use BZX84C10 or BZX84C15 for that purpose (small-yet-hand-solderable footprint of sot23, current capability enough to connect resistor as low as 1k in series with gate.)

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 26, 2012, 05:06:51 pm
content: Quote from: poorchava on July 26, 2012, 08:40:11 amYou mean between G and S? Between source and drain it won't make a difference or I'm wrong?As I have written in my last post: If you can ensure that the voltage between G and S doesn't rise above +/-20V you can omit the zener clamp. F.e if you are using a regulated SMPS or you have a TVS connected at the power input.Good qualitySMPS have protection circuitry built in, so even if something goes horribly wrong the output voltage will not rise much above its nominal value.

author: poorchava
author_rank: Super Contributor
timestamp: July 26, 2012, 10:22:11 pm
content: Ya, I meant source and gate, sorry for the mistake. Actually connecting one between drain and source also may make sense, but i image that it would be some application that involves switching high voltage polluted with high voltage spikes. in order to avoid drain-source breakdown by voltage spike one could probably use clamping diode (although rather TVS than zener - main principle of operation is the same, but TVSs have their doping region dimensions and concentrations optimized so, that breakdown is sharp and very fast).I know that most hi-rel stuff (medical, aerospace, automotive, servers etc) use such clamping technique to ensure most robustness possible

author: richcj10
author_rank: Unknown
timestamp: July 27, 2012, 07:43:37 pm
content: just use a mosfet driver... much better