Electronics - help needed please

cpedw

Senior Member
I wanted a self-switch-off for a PICAXE project so I knocked up this circuit
23590
The pushbutton applies power to the PICAXE. The PICAXE sets the output high to switch the FET on, keeping the AXE powered when the button is released. The trouble is, it doesn't work. Without the PICAXE in circuit, pulling the gate high worked OK but when connected to the PICAXE, the FET is always on.

Guided by research on the forum, I devised this
23591
It works exactly as required.

My question is why doesn't the first circuit work? As must be obvious, I'm an inexpert electronics designer so an over-simple explanation will be welcome.

Thanks,
Derek

PS the P channel FET is overkill but it's all that I have to hand.
 

rq3

Senior Member
I wanted a self-switch-off for a PICAXE project so I knocked up this circuit
View attachment 23590
The pushbutton applies power to the PICAXE. The PICAXE sets the output high to switch the FET on, keeping the AXE powered when the button is released. The trouble is, it doesn't work. Without the PICAXE in circuit, pulling the gate high worked OK but when connected to the PICAXE, the FET is always on.

Guided by research on the forum, I devised this
View attachment 23591
It works exactly as required.

My question is why doesn't the first circuit work? As must be obvious, I'm an inexpert electronics designer so an over-simple explanation will be welcome.

Thanks,
Derek

PS the P channel FET is overkill but it's all that I have to hand.
A fixed linear regulator like your 7805 "leaks" a constant current (usually about 25 microamps) out of the ground pin, and that current is a function of the output voltage. The regulator does its thing by controlling the output voltage so that the ground current is the constant value it was designed to be for its design output voltage.

In your first circuit, the ground current has no where to go, so it is effectively "bootstrapping" the ground side of the Picaxe towards the 12 volt supply (which you can check with a voltmeter). Because the Picaxe is seeing a higher than normal voltage at BOTH it's Vdd and Vss pins, no harm is done, but the poor Picaxe is neither on or off. It won't run, but it will dribble enough current from its pins to turn the FET on.

I'm assuming you meant the pushbutton switch to be "normally open", and it closes when you push it?
 

depeet

New Member
Is your button normally open or normally closed? If normally closed, the GND-pin of your regulator will always be connected to 0 volt and thus always active. Why don't you use a MOSFET after your regulator, or is it your purpose to disable the LM7805 all together? Anyway, it is not recommended to interrupt the ground terminal of any device. It is more obvious to disable the output or input voltage.
 
Last edited:

cpedw

Senior Member
Yes the pushbutton is "Push to make". Thanks for the responses.

@rq3 thanks for the explanation.

@depeet yes I want to isolate the regulator too. The second circuit shows 0.1μA on my multimeter - the same reading when the meter is open circuit - so I think the job is done satisfactorily.

Derek
 

AllyCat

Senior Member
Hi,
[First diagram in post #1]
......when connected to the PICAXE, the FET is always on.
It's not just an issue of "leakage", but fundamental to the design of (all) Integrated Circuits: ALL IC pins (input and output) have (at least) an internal diode from Ground to the pin, either intentionally to protect against damage from "static electricity" (potentially thousands of volts) or as a parasitic "substrate diode" (the substrate is effectively connected to ground).

Thus, the voltage on your PICaxe output pin can never be lower than Vss (ground) minus approximatly 600 mV (the forward voltage drop of a silicon diode). As soon as the output voltage (applied the gate of your grounded FET) tries to rise above the FET's "threshold" voltage then the FET will be brought into conduction and hold its Drain at that voltage (probably around 3 volts for a 2N7000).

Your second circuit works because it uses a "High Side Switch", which is generally a much "safer" way to control the power to complex devices such as microcontrollers.

Cheers, Alan.
 

depeet

New Member
Another possibility is to use a step-down converter with a shutdown input. Another advantage is that it is more efficient. The LM7805 always need to dissipate power in the form of heat.

23594
 

John West

Senior Member
Hi,

It's not just an issue of "leakage", but fundamental to the design of (all) Integrated Circuits: ALL IC pins (input and output) have (at least) an internal diode from Ground to the pin, either intentionally to protect against damage from "static electricity" (potentially thousands of volts) or as a parasitic "substrate diode" (the substrate is effectively connected to ground).

Thus, the voltage on your PICaxe output pin can never be lower than Vss (ground) minus approximatly 600 mV (the forward voltage drop of a silicon diode). As soon as the output voltage (applied the gate of your grounded FET) tries to rise above the FET's "threshold" voltage then the FET will be brought into conduction and hold its Drain at that voltage (probably around 3 volts for a 2N7000).

Your second circuit works because it uses a "High Side Switch", which is generally a much "safer" way to control the power to complex devices such as microcontrollers.

Cheers, Alan.
Just an aside. I've been known to use appropriate back to back diodes with pull-down resistors in order to get an output to read effectively zero volts.
 
Top