My latching circuit starts in an unexpected state

Thread Starter

magic_blue_smoke

Joined Dec 19, 2020
3
I've built this circuit with soft-latching on and off buttons, and I have two main questions:

https://www.falstad.com/circuit/cir...AADIGgCCABEN9rylW6RP99wAIoAVQAogBlAAqAEknYwgA


The circuit is meant to one that latches on when the 'on' momentary switch is pressed, and which would then power a microcontroller. The microcontroller would be able to turn the power off when it has finished its work. For now, I have modelled the microcontroller as a simple LED with resistor, and I have modelled the off signal with another momentary switch.
The momentary switches should work interactively in the linked version.

Question 1 is:
In the simulation, the circuit is initially 'off'. But when in real life when I built the circuit on breadboard, it seems to start in an 'on' state. Is there a modification I can/should make to have it start in an 'off' state? I already pull the base of the PNP up to vcc which I thought should do the trick.
The on/off buttons do work as expected, which is enough for my use case. I'm just curious/interested.

Question 2 is:
If the 'on' momentary switch is pressed and held down, I can see that current passes through the base of the NPN transistor and out of the collector. I have marked this on my circuit with the label 'QUESTION'.
Is this bad? I could stop this from happening by replacing that labelled wire with a diode, but my question is whether that's something that I should do, or is it okay to leave it as it is?

It might be useful to point out that I'm just a beginner.

Thanks
 
Last edited:

eetech00

Joined Jun 8, 2013
3,421
I've built this circuit with soft-latching on and off buttons, and I have two main questions:

https://www.falstad.com/circuit/cir...AADIGgCCABEN9rylW6RP99wAIoAVQAogBlAAqAEknYwgA


The circuit is meant to one that latches on when the 'on' momentary switch is pressed, and which would then power a microcontroller. The microcontroller would be able to turn the power off when it has finished its work. For now, I have modelled the microcontroller as a simple LED with resistor, and I have modelled the off signal with another momentary switch.
The momentary switches should work interactively in the linked version.

Question 1 is:
In the simulation, the circuit is initially 'off'. But when in real life when I built the circuit on breadboard, it seems to start in an 'on' state. Is there a modification I can/should make to have it start in an 'off' state? I already pull the base of the PNP up to vcc which I thought should do the trick.
The on/off buttons do work as expected, which is enough for my use case. I'm just curious/interested.
Change the pull-up resistor to about 10x the base resistor, so if base is 3.3k, pullup should be 33k.

Question 2 is:
If the 'on' momentary switch is pressed and held down, I can see that current passes through the base of the NPN transistor and out of the collector. I have marked this on my circuit with the label 'QUESTION'.
Is this bad? I could stop this from happening by replacing that labelled wire with a diode, but my question is whether that's something that I should do, or is it okay to leave it as it is?
Add pull down to base of the "off" NPN so it doesn't "float". This ensures the NPN is "off". So if base is 3.3k, pullup should be 33k.
 

crutschow

Joined Mar 14, 2008
32,848
A small capacitor (e.g. 100nF) from the left NPN base connection to ground (please label the parts on the schematic) should also help.
 
Top