Transistors for DIY lighting project. - Page 1
Forum section: electronics / beginners

author: Holmes34
author_rank: Contributor
timestamp: January 21, 2017, 11:12:25 am
content: Hi EEVblog!I've recently gotten interested in making some very simple lighting projects, and I have some very simple questions about power transistors. I've read a little around the subject and read several little guides about how to use MOSFET's, however I thought it'd be best to get some confirmation on what I've learnt.First of all, I have a project where I want to power around an Amp's worth of LED's (I've arrived at an "amps" worth by testing how much current is consumed by 3 in series and multiplied it up by the number of parallel I intend to use). Now from what I've been able to google-fu, I'm more than likely going to need a MOSFET to handle the power on/off. I intend to deliver the on/off signal via a Pi Zero or Arduino compatible uC (e.g. 5V logic).Now I ran into the tidbit of information that is largest glossed over on many many beginner guides. I have some ST-P4NK60ZFP N-channel MOSFET's which have a Gate-Source voltage (which I understand to be the "turn on" voltage that the gate needs to achieve) of +/-30V. Does this mean that if I want to switch this particular MOSFET I need to provide +/-30V to the gate relative to the source in order to turn it on? E.g. Gate is 12V (relative to GND), I need to supply either 42V or -18V relative to GND?If this is the case, I suppose my fix is to just source a MOSFET with 5V or lower gate-source voltage?Sorry if this seems like a super simple question, I'm still learning most analog/digital electronics as I go.

author: Ammar
author_rank: Regular Contributor
timestamp: January 21, 2017, 11:28:13 am
content: You are on the right track with your understanding. However, the +/-30V you are talking about is absolute maximum ratings, and you generally want to operate at less than half of absolute max specs. Someone might put a negative voltage on the gate of a MOSFET if they want to switch it off quickly, by pulling the charge out of the gate capacitance. However, for your purposes, you likely won't need to do this. You just need to switch your GPIO pin on and off to drive the gate of the MOSFET.A logic level MOSFET like this should meet your purpose:http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Components/General/FQP30N06L.pdfAn important plot yo look at is the drain source voltage vs drain current for a particular gate source voltage. Notice that at 3V Vgs and a few volts Vds, the MOSFET can sink around 10A, more than enough for your application. Also the low Rds on is desirable, since the MOSFET wastes less power as heat when it is turned on.I hope that helps!

author: Ian.M
author_rank: Super Contributor
timestamp: January 21, 2017, 11:47:10 am
content: A few further points:All the Raspberry PI series have 3.3V I/Os, NOT 5V. Most Arduinos are 5V, but some high end ones and compatibles (not clones) are 3.3V. Check your I/O levels *BEFORE* buying parts!A rough rule of thumb is you need a MOSFET with a max gate threshold voltage of less than half your logic level to get it to turn on hard enough to be useful. When you've found some candidate parts, check their datasheets befor buying.Datasheet curves usually plot the typical behaviour of a parameter. If you are unlucky and the part is at one of the limits of its specs, or at temperature extremes, its possible that the desired parameter will be a factor of two (or more) away from the value you expect. The datasheet's table of electrical specifications will usually give a tolerance range for the parameter at one or more points on the curve which you can use to estimate whether or not you've got enough margin for the worst case possibility.Its also possible to add a gate driver chip between the logic level signal and the MOSFET gate to get typically a 12V to 15V swing on the gate + a lot more current capability for faster transitions so an ordinary MOSFET can be used. However that's a PITA if you don't already have a +12V to +15V supply rail for the gate driver. If you need fast switching with minimal MOSFET heating (e.g. for fast PWM), a gate driver + an ordinary MOSFET is often preferable to trying to drive a logic level MOSFET directly.

author: Holmes34
author_rank: Contributor
timestamp: January 21, 2017, 11:57:11 am
content: Quote from: Ammar on January 21, 2017, 11:28:13 amThanks a lot! This cleared up a lot of my missing knowledge. I'll take another look at my datasheets and probably order a few of the mosfets you recommended.

author: Holmes34
author_rank: Contributor
timestamp: January 21, 2017, 12:04:04 pm
content: Quote from: Ian.M on January 21, 2017, 11:47:10 amThanks for pointing out my misunderstanding w.r.t. the RPi's, I honestly haven't had a good look at them yet and just glanced at a pinout with a 5V pin and assumed they ran 5V GPIO's.I'll have a good look over this aspect of the project as I'm already not decided on whether I can use a simpler uC setup or whether I'd benefit from the built-in functionality of something like a Pi Zero. (cost seems negligible these days for home projects!) The different logic levels definitely adds a new aspect to this decision.

author: james_s
author_rank: Super Contributor
timestamp: January 25, 2017, 06:07:17 am
content: For switching from 3.3V logic, it's probably easier to use an ordinary BJT rather than a MOSFET. For 1A something like the BC517 ought to work well. It's an inexpensive NPN Darlington transistor that is good for 1.2A at up to 30V. A Darlington transistor has high gain so it needs little base current from the IO pin. Even an old fashioned PN2222 would likely do the job though.

author: Ian.M
author_rank: Super Contributor
timestamp: January 25, 2017, 11:30:32 am
content: The trouble with using a Darlington is the high Vce_sat drop and thus wasted power. Due to package dissipation limits a BC517 is only good for 500mA continuous current and the O.P. needs 1A. Even if he uses a beefier Darlington like a BD681 (100V, 4A max), its probably going to need heatsinking.

author: Codebird
author_rank: Regular Contributor
timestamp: January 25, 2017, 12:50:33 pm
content: You're not doing high frequency here - if you need to shift 3.3V up to something that'll do for a power MOSFET, just use a simple transistor-and-weak-pullup inverter. I personally favor a BS170 and 100K resistor, but that's only because I've a big box full of them in my cupboard.I'll do you a quick schematic when I get back from work.

author: Codebird
author_rank: Regular Contributor
timestamp: January 25, 2017, 06:43:26 pm
content: Here we go, then.You picked the P4NK60ZFP. Bit higher Ron than most, but... internal zener, and a 30V max Vgs? ? I didn't even know you could get those! Nice part. I might use that myself some day. And a 3V threshold tooYes, if you are controlling your lights off of 5V logic - ie, most arduinos - that will do the jobs nicely. Nice and simple, one part. It's actually rather overkill, you could just as easily make it work with a more conventional, lower-cost MOSFET, possibly one with lower Ron which would mean you could handle more current and dissipate less heat. So while it may not be the ideal part for the job, it will work. At your worryingly high Ron, you will need a heatsink - that's why it's often a good idea to get power MOSFET rated for far more current than you'll actually use, it means less heat dissipation.But if you want to use a pi, you have a problem. That part has a threshold voltage of between 3V and 4V. You can't drive that off of the 3.3V logic that a pi uses. You won't find very many power MOSFETs that you can do that with, so you're going to need an alternative. There are two ways around this:- James_S's suggestion, using a power BJT. This requires only that transistor plus one resistor. The downside is that it's a fair bit less efficient, which means you'll probably need a heatsink.- The way I'd do it, using a lower-power N-channel MOSFET (BS170 is my usual, but there are tens of suitable parts), plus a100K pull-up resistor. Or a 10K, if you're doing PWM for brightness. This needs your power MOSFET, plus one resistor and one tiny MOSFET. Or JFET, if you prefer. If looks like this:https://qph.ec.quoracdn.net/main-qimg-0e019b585d33260588d876b365959fc4-c?convert_to_webp=trueYou can get gate driver ICs, but for this application that would be a silly level of overkill. You only need those if you are switching at high frequency for something like a switch mode power supply.