Resistor values for P-Channel MOSFET + NPN Transistor Switch

your schematic looks so much cleaner. I can't spot the differences right away and need some time to analyze it.

What are you talking about ?

The difference is like night and day.

They couldn't be more different if you tried.

Start by looking at where the emitter of the NPN is connected.

Is there a difference between Vcc and GND ?

@raschemmel post #1. The circuit is part of an IOT application where the power consumption is crucial. After some research I came to the above solution to switch all unused components off while the Atmega328P is in deep sleep (1 + 2). The LED was meant as an example of a consumer, in reality this would be at least an HC-12 433 MHz HF module and one or more sensors which together will probably use 1 A max (3).
I'm not a pro and every constructive input is welcome.

@ReverseEMF thanks for the addition. It'll take me some time to process your information as I'm obviously not a pro.

@6v6gt thanks, I've ordered some NDP6020P.

jaron:
@raschemmel post #1. The circuit is part of an IOT application where the power consumption is crucial. After some research I came to the above solution to switch all unused components off while the Atmega328P is in deep sleep (1 + 2). The LED was meant as an example of a consumer, in reality this would be at least an HC-12 433 MHz HF module and one or more sensors which together will probably use 1 A max (3).

WhooHoo! 1 Amp (max 3)! Much different than the 6, or so, mA implied by your LED and 220Ω resistor!!

OK, that means a more hefty MOSFET, and possible concerns regarding switching time. Though a NDP6020P is plenty hefty -- in fact, might be overkill. Like, we might be waltzing into the concerns about that Gate Capacitance, I mentioned before. And, low power consumption concerns to boot! OK, a little more complicated of a design, perhaps [or, still simple -- depends on the need for speed]. Also, just checking...what's with the P-Channel MOSFET, anyway? Why did you feel that was necessary? I mean, couldn't we just use an N-channel MOSFET and dispense with the PN2222?

@ReverseEMF it would be 1 A max. I've chosen the above solution because I assumed that it uses the least power and has the least voltage drop which is important as I use a single LiFe battery. But of course I could be wrong.

The above is a catastrophe waiting to happen.

NOOBs are often told to connect grounds so circuits can have common reference point for current flow.

At a minimum, the schematic should come with a warning.

Better still, use one of the circuits below:

larryd:

The above is a catastrophe waiting to happen.

In what way is this a "catastrophe waiting to happen"?

This is revision 1 of the schematic that I've modified according to the inputs given so far:

  • The emitter of the transistor is now connected to GND instead of VCC.
  • An NDP6020P logic level MOSFET is used instead of an FQP47P06.
  • There is now a 10kΩ pull-down resistor at the Arduino pin D4.
  • R1 is now 260kΩ and R2 33kΩ, which must be verified.
  • In a real application the LED would be for example replaced by an HF module and a temperature sensor.
    ** The design of the circuit is debatable but low power consumption and minimal voltage drop are crucial.

R1 is excessively high for a simple 5V logic driven 2n2222 . In that configuration you typically see values
between 1k and 5k. The only reason to use 260k is to limit the base current and thus the collector current.
I can't see any reason to do that. How did choose 260k ?

raschemmel:
R1 is excessively high for a simple 5V logic driven 2n2222 . In that configuration you typically see values
between 1k and 5k. The only reason to use 260k is to limit the base current and thus the collector current.
I can't see any reason to do that. How did choose 260k ?

260k for the "avoiding long term battery drain in a NON-PWM application" case.
26k for the "not using a battery, or PWM", case
And, didn't I explain how I chose 260k?
And, "catastrophe"? Isn't that rather dramatic?

“And, "disaster"? Isn't that rather dramatic?”

I don’t think so.

As stated, NOOBs are hammered with connecting the Arduino GND to the external power supply GND.

Your circuit’s ProMini is being powered via +V power supply.

You are connecting the ProMini Vcc (3.3v) to the external load battery supply +3.3v for the circuit return path.

No effort was made to warn the OP to not connect Arduino GND and external power supply GND.

We can all offer weird and wonderful ways of biasing and referencing circuits.
However, we should have the foresight to tell new people what might happen if GNDs are then connected.

EDIT
Now the OP, in post 12/1, is redesigning the circuit so the battery is powering the ProMini.

And, "disaster"? Isn't that rather dramatic?

