Author Topic: Simple soft power latch circuit...  (Read 5851 times)

0 Members and 1 Guest are viewing this topic.

Offline jtreglosTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Simple soft power latch circuit...
« on: March 17, 2016, 09:27:10 am »
Hello fellow EEVs!

I'm new to this forum, so please be patient if I'm not doing things right :p

I'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 :p

Has 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!
« Last Edit: March 17, 2016, 09:40:54 am by jtreglos »
 

Offline hayatepilot

  • Frequent Contributor
  • **
  • Posts: 263
  • Country: ch
Re: Simple soft power latch circuit...
« Reply #1 on: March 17, 2016, 09:56:25 am »
Try the circuit that Dave draw at 3:00min in the linked episode #262.
This variant doesnt have those current spikes.

Greetings
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: Simple soft power latch circuit...
« Reply #2 on: March 17, 2016, 10:10:06 am »
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. That will turn 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.
« Last Edit: March 17, 2016, 10:13:49 am by janoc »
 

Offline jtreglosTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Simple soft power latch circuit...
« Reply #3 on: March 17, 2016, 10:40:33 am »
@janoc: Thanks for the detailed analysis of the behaviour of the circuit :) But 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  :o

@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 :)
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19544
  • Country: gb
  • 0999
Re: Simple soft power latch circuit...
« Reply #4 on: March 17, 2016, 10:54:57 am »
Why not just use an ordinary bistable multivibrator?


https://en.wikipedia.org/wiki/Multivibrator#Bistable

If the positive side needs to be switched, rather than the negative, just use PNP transistors and exchange the positive and negative connections.

 

Offline hayatepilot

  • Frequent Contributor
  • **
  • Posts: 263
  • Country: ch
Re: Simple soft power latch circuit...
« Reply #5 on: March 17, 2016, 11:08:34 am »
@jtreglos

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

Offline jtreglosTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Simple soft power latch circuit...
« Reply #6 on: March 17, 2016, 11:30:44 am »
@hayatepilot: It works great! Thanks :) Now the "learn to fish" question is: How do you (or Dave) came up with those values? What's the thinking process going on?
 

Offline jtreglosTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Simple soft power latch circuit...
« Reply #7 on: March 17, 2016, 11:33:45 am »
@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 :D
 

Offline hayatepilot

  • Frequent Contributor
  • **
  • Posts: 263
  • Country: ch
Re: Simple soft power latch circuit...
« Reply #8 on: March 17, 2016, 12:36:38 pm »
You want to be able to saturate Q1 at the maximum current.
With hFE you 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.

@Hero999
Wouldn'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
« Last Edit: March 17, 2016, 12:38:26 pm by hayatepilot »
 

Offline jtreglosTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Simple soft power latch circuit...
« Reply #9 on: March 17, 2016, 01:06:42 pm »
@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!
 

Offline hayatepilot

  • Frequent Contributor
  • **
  • Posts: 263
  • Country: ch
Re: Simple soft power latch circuit...
« Reply #10 on: March 17, 2016, 01:24:56 pm »
Does it do that only in the simulation, or on the breadboard too?
May have to do something with the simulation program...
 

Offline jtreglosTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Simple soft power latch circuit...
« Reply #11 on: March 17, 2016, 01:27:28 pm »
Didn't try it in simulation with those values, it does it on the breadboard
 

Offline jtreglosTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Simple soft power latch circuit...
« Reply #12 on: March 17, 2016, 04:22:09 pm »
Nevermind, it isn't doing it anymore (I changed the BC557: Maybe I wrecked it with the previous circuit, as janoc suggested :p )
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: Simple soft power latch circuit...
« Reply #13 on: March 17, 2016, 09:37:17 pm »
@janoc: Thanks for the detailed analysis of the behaviour of the circuit :) But 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  :o

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

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19544
  • Country: gb
  • 0999
Re: Simple soft power latch circuit...
« Reply #14 on: March 17, 2016, 11:39:44 pm »
@Hero999
Wouldn't the multivibrator always draw some current, even in the off state of the device?
That would slowly drain the batttery of a device...
Yes 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/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf