I have main device with a 3.3V serial port that has not enough power for the connected ESP. Main device powered by a single LiPo-cell. I want to power on the ESP (3.3) when the main device is powered on, so I thought using an NPN-transistor, collector to battery +, emmitter to ESP, base powered by serial port + (3.3V). Will that work? What output voltage will I get from the NPN? Max. current will be 0.5A. Do I need a resistor to the base?
-
\$\begingroup\$ You have described an emitter follower and that won’t work. Go google it for reasons. \$\endgroup\$– Andy akaFeb 3, 2018 at 14:34
-
\$\begingroup\$ Not clear if you are switching 5V or 3.3V... YOu will need a PNP either way, and you may need an NPN too if you want to switch 5V with a 3.3V signal. \$\endgroup\$– Trevor_GFeb 3, 2018 at 14:37
-
\$\begingroup\$ In reality your question is more like: How can I enable the power supply for a secondary 3.3-5 V device from a serial port? You have tried to come up with an answer (which is commendable) but you should not phrase your question as your answer. \$\endgroup\$– loudnoisesFeb 3, 2018 at 14:48
-
\$\begingroup\$ I agree @loudnoises What's your proposal how to solve it? \$\endgroup\$– RaphaelFeb 3, 2018 at 17:49
-
\$\begingroup\$ Just a note: a fully charged lipo will produce 4.2V. It maybe not kill your “main device” (whatever it is) but surely fry the esp! \$\endgroup\$– PéterApr 23, 2018 at 11:47
1 Answer
Personally, I would use a MOSFET in this application since you are only using it as a switch and you want to keep the voltage drop across the device (MOSFET) as low as possible. Whether or not to use a pull-down resistor on the gate will depend on what device you are using to drive the MOSFET. If you build the circuit, and the MOSFET won’t turn off or acts erratically, use a pull-down resistor.
Here is a great MOSFET tutorial video for beginners. The MOSFET used in the video (Fairchild FQP30N06L) is very common and is one of the MOSFETs that I use the most for Arduino and Raspberry Pi output circuits where I have to control larger devices. (I buy them in bulk!) Pay attention to the part of the video where he mentions “logic level” MOSFETs. That’s what you want to use. The FQP30N06L is a logic level device.
Good Luck!