You'll have to ask Larry about that. That wasn't me.

260k for the "avoiding long term battery drain in a NON-PWM application" case.

And, didn't I explain how I chose 260k?

R1 = (Voutput - VBE)/IB = (3.3V-0.7V)/10µA = 260k

R1 = (VIN-VBE)/IB =(3.3V-0.7)/10uA = 260k

R1 = (Voutput - VBE) * 10/IC = (3.3V-0.7V)*10/1mA = 26k

I think you mean IB here, NOT IC

and 260k NOT 26k

Like this:
R1 = (VIN-VBE)/IB =(3.3V-0.7)/10uA = 260k

Suggest you (OP) make R1 = 1k and R2 = 10k.

If and only if you (OP) need to save on current draw, tune the resistors upwardly.

Edit
You do not need R4.

raschemmel:
I think you mean IB here, NOT IC

and 260k NOT 26k

Like this:
R1 = (VIN-VBE)/IB =(3.3V-0.7)/10uA = 260k

I think you missed the ß of 10. That's what converts IC to IB.

larryd:
As stated, NOOBs are hammered with connecting the Arduino GND to the external power supply GND.

Your circuit’s ProMini is being powered via +V power supply.

You are connecting the ProMini Vcc (3.3v) to the external load battery supply +3.3v for the circuit return path.

No effort was made to warn the OP to not connect Arduino GND and external power supply GND.

We can all offer weird and wonderful ways of biasing and referencing circuits.
However, we should have the foresight to tell new people what might happen if GNDs are then connected.

Good point. Changing it to:

Edit

larryd:

There is no Ground on a battery. "Ground" is an arbitrary concept. Yes, there are cases where the Ground Point is defined, such as on the Arduino [which defines it as the Negative Side of the Voltage Source], but the positive side of a battery can, also, be chosen as "Ground" [have you never heard of a positive ground car?]. Thus, the Circuit Designer as full freedom to place "Ground" wherever he/she chooses. For instance, there are OpAmps, such as the LM324, that are designed to function with a single rail supply, in which case, the inverting input is tied to the negative side of the supply--a side that assumes an identity as "Ground". But, such OpAmps, usually, can function just fine with a dual rail supply. In which case the moniker "Ground" is assigned to the point halfway between the Positive, and Negative supply points.

In my schematic there is the pre-defined Arduino "Ground" [which may, or may not, be connected to the actual physical ground]. And, the MOSFET Drain circuit, has it's own "Common" that is connected to the Arduino's 3V pin, and to the Positive side of the battery -- neither of which is ground [i.e. the *ground* defined by the Arduino].

And, therein lies the source of the confusion: conflating the concept of "Ground", with the concept of "Common". I agree there should be only one "Ground", in the sense that a true Ground is actually connected to the physical ground [i.e. the *Earth*], and there's only one "Earth". But, there can be more than one common, which is the case in this schematic of mine [the one that has raised so much alarm], and connecting two unrelated commons to ground, will likely lead to a short. But, why would anybody do that -- noobs included? It's not part of the schematic -- the schematic clearly shows how things are to be connected.

And, so often, the term "Ground" is used, when it's really a "Common" -- like in the case of the Arduino [where is an Arduino connected to the Earth?!?] It's like how we still say, "The phone is ringing", when, really, its a cellphone playing "We are the champions!". Back in the day, Ground actually meant, It's connected to the Earth.

larryd:

Whence did I use "hfe"? Or, more to the point -- if you saw hfe, then apologies. Must have been a typo, since I fully meant "hFE"

"Ground" is an arbitrary concept

No one is saying otherwise.

But, why would anybody do that -- noobs included?

Why do NOOBs do what they do?

The warning stands as is.

If you are teaching, explain the pitfalls and traps.

Whence did I use "hfe"? Or, more to the point -- if you saw hfe, then apologies. Must have been a typo, since I fully meant "HFE"

Never said or implied you wrote hfe.

This was to show the OP where to get the data from hence the FYI.

Back in the day, Ground actually meant, It's connected to the Earth.

Copper grounding rods are still used in some cases (such as ground-loop problems) or poor grounding issues.

larryd:
Never said or implied you wrote hfe.

This was to show the OP where to get the data from hence the FYI.

Sorry. It was presented in the same context as you scolding me about not save NOOBs from themselves. Thus, I assumed it was further scolding :wink: