# NPN-switching 4V with a 3.3V signal

I have a project where I need to switch the + side coming from the battery (single cell LiPo) to a consumer (ESP8266) with a 3.3V signal (common ground).

I have loads of NPN and PNP-transistors here, but can't make it work.

I'm sure this is a pretty basic question, but even though I googled the whole internet, trailed and errored a lot I can't find a solution.

Thanks!

Since you are expecting to run some larger currents a two stage driver would be better as shown below.

Note Q2 needs to be able to handle the current you require.

simulate this circuit – Schematic created using CircuitLab

Since you are only using a 4V supply with an 8R load, Vce_sat becomes a major proportion of the output, as such a low Rds_ON P-MOSFET may be a better choice for Q2.

• thank you @Trevor_G! R3, should this read 2k7 Ohm? And where is Q3 you mention, didn't you mean Q2? Commented Feb 11, 2018 at 17:30
• @Raphael oops.. yup I changed the drawing and missed a ref in the text. Commented Feb 11, 2018 at 17:33
• I have almost the same setup, my Q2 is a S8550, but as soon as I apply a "real" load (0.5A) it shuts down. Switching an LED works perfectly, though. What is R4 for? Commented Feb 11, 2018 at 17:42
• @Raphael R4 makes sure Q1 is off while whatever is driving that line is starting up. S8550 is not big enough to do 500mA. YOu need R2 to be small enough too. Commented Feb 11, 2018 at 17:47
• which value must I look for in the Q2? I have different types here... Commented Feb 11, 2018 at 17:52

When the input is at 3.3 V, the R1/R2 voltage divider will only allow 350 mV base drive to the transistor. That will keep the transistor basically "off".

When the input is at 0 V, figure the B-E drop at 700 mV. That leaves 3.3 V across R2, so 3.3 mA will flow thru it. R1 will take 700 µV of that, leaving 2.6 mA to drive the transistor. If you use a transistor with a minimum gain of 50, for example, then it can support up to 130 mA of load current.

Since you didn't say anything about off-state leakage, on-state current requirement and allowable voltage drop, and current capability of the digital signal, this meets all your specs. Note also that the digital output will be driven from 4 V with 2 kΩ in series. But again, since you didn't say anything about the digital output, this is in spec.

## Update to new specs

You now say the load might draw up to 500 mA. In that case, a single transistor won't do. You also probably care more about the voltage drop of the switch, although you still haven't said anything about that.

This should work nicely, and be able to switch well above 500 mA:

When the logic signal is high, Q2 is turned on. That causes the gate of Q1 to be driven low, turning it on.

Q1 is specified for 32 mΩ with 3.7 V gate drive, and 40 mΩ with 2.5 V gate drive. It will continue to work well as the battery gets depleted. Even at 40 mΩ, it will drop only 20 mV and dissipate only 10 mW.

Note that this version turns the load on when the digital signal is high. The first version, above, turns the load on when the digital signal is low.

• thank you so much. I got this working, however, output current seems not enough. Sorry, I should have said that in the first place, but I'm really an electronics noob. I need around 500mA of output power. Commented Feb 11, 2018 at 15:01
• @Raphael A is current, so you want 500 mA of output current. Commented Feb 11, 2018 at 16:03
• thanks for the update @olin-lathrop. Is the Q2 spec. critical? I have a whole bunch of NPNs here, but of course not this one. And also no SI2333DDS :/ Commented Feb 20, 2018 at 14:42
• @Raph: Just about any small signal NPN can work at Q2. Q1 needs to be a P-channel FET that turns on well with only 3.5 V gate drive. Commented Feb 20, 2018 at 18:17