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.



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.

|improve this answer|||||
  • \$\begingroup\$ thank you @Trevor_G! R3, should this read 2k7 Ohm? And where is Q3 you mention, didn't you mean Q2? \$\endgroup\$ – Raphael Feb 11 '18 at 17:30
  • \$\begingroup\$ @Raphael oops.. yup I changed the drawing and missed a ref in the text. \$\endgroup\$ – Trevor_G Feb 11 '18 at 17:33
  • \$\begingroup\$ 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? \$\endgroup\$ – Raphael Feb 11 '18 at 17:42
  • \$\begingroup\$ @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. \$\endgroup\$ – Trevor_G Feb 11 '18 at 17:47
  • \$\begingroup\$ which value must I look for in the Q2? I have different types here... \$\endgroup\$ – Raphael Feb 11 '18 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.

|improve this answer|||||
  • \$\begingroup\$ 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. \$\endgroup\$ – Raphael Feb 11 '18 at 15:01
  • \$\begingroup\$ @Raphael A is current, so you want 500 mA of output current. \$\endgroup\$ – Harry Svensson Feb 11 '18 at 16:03
  • \$\begingroup\$ 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 :/ \$\endgroup\$ – Raphael Feb 20 '18 at 14:42
  • \$\begingroup\$ @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. \$\endgroup\$ – Olin Lathrop Feb 20 '18 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.