Go Down

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

#### larryd

#30
##### Jul 31, 2019, 10:21 pmLast Edit: Jul 31, 2019, 10:24 pm by larryd
"Because I was unraveling the OPs given circuit "
Now that does make a lot of sense.
Notice she/he has modified the their schematic in post #1.

"When they do run into problems"
The operative word is "When"

"I still wouldn't call that a rule of thumb.  Its a common practice. "
I said it's 'my' rule of thumb.
And I finished with "best practices".

I think we scared off the OP

No technical PMs.
If you need clarification, ask for help.

#### ReverseEMF

#31
##### Jul 31, 2019, 10:26 pm
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.
I think the defining distinction, here, is the battery is not connected across the Arduino's 3.3V output, merely referenced to it.  There's a big difference.  If it were connected across the 3.3V supply, then I would agree.  But, if what you are saying were true, then it would be impossible to control one powered circuit, with another circuit having a different power source.
For example, a voltage translator.  Used, for instance, to translate a 3.3V output, into a 5V input.  The two devices would need to have a reference connection between them [typically called a "ground", or a "common"]. They have different power supplies, but are connected together, so one voltage system can influence the other voltage system.  Yes, this reference connection is typically between the negative side of each of the supplies.  But, there are cases where the Negative on one will be connected to the Positive on the other.  Or, where two Positives will be connected together.  In other words, polarity is ambiguous.
"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

#32
##### Jul 31, 2019, 10:29 pm
"Because I was unraveling the OPs given circuit "
Now that does make a lot of sense.
Notice she/he has modified the their schematic in post #1.

"When they do run into problems"
The operative word is "When"

"I still wouldn't call that a rule of thumb.  Its a common practice. "
I said it's 'my' rule of thumb.
And I finished with "best practices".

I think we scared off the OP
Please us the Quoting feature -- otherwise it very difficult to sort out the narrative.
"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

#33
##### Jul 31, 2019, 10:40 pm
I think that whole referencing/connecting issue would be best be eliminated by using an opto-isolator
to drive the mosfet that switches the battery to the HC-12 module. That way there is complete isolation
between the Pro-Mini and the circuit it is switching on and off.

Quote
I think we scared off the OP
I've seen threads where the OP had 2 posts and the thread took on a life of it's own by triggering a debate
between 6 senior members that went on for more than 30 posts...

I'm sure you have seen similar cases where the OP gets buried alive under very technical replies and his brain explodes...
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

#### ReverseEMF

#34
##### Jul 31, 2019, 10:41 pm

This is revision 1 of the schematic that I've modified according to the inputs given so far:
• In the original schematics the emitter of the transistor was connected to VCC instead of GND.
• This revision uses an NDP6020P logic level MOSFET 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.

The circuit is part of a battery powered IOT application where a minimal power consumption and voltage drop are crucial. After some research I came to the above solution to switch all unused components off while an Atmega328P is in deep sleep.
The LED is just 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.
[End Edit]
Probably wise to put these Updates in a new post, otherwise we're likely to not see them.

Also, because you're using a MOSFET that is designed to switch a lot of current, it's likely to have a large input capacitance.  As such, your Bipolar transistor will need to supply enough current to charge and discharge that capacitance, otherwise the MOSFET will turn ON and OFF more slowly than it's capable of doing.  For this case it's not an issue, but when you start switching higher currents, this might become important.
As for how to determine the values -- there's math, but I'm more of a back-of-the-envelop designer.  I use simplistic math to get into the ballpark, then I breadboard it up and watch for smoke.  There are others, here, who's math and methods are far more sophisticated.
But, there is always the ole rule-of-thumb that says: Over drive everything to make sure it works! -- like LarryD's 1K and 10k.  But, because you're dealing with a battery, more sophistication is probably in order.  So, hopefully someone else will help you with that.
"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

#35
##### Jul 31, 2019, 10:41 pmLast Edit: Jul 31, 2019, 10:46 pm by larryd
"Over drive everything to make sure it works! "
And Larryd said to tune the values upward if power draw was an issue.

One 'final' note, the way you have the circuit drawn the gate to source sees either 3.3 volts or a resistor terminated gate potential.

If there was a length of wire connecting the gate to the collector (when the load is at a distance) noise might cause problems.

It is best to have the gate going from 0v to 3.3v, as achieved with common ground return.

I once again offer the OP:

Condolences to the OP.

No technical PMs.
If you need clarification, ask for help.

#### ReverseEMF

#36
##### Jul 31, 2019, 10:45 pm
I think that whole referencing/connecting issue would be best be eliminated by using an opto-isolator
to drive the mosfet that switches the battery to the HC-12 module. That way there is complete isolation
between the Pro-Mini and the circuit it is switching on and off.
Sure, in some cases, but to offer that as a panacea, ignores the specific case.  And, the specific case is yet to be determined -- merely because, it hasn't been offered yet.  Probably because the OP is still in an experimentation phase.
"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

#37
##### Jul 31, 2019, 10:47 pmLast Edit: Jul 31, 2019, 10:48 pm by raschemmel
I'll take the schematic in Reply#35 over the one in #34 any day because it does not have the battery
across the promini 3.3V.

@OP
HELLO !
ANYBODY HOME ?
Are you still there ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

#### larryd

#38
##### Jul 31, 2019, 10:51 pmLast Edit: Jul 31, 2019, 10:51 pm by larryd
@ReverseEMF

Removing images from a post makes subsequent responses hard to follow.

No technical PMs.
If you need clarification, ask for help.

#### raschemmel

#39
##### Jul 31, 2019, 10:54 pm
Quote
Removing images from a post makes subsequent responses hard to follow.
The exception being when you say something and then wake up in the middle of the night and realize
somebody might interpret it in a negative way and go back and change it or remove the post entirely
hoping nobody saw it because they were out on the town and didn't have access to the net.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

#40
##### Jul 31, 2019, 11:49 pm
Why isn't R2 replaced with R3 and the LED? Would make things simpler. No need for the P-Mosfet.
Or replace the NPN with an N-Mosfet, one that turns on full with >2.5V gate voltage.
I saw one mentioned in the forum pretty recently.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### larryd

#41
##### Aug 01, 2019, 12:19 amLast Edit: Aug 01, 2019, 12:20 am by larryd
Would be best to use a a N channel MOSFET, 2.5v turn ON are not too available.

I do not like 3.3v logic.

Only argument to use a P channel is if you need 0v across the load when MOSFET is turned off 'and' need a GND reference on the load.

P channel small lower power SMDs
AO3401
FDN340P
Si2301DS

N
IRLML2502
Si2302DS

No technical PMs.
If you need clarification, ask for help.

#### jaron

#42
##### Aug 03, 2019, 09:10 am
I'm still here and thanks to @ll for the information so far. This is obviously not my full time job and it'll take some time for me to extract the information from the hissing.
I've received an NDP6020P MOSFET and the bit of testing I've done so far wasn't successful. I will post more as soon as I've got some usable results and maybe more questions.

Go Up