EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: casper.bang on August 27, 2013, 02:47:46 pm
-
Driving an IR LED from an MCU, typically requires a P-channel FET as I have seen on several diagrams now. Since I only have small signal N-channel FET's laying around, can I simply move the resistor and LED from behind the drain, up in front of the source like you would do with a PNP -> NPN bipolar?
-
Found a picture for you using google image search.
You should really put a low ohm resistor between the gate and i/o, unlike this picture, but its not strictly necessary. Use ~100R if you have it.
Note: Your p channel was inverting the logic, (output high = led off)
The n channel circuit doesn't invert. So output high = led on
(http://www.microbuilder.eu/Images/2148quickstart_gpio_mosfet.png)
-
Found a picture for you using google image search.
You should really put a low ohm resistor between the gate and i/o, unlike this picture, but its not strictly necessary. Use 10-100R if you have it.
Note: Your p channel was inverting the logic, (output high = led off)
The n channel circuit doesn't invert. So output high = led on
(http://www.microbuilder.eu/Images/2148quickstart_gpio_mosfet.png)
Ahhhh it's inverted... did not know it worked like that. Now I understand why my IR LED is always lit. :)
-
Yep, to turn on a Ptype fet you need to pull the gate lower than the source. The source is at VCC so if you pull the gate to GND it turns on. Which is why it inverts.
To turn on a Ntype fet you need to pull the gate higher than the source. The source is GND so if you put VCC onto the gate it turns on. (No invert)