NPN to PNP

What resistor should I use between Arduino(3.3v) to NPN. What resistor should go between NPN and PNP to trigger 3.3V flow.

This is the PNP and NPN I am using:

The current for the PNP should be 150mA or less.

Besides the answer, if you can explain how I can figure it out on my own, that would be awesome...

Thanks!!! :slight_smile:

Take you required collector current and divide by hfe for this current.
This gives you the needed base current.
If the transistor is silicon, assume Vbe is .6 or .7 volts.
If the drive voltage is 3.3v, calculate the needed base resistor.
(3.3v - .7v ) Ib = Rb

With calculated values, select parts, measure Vce saturation, make sure this is ~.2volts for 3.3vin.

Why are you using two transistors, and for what?
Post a photo of a hand-drawn schematic of your circuit.

Why are you using two transistors, and for what?
Post a photo of a hand-drawn schematic of your circuit.

Really, wouldn't it be easier to answer your questions if you told us what you are trying to do ?

What resistor should I use between Arduino(3.3v) to NPN.
Already answered by LarryD.

What resistor should go between NPN and PNP to trigger 3.3V flow.

PNPs are "triggered" (the correct term in electronics is "turned on" by 0V or a negative voltage (depending on the application).
If the NPN has a pullup resistor on the collector, I would think a 1 k base resistor on the PNP would turn it on when the NPN turns on and pulls it's collector to GND. Maybe someone else can make a more educated guess, as I don't have a lot of experience using PNP transistors.

PNP datasheet

This works:

Good evening everyone, thanks for the replies. Here is a bit more info.

Arduino pin only outputs 30-40mA @ 3.3V. I have sensors and extra hardware that I want to turn on/off at will so I can save battery life during sleep mode. After sleep mode, pin goes high and turns on the NPN/PNP circuit. Using just PNP and keeping it always HIGH when I dont want to use it draws more current which is less battery savings. I get about 6-7uA in sleep mode with WDT +ZigBee sleeping ect. While sleeping all the sensors on there will be off and not drawing any current. (Temp/Humidity/Sonar/IR)

here is my current circuit design

That'z basically the same as the circuit I posted. with the exception that it is sourcing i stead of sinking current

What is the total current draw of the devices you want to switch.
Are they happy with 3.3volt minus the saturation voltage of the PNP transistor (0.4volt@1:10 base current = 2.9volt).
A P-channel fet could be better (do the maths).
Why the NPN transistor. An Arduino port set "HIGH" also turns a PNP transistor off.
The (fuzzy) drawing shows a 1k resistor between collector and base.
You loose ~1volt in the BE junction of the PNP and saturation of the NPN transistor.
~2.3volt left across the resistor = ~2.3mA drive current.
That is good for only 23mA current for your devices (if you want <=0.4volt saturation).
The NPN base resistor could be 10x higher in value than the PNP base resistor.
Leo..

The max current will be 150mA

If I keep a pin high doesn't that enable the internal pull up resistor? In that case I am consuming more current while in sleep mode.

The resistor values in my circuit are place holders. Thats why I posted here :slight_smile:

Pullup Resistor only comes into play when a pin is an input.

A output pin will essentially draw the same amount of current when in 1 state as in a 0 state based on the way the pin circuitry is designed. Differences minimal

'328P has a transistor to connect output to +5 for a high, and 2nd to connect the pin to Gnd for a low, independent of the pullup resistor. Current sourced or sunk is dependent on the load circuit.

If you're concerned about reducing current you should heed this:

The NPN base resistor could be 10x higher in value than the PNP base resistor.

In your circuit diagram you need to add a resistor from the npn transistor collector to the pnp transistor base to ensure that the pnp is turned off fully. Something like 10 k should do but you should look up the ICB0 of the npn to be sure.

Russell.

How 'bout a P channel FET with gate pulled up with 22k and put POW pin in input (without pullup) mode before sleep?

Least is wasted with a P-channel fet.
e.g. the FDN340P, used on the Uno to switch the USB supply off.
It has an "on" resistance of 0.07ohm@3.3volt (datasheet), so you loose 0.01volt across the "switch" at 150mA.
Compare that to the 400mV for the NPN transistor.
A transistor needs 15mA drive current for 150mA device current (for <=0.4volt saturation).
A 150ohm base resistor is needed when you drive the PNP directly from the Arduino. 15mA lost.
A fet (gate) uses nothing. No resistor needed between gate and Arduino pin for this small fet.
Wise to use a high value bleed resistor between gate and source (3.3volt), but it can be 100k (or 1Megohm).
This resistor only uses 33nA (or 3.3nA) when the fet is "on". Nothing when "off".
Leo..

A compelling argument.

Okay. I took away the NPN completely. Arduino pin HIGH to base(no resistor) with PNP . In sleep mode I am not getting any difference in current consumption. Steady 4.5-4.6uA. So thats good. So the question you guys are raising is whether or not N/P FET would be better than NPN/PNP.

Do I need a resistor from Arduino pin to base PNP in my latest configuration?

200 ohms

220 ohms

Almost unrelated question. I am using a tricolor LED. using the same idea, having a pin HIGH, can the anode and cathode of an LED stay HIGH so its off and not drawing any current? Then i switch the arduino pin low and the led turns on.

There is no current flow if there is no difference of potential between anode and cathode. (duh)

If you are going to use electronic components, it might help you to learn something about them.
LED

LED BASICS

LED Characteristics and colors

led-voltage-curves.gif

FYI: The definition of forward voltage is the voltage from anode to cathode.
To understand why there is no current flow when both anode and cathode are at the same potential, it is necessary to understand Ohm's Law