Simple soft power latch circuit... - Page 1
Forum section: electronics / beginners

author: jtreglos
author_rank: Newbie
timestamp: March 17, 2016, 09:27:10 am
content: Hello fellow EEVs!I'm new to this forum, so please be patient if I'm not doing things right :pI'm working on a simple 2 buttons soft power latch circuit, and got inspiration from circuits by Dave (www . youtube . com/watch?v=Foc9R0dC2iI) and Kedar (http://www.instructables.com/id/Soft-Latching-Power-Switch-ON-OFF-Circuit). You'll find the schematic attached.I simulated the circuit in LTSpice before breadboarding it, and I have an issue with the circuit: The "On" pushbutton works like a charm, but the "Off" pushbutton seems to short the circuit when depressed! It does work though, the circuit is turned off once released. But you better not keep your finger on the button too long! In LTSpice I can indeed see a big 12A current spike when I simulate the switching off, and on the breadboard, well... Let's just say I'm happy my lab power supply is short-protected :pHas anyone an idea on how to avoid this shorting while keeping the circuit working?Oh, and just by curiosity, does someone knows why when I simulate the circuit in LTSpice, the circuit starts in the "On" mode, while in the real breadboard world, it starts in the "Off" mode?In advance, thanks for your help!

author: hayatepilot
author_rank: Frequent Contributor
timestamp: March 17, 2016, 09:56:25 am
content: Try the circuit that Dave draw at 3:00min in the linked episode #262.This variant doesnt have those current spikes.Greetings

author: janoc
author_rank: Super Contributor
timestamp: March 17, 2016, 10:10:06 am
content: That circuit is a poor design that will likely blow the BC557.When the circuit is on, the BC557 is conducting and keeping the base of BC547 at Vcc, latching the circuit on.Now if you press the Off button, you short the emitter of the BC557 (which is at Vcc potential) to ground. Thatwillturn the BC547 off (it has no base current anymore) which will in turn put the base of BC557 to Vcc turning it off also.However, it will also likely blow the BC557 over time because until the BC547 turns off (real transistors don't switch instantaneously as opposed to a simulation), the BC557 is acting as a dead short across the supply rails while the Off button is pressed ... So you get a nice current spike likely over the 100mA (200mA pulsed) max rating of that transistor.Take the designs from Instructables (or anywhere on the internet) with a BIG grain of salt - there are tons of designs around that are only marginal at best. In the worst case they don't work at all and you will destroy something.

author: jtreglos
author_rank: Newbie
timestamp: March 17, 2016, 10:40:33 am
content: @janoc: Thanks for the detailed analysis of the behaviour of the circuitBut I have a question: You say that when the BC547 turns off, the base of the BC557 will be put to Vcc... I can't get my head around this, I don't understand the mechanism that will put the base of the BC557 to Vcc in this case@hayatepilot: I tried the circuit from Dave's video, using two 1k resistors (see the attached schematic). At least now I don't get current spikes! Thanks for the tip... But with this circuit and those resistor values, The Off pushbutton turns the power Off while depressed, but it turns back On when released. So my question is: how do I calculate the values for the resistors to get the correct behavior?Thanks guys, I'm beginning to understand

author: Zero999
author_rank: Super Contributor
timestamp: March 17, 2016, 10:54:57 am
content: Why not just use an ordinary bistable multivibrator?https://en.wikipedia.org/wiki/Multivibrator#BistableIf the positive side needs to be switched, rather than the negative, just use PNP transistors and exchange the positive and negative connections.

author: hayatepilot
author_rank: Frequent Contributor
timestamp: March 17, 2016, 11:08:34 am
content: @jtreglosI found a variant on Dave's circuit with values:R1 acts as a pullup resistor and keeps the circuit from turning on on it's own.

author: jtreglos
author_rank: Newbie
timestamp: March 17, 2016, 11:30:44 am
content: @hayatepilot: It works great! ThanksNow the "learn to fish" question is: How do you (or Dave) came up with those values? What's the thinking process going on?

author: jtreglos
author_rank: Newbie
timestamp: March 17, 2016, 11:33:45 am
content: @Hero999: Even though Dave's circuit now works, just by curiosity I'm gonna try the bistable multivibrator you showed me... And mesure both circuits "Off" mode power consumption

author: hayatepilot
author_rank: Frequent Contributor
timestamp: March 17, 2016, 12:36:38 pm
content: You want to be able to saturate Q1 at the maximum current.With hFEyou can calculate the required base current.Then you can use ohms law to calculate the maximum value for R2 to achieve that base current.Of course you have to take a lower value for safety margin. At least a factor of 2 lower.But the lower the value the higher the power consumption of the switch will be.The same calculation principle applies to the value of R3. It can be much higher than R2 because Q2 only has to drive a very small current.The exact values aren't critical at all, as long as they are lower than the calculated maximum.@Hero999Wouldn't the multivibrator always draw some current, even in the off state of the device?That would slowly drain the batttery of a device...Greetings

author: jtreglos
author_rank: Newbie
timestamp: March 17, 2016, 01:06:42 pm
content: @hayatepilot: Ok thanks for the explanation. After more testing, I just realized I didn't wait long enough when I told you it was working fine with Dave's values: When I press the Off button and release it, the power is off, but it switches back on by itself after 10-15s!

author: hayatepilot
author_rank: Frequent Contributor
timestamp: March 17, 2016, 01:24:56 pm
content: Does it do that only in the simulation, or on the breadboard too?May have to do something with the simulation program...

author: jtreglos
author_rank: Newbie
timestamp: March 17, 2016, 01:27:28 pm
content: Didn't try it in simulation with those values, it does it on the breadboard

author: jtreglos
author_rank: Newbie
timestamp: March 17, 2016, 04:22:09 pm
content: Nevermind, it isn't doing it anymore (I changed the BC557: Maybe I wrecked it with the previous circuit, as janoc suggested :p )

author: janoc
author_rank: Super Contributor
timestamp: March 17, 2016, 09:37:17 pm
content: Quote from: jtreglos on March 17, 2016, 10:40:33 amWhen the BC547 in your original circuit is conducting, there will be around 0.4-0.7V drop on it (assuming it is in saturation). That means that its collector is sitting essentially at 0V - the transistor is acting as a "short" to ground through the load (ok, minus the voltage drops on the load + transistor, but that's not important now).Now when it stops conducting (goes "open circuit"), the collector will not be at ground potential anymore, because there is nothing to "pull it down" anymore there. Because the collector is connected to Vcc through that 1k resistor, you will get Vcc on the base of the BC557 (which is connected to the collector of the BC547) too and that will make it to stop conducting as well (it is a PNP transistor).That's all.

author: Zero999
author_rank: Super Contributor
timestamp: March 17, 2016, 11:39:44 pm
content: Quote from: hayatepilot on March 17, 2016, 12:36:38 pmYes but replacing one of the transistors with a MOSFET and using high resistor values, the current draw can be minimal.I designed a similar circuit awhile ago but it has a timeout and one button to set/reset it.https://www.eevblog.com/forum/projects/onoff-switch-with-timer/