# Controling Mosfet by 3,3V Raspberry Pi GPIO Pin

So I'm currently working on a project where I need an IR camera with two IR Leds attached to it. The camera looks something like this: https://rads.stackoverflow.com/amzn/click/com/B01ICLLOZ8 These LEDS are powered by the camera board an run on 3V with up to 0.3A per LED. Because these LEDS get very hot over time I only want them on power when I really need them. To do this I bought this logic level Mosfet: https://www.arrow.com/en/products/ipb048n15n5lfatma1/infineon-technologies-ag IPB048N15N5LFATMA1 by Infineon Technologies AG which should have a gate threshhold voltage of 3.3V according to the datasheet.

https://www.infineon.com/dgdl/Infineon-IPB048N15N5LF-DS-v02_00-EN.pdf?fileId=5546d4625b3ca4ec015b573da84a026c

But when I connect the wires to the mosfet, the LED won't turn on. The Drain-Gate Voltage is About 2,7V, the Gate-Source Voltage at About 3,3V and the Drain-Source at 0. The boards are wired up like this: (sorry for the bad wiring diagramm, never worked by Fritzing or something like this)

I really suck at stuff like this especially when transistors or mosfets are involved, so any help is appreciated. Thank you!

• It is hard to tell from your drawing, but it seems you are trying to do high-side switching with your N-MOSFET. You need to move the MOSFET to the low side of the LED. – evildemonic Apr 18 at 14:56

First, you need to give the LED it's own circuit, like this:

simulate this circuit – Schematic created using CircuitLab

The MOSFET you have chosen, though, will not work for this circuit; from the datasheet:

If you look closely, the threshold voltage (which may be as high as 4.9V) is specified at a drain current of $$\255 \mu A \$$.

To fully turn this device on, you need 10V $$\ V_{gs} \$$ drive so it is not really a logic level FET.

There are devices that will do what you need; in manufacturer parametric tables such devices have $$\ R_{DS}{(ON)}\$$ tabulated against various $$\V_{gs}\$$ drive levels.

Look for a device that has a 2.5V $$\V_{gs}\$$ drive capability.

Likely sources are Vishay and Diodes Inc to name but two.

• It's a bit odd to point out that the chosen MOSFET is unsuitable and draw a schematic naming the IRF530, yet another part that won't work well. Granted, it may be what the tool offers, but the additional problem with your schematic is that the LED circuit is part of a product, not entirely up to the asker. – Chris Stratton Apr 18 at 16:24
• Would it be possible to just use a step up converter so I won't need new mosfets? Or is the current then to low for the gate – Janik Apr 18 at 16:57
• @chris stratton. I did not change the default part which arguably I should have. – Peter Smith Apr 18 at 17:30
• The schematic you show is OK, but you really need to offer the OP a suitable device for the application. Accepting the default provided by CircuitLab only helps to confuse the OP further. I'd suggest that the AO3400 would be a suitable FET to use: aosmd.com/res/data_sheets/AO3400.pdf , though there are endless logic level FETs to choose from. – Jack Creasey Apr 18 at 17:35
• @Jack Creasey. I provided links to manufacturers parametric selection tables. – Peter Smith Apr 18 at 18:12

I would be surprised if that FET did work with 3.3V on the gate.

Diagram five, page 7 of the datasheet doesn't show the FET turning on at all for a 3.3V gate, and is only just starting to turn on with 5V on the gate. The 3.3V threshold voltage is the minimum turn on value, so the FET is only just starting to conduct. You need to find a different FET or drive it differently.

The diagram five on page 7 is the output characteristics graph. This is usually a lot more useful than numbers in the tables, as you don't operate FETs at fixed values, the real world is analogue. This graph shows how it operates with different gate voltages depending on your drain-source voltages and currents.

You say that this is a logic level FET, I can't see this claim in the datasheet. Did you choose "logic level" from your FET supplier? Catalogue suppliers are really bad at organising their components, it's something to watch out for.

• While that's true, there's also the issue that the FET is being misused in the circuit. – Chris Stratton Apr 18 at 15:09
• You are right. I checked the datasheet first (datasheets are easier to read than a hand drawn schematic). Looks like other got there before me. – Puffafish Apr 18 at 15:18

First, that MOSFET is not a logic level MOSFET. That unit will only just barely start to conduct at 3.3V, if at all. According to the datasheet the threshold voltage is typically 4.1V. You will need to source a proper MOSFET. Don't just look at threshold voltage, that is just where the thing starts to conduct. You need to look at the voltage curves, or at least find one advertised to switch with 3.3V.

Second, you need to use low-side switching for this. Put the MOSFET between the LED's cathode and ground. The reason for this is so you can get the gate high enough over the source to turn on the transistor.

You need to wire it up like this:

simulate this circuit – Schematic created using CircuitLab

You need to ensure that the camera, Pi, and MOSFET all share the same ground.

• The camera is connected to the pi with a flex cable, doesn't this mean the grounds are connected or do I have to just connect the two grounds to a grnd pin on the pi? – Janik Apr 18 at 17:00
• Yes, you should be fine there, the ground should already be common between the Pi and camera. – evildemonic Apr 18 at 17:12
• Perfect, one problem sorted out, thanks! – Janik Apr 18 at 17:23
• This circuit requires a series resistor for the LED. As shown there is NO current control at all. – Jack Creasey Apr 18 at 17:28
• @JackCreasey He is hacking an existing unit, the resistance is built in. – evildemonic Apr 18 at 17:33