MOSFET HEXFET Help please - Page 1
Forum section: electronics / beginners

author: andybarrett1
author_rank: Regular Contributor
timestamp: March 19, 2019, 08:58:52 am
content: Hi All .... Looking for a little HelpI am using a similar circuit as below to switch a High Power Led from a PIC Processor using a IRL520 HEXFETAll is working fine. However I would like the LED to be switched from the positive side so effectively one side of the LED is 0v and not 12v as in the picture. if it was a BJT it would be PNP not NPN am looking for?Is there a P-Channel of the IRL520 I have missed..... Do I need to do something else maybe?Thanks for readingAndy

author: RES
author_rank: Regular Contributor
timestamp: March 19, 2019, 09:20:16 am
content: IRF9520

author: Psi
author_rank: Super Contributor
timestamp: March 19, 2019, 09:22:47 am
content: Yes, you need a P-Channel fet.Not all N-Channel fets have a matching P-Channel version.You will need to look at the specs you need. max voltage/current gate threshold etc. and select a P-Channel fet which meets your requirements.Be aware that the resistor will then go to VCC instead of GND and your logic will be inverted.

author: Ian.M
author_rank: Super Contributor
timestamp: March 19, 2019, 12:14:18 pm
content: ... and for supply voltages greater than the MCU's Vcc, you'll also need a level shifter. e.g. with a 12V supply, you'll need to take the gate between +12V for Off and at least 2x the Vgs threshold voltage negative of that for On. As the supply voltage is significantly less than the max Vgs rating, you can pull it all the way down to 0V, so a simple discrete small signal N-MOSFET will do for the level shifter if you aren't PWMing the load at a high frequency. It adds another stage of inversion so you are back to logic high for On. N.B. The load turn-off time is then determined by how fast the gate pullup resistor can discharge the gate - you have to tradeoff fast turnoff v wasted power when on.With higher supply voltages, pulling the gate of a high side MOSFET all the way down to 0V could exceed its max Vgs rating causing gate oxide breakdown so your level shifter would need to be considerably more complex to limit or clamp the Vgs applied to the MOSFET.

author: Peabody
author_rank: Super Contributor
timestamp: March 19, 2019, 01:24:31 pm
content: My understanding is that basic stamps are 5V. So it seems to me that the circuit is already the way it needs to be for controlling a 12V source with a 5V processor I/O pin. If you invert everything, wouldn't you have the P-channel gate pullup resistor connected to 12V? That's not going to be good for the I/O pin. Could someone post a schematic of how this would look using a P-channel?

author: andybarrett1
author_rank: Regular Contributor
timestamp: March 19, 2019, 02:25:54 pm
content: Thank you all for your help so far.... As Peabody as mentioned inverting everything might give me more issues yet to be explored.Looking forward to seeing what others have to contribute ?BRAndy

author: Ian.M
author_rank: Super Contributor
timestamp: March 19, 2019, 02:35:46 pm
content: @Peabody: Here's *ONE* way to do it - there are many others but they all involve an extra level-shifting stage between the MCU and the power PMOSFET.

author: andybarrett1
author_rank: Regular Contributor
timestamp: March 19, 2019, 04:17:16 pm
content: IanThat is more or less what I was looking at doing but I was using a small BJT in place of the 7000 Device.Maybe there is a good reason to use the Ntype... Still helps the learning process :-)Andy

author: Peabody
author_rank: Super Contributor
timestamp: March 19, 2019, 04:21:28 pm
content: Ian.M, it looks like that would work fine. But it's a good bit more complicated that what the OP has now. We don't know why he wants to switch things around, but for now I'm going to stick with my contention that he already has the simplest, best circuit. If the load was also tied to 5V, then it could be done either way with no problem. But I think the 12V pretty much dictates which way to do it. So Andy, why do you need to change what you have? The LED won't care what it's tied to. It only cares about the current flowing through it.

author: Psi
author_rank: Super Contributor
timestamp: March 20, 2019, 12:22:08 pm
content: For loads under 2A i sometimes just go for 2A digital optocoupler IC's or a gate driver IC's.They increase the power output of the micro pin but keep its ability to source and sink.Therefore you can use them to drive to GND or to VCC.Sometimes the fact that you get isolation is handy too.And because the IC has its own power input you get the option to do level shifting if needed,

author: andybarrett1
author_rank: Regular Contributor
timestamp: March 20, 2019, 01:36:28 pm
content: HIThe reason I was looking to invert the Output was / is I have four of these outputs on the one Pic. So usually in the field we would use 0v as a common then connect the four positive switching voltages.The hard bit is remembering that 12v is common to all four LEDsBRAndy

author: Zero999
author_rank: Super Contributor
timestamp: March 21, 2019, 11:36:30 am
content: Quote from: Psi on March 20, 2019, 12:22:08 pmBe careful, MOSFET driver ICs are not normally specified for continuous operation at the full current. You might need to work out the power dissipation to determine what current can be safely switched continuously.Quote from: andybarrett1 on March 20, 2019, 01:36:28 pmWhat's the current rating of the LEDs? How about using an IC?The TBD62783 has eight channels. If you only need four, then two channels can be connected in parallel to reduce the voltage drop and power dissipation.