Go Down

Topic: Resistor values for P-Channel MOSFET + NPN Transistor Switch (Read 722 times) previous topic - next topic

larryd

"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.




No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

raschemmel

Quote
And, "disaster"? Isn't that rather dramatic?
You'll have to ask Larry about that. That wasn't me.



Quote
260k for the "avoiding long term battery drain in a NON-PWM application" case.
Quote
And, didn't I explain how I chose 260k?  
Quote
R1 = (Voutput - VBE)/IB = (3.3V-0.7V)/10µA = 260k
R1 = (VIN-VBE)/IB =(3.3V-0.7)/10uA = 260k


Quote
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


Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

larryd




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.





No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

ReverseEMF

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.
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

ReverseEMF

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:

"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

larryd




Edit




No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

ReverseEMF


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.
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

ReverseEMF


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"
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

larryd

Quote
"Ground" is an arbitrary concept
No one is saying otherwise.



Quote
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.




Quote
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.


No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

raschemmel

Quote
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.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

ReverseEMF

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 ;)
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

larryd

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 ;)
There is no scolding here.


The point was new people here often have difficulties reproducing simple schematics to actual circuits.

Any kind of multiple power supply situations quite often gets NOOBs confused and into problems.

When they do run into problems, they are often asked to take test measurements and confirm GNDs are connected.


As mentioned by you, there are things called "Rule of thumb . . . .", rules of thumb are great.
Well, it is 'my opinion' (yes 'my' opinion) and Rule of thumb, that for interconnected power supplies, use 0V, GND, negative as a return path.
Yes you can connect the positive of a battery to the 0 volt pin of another power supply.
Yes you can connect the positive of a battery to the positive of another power source.
Doing so is not wrong but following my rule of thumb keeps new people on a even footing where they hopefully don't experience problems.

I digress.
Points have been made, we are all trying to help NOOBs learn and avoid making mistakes by teaching them to follow best practices.



No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

raschemmel

I think it is more important to emphasis that a voltage regulator output (like the 3.3V output) should not
be connected to a power source (like the battery). There is no reason why it is still connnected.
Whether or not the GND is connected is almost beside the point because a battery shouldn't be connected to a regulator output. I think it is easier for a NOOB to remember that than it is to determine whether there is a current loop between the battery and the regulator based on whether the Vcc & GND are BOTH connected to the battery.

So why is it connected to the regulator output ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

ReverseEMF

So why is it connected to the regulator output ?
Because I was unraveling the OPs given circuit -- with the assumption that they asked so I responded.  But, I probably should have asked, up front, why the heck they are doing that -- rather than asking later.
There is no scolding here.
I was being facetious [i.e. tongue-in-cheek]  :)  

The point was new people here often have difficulties reproducing simple schematics to actual circuits.

Any kind of multiple power supply situations quite often gets NOOBs confused and into problems.
True.

When they do run into problems, they are often asked to take test measurements and confirm GNDs are connected.
The opposite of this case.  The grounds are connected. AND, there's a second common, which, also, is connected.

As mentioned by you, there are things called "Rule of thumb . . . .", rules of thumb are great.
Well, it is 'my opinion' (yes 'my' opinion) and Rule of thumb, that for interconnected power supplies, use 0V, GND, negative as a return path.
Which is silly !  And not of the real world.  It's the common case, but not the general case.  But, I see your position of not confusing the NOOB.  So, maybe the appropriate language is: "For now, lets only talk about Ground as negative, but some day..."


Yes you can connect the positive of a battery to the 0 volt pin of another power supply.
Yes you can connect the positive of a battery to the positive of another power source.
Doing so is not wrong but following my rule of thumb keeps new people on a even footing where they hopefully don't experience problems.
I still wouldn't call that a rule of thumb.  Its a common practice.   But, that's not quite the same thing.

And, again, bottom line.  I was merely showing the OP how the circuit they supplied might manage to do something.

"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

raschemmel

Quote
yes you can connect the positive of a battery to the positive of another power source
If by power source you mean the OUTPUT pin of the ProMini 3.3V regulator then it IS WRONG.

You should NEVER connect the OUTPUT of a voltage regulator to the positive terminal of a battery.

(the only exception is an experienced engineer designing a circuit who is careful to NOT provide a RETURN path for the battery to the regulator GND. (I believe this is what Larry was referring to ), but since we are talking to NOOBs and not engineers, I think it is best to simply issue a blanket warning to never connect the output of a regulator to the Positive of a batter.
Just to be clear (for the NOOBS) , there is nothing wrong with putting a battery in series with the ProMini 3.3V by connecting the NEGATIVE of a 1.5V alkaline AA battery to the 3.3V regulator OUTPUT pin and using the POSITIVE of the 1.5V battery as a 4.8V dc OUTPUT using the ProMini GND.

Quote
>> 3.3+1.5

ans =  4.8000
Look at the Supply Voltage specs for TTL Logic ICs

The supply voltage can be as low as 4.75V so if you need to power TTL 5V logic ICs, you can simply
put a AA battery in series with the 3.3V to shift the voltage to 4.8V.

The current through the series battery loop is limited to the power source with the highest internal
resistance so (for example) :

if a 3.3V regulator can source 800mA and an alkaline battery can source 1A, the maximum
current you could source with the series combination would be 800mA

So, to recap, while it is a no no (in general) to connect the + terminal of a battery to the output of the
3.3V regulator, there is no limit to how many series batteries you can connect to it.

CASE 2:
You have a ProMini which only outputs 3.3V from the regulator but you have an unregulated 9V input
connected the the RAW Input and you need 12V for some device (ie: relay or solenoid or whatever).
You can connect two AA or AAA batteries in series with the 9V to get 12V or you could connect a 6-battery AAA pack in series to shift the 3.3V to 12.3V . (using the ProMini GND as your return)



Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Go Up