Author Topic: Soft latch with auto shutdown  (Read 9033 times)

0 Members and 1 Guest are viewing this topic.

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Soft latch with auto shutdown
« on: January 09, 2016, 10:48:38 am »
Hello,
I want to use the soft latch toggle from EEVBlog #262, but with an additional self shutdown after about 30 minutes.
With LTSpice I got something to work. But because of the discharge curve from the cap, I don't get a direct shut down.
How can I do this without using OP-Amp- or Gate-ICs? The circuit needs to be as small and discrete as possible.

Regards from Germany
Robert.
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #1 on: January 09, 2016, 11:02:04 am »
...and also no MCU's. The complete circuit has to be without.
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #2 on: January 09, 2016, 11:52:37 am »
well, very rough scetch  ;)

I will hav a look and think about it.
 

Offline Aodhan145

  • Frequent Contributor
  • **
  • Posts: 403
  • Country: 00
Re: Soft latch with auto shutdown
« Reply #3 on: January 09, 2016, 12:37:43 pm »
Introduce some sort of positive feedback to make the transient period faster.

The attached schematics is improvised, and hence may not work. It is just a framework of how opamp-less hysteresis circuit looks like.

it must of been faster and easier to open your schematics software and export an image than draw that.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Soft latch with auto shutdown
« Reply #4 on: January 09, 2016, 02:16:20 pm »
I built such a circuit just before Christmas.





https://www.eevblog.com/forum/projects/onoff-switch-with-timer/
« Last Edit: January 09, 2016, 02:47:46 pm by Hero999 »
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #5 on: January 09, 2016, 02:19:23 pm »
Hey thats great. Nice Thanks.
I will look at this, too.

What timeperiod does this have?
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #6 on: January 09, 2016, 05:36:15 pm »
Sorry I don't get this. The timing doesn't need to be that exact.

It is supposed to turn off a fan after the user turned it on.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Soft latch with auto shutdown
« Reply #7 on: January 09, 2016, 06:21:54 pm »
I've built the circuit. With the values shown, the delay was about 20 seconds.

MOSFET and JFET transistors are used which only draw a tiny leakage current from the capacitors so long delays aren't a problem.

Increasing the values of C1, R1 & C3 will increase the length of the delay. All capacitors should be film or tantalum, certainly not aluminium which has a very high leakage current. For very long delays you could try omitting R1 altogether but the length of the delay becomes a guess.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Soft latch with auto shutdown
« Reply #8 on: January 09, 2016, 06:28:20 pm »
Err you mean Vdd as it uses FETs, not BJTs ;)

I tested the circuit at 12V. I haven't done any calculations or looked at the waveforms on a 'scope yet though.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Soft latch with auto shutdown
« Reply #9 on: January 09, 2016, 06:35:01 pm »
The only and really only way to do such long-period timing is to use a higher frequency oscillator and frequency divider. Please see for example HEF4060.  By dividng the mains frequency (easy if the device is mains transformer powered), you can getalso almost clock-like precise timing.

Please no 1000uF electrolytic timers. :-D
« Last Edit: January 09, 2016, 06:57:27 pm by Yansi »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Soft latch with auto shutdown
« Reply #10 on: January 10, 2016, 11:01:05 am »
Err you mean Vdd as it uses FETs, not BJTs ;)

I tested the circuit at 12V. I haven't done any calculations or looked at the waveforms on a 'scope yet though.

That's interesting. That means your JFET starts pulling your MOSFET down only at -1.62V Vgs.
That's within the bounds of the specification of the 2N3819.
http://www.onsemi.com/pub_link/Collateral/2N3819-D.PDF

LTSpice's 2N3819 model cuts-off the MOSFET at around -3V.
« Last Edit: January 10, 2016, 11:23:32 am by Hero999 »
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #11 on: January 10, 2016, 04:11:51 pm »
Hey,
I did a little research again.
Now I use a 5V USB-Supply instead of a 9V battary, so I don't need a DC/DC converter anymore. I can use this IC now for a 74HC4060 as a Counter.

I tried to use MOSFETs only. So if I used them in the wrong way, please correct me.
In the schematic the two blocks on the right are a discrete AND and an AND with one inverted input.
These two "gates" switch on/off and reset the counter. The Q8/9 triggers after about 5/10mins for the on-time, and the Q12/13/14
after about 1,5/3/6h for the off-time.

Or am I on the wrong way?

thanks and regards.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Soft latch with auto shutdown
« Reply #12 on: January 10, 2016, 06:40:07 pm »
Oh my, that looks complicated. Can't you simply use the 74HC00?
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #13 on: January 10, 2016, 06:53:37 pm »
The top left block is nearly the same as Dave's. The lower left block is just the 4060.
I don't need 4 NANDs. I just need one AND and one AND with one inverted input.
On the right side are those two "gates" discrete with MOSFETs.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Soft latch with auto shutdown
« Reply #14 on: January 10, 2016, 07:31:28 pm »
I don't understand the circuit.

Do you have Q8 & Q9 and Q12 to Q14 outputs just connected together? If so then this is a bad idea, as CMOS outputs both source and sink current.

EDIT:
You could use the 74HC74 as a divide by 2 counter which resets the counter when deactivated and is reset when the final stage on the counter goes high.

One of the flip-flops is configured as a logic inverter so the other one is reset on an active high, rather than low.

Personally, I'd just use a microcontroller, probably the old PIC12F509 because I have a few handy.
« Last Edit: January 10, 2016, 11:30:07 pm by Hero999 »
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #15 on: January 10, 2016, 09:05:30 pm »
No they will not be connected. There will be some kind of switch to change the intervalls.

The two "gates" have to check if the power is on or off and the coresponding pin on the counter is on. If so, the counter will be reset and the FET, witch replaces the button in Dave's soft latch, will be triggered.
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #16 on: January 10, 2016, 09:40:08 pm »
Yes, I want to minimize it as much as possible. But definitely no MCU. If I find a way to replace this IC with a tiny and slim discrete solution, I will use this. But when I have to use 20/30 or 40 parts, then I'll take the IC. Like my "gates". They need two transistors. And this is great.

The reason is, I want to learn how to design circuits. Use an MCU or a ready-to-use IC won't make me better.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Soft latch with auto shutdown
« Reply #17 on: January 10, 2016, 11:21:38 pm »
No they will not be connected. There will be some kind of switch to change the intervalls.

The two "gates" have to check if the power is on or off and the coresponding pin on the counter is on. If so, the counter will be reset and the FET, witch replaces the button in Dave's soft latch, will be triggered.

Dave's circuit also contains a capacitor which you've missed and the resistor values are wrong.

Your circuit won't work. The MOSFETs in the gates are configured as source followers, with the worst one having three stages cascaded, so their output voltages will be too low to activate the MOSFET.

Yes, I want to minimize it as much as possible. But definitely no MCU. If I find a way to replace this IC with a tiny and slim discrete solution, I will use this. But when I have to use 20/30 or 40 parts, then I'll take the IC. Like my "gates". They need two transistors. And this is great.

The reason is, I want to learn how to design circuits. Use an MCU or a ready-to-use IC won't make me better.
Have you ever used a microcontroller before? If the answer is no then this is a very useful skill to have, just as much as designing circuits.

To help with designing and understanding logic gates and other circuits. I suggest you read about CMOS and different transistor amplifier configurations: common source/emitter, emitter/source follower and common base.

https://wiki.analog.com/university/courses/electronics/electronics-lab-28
http://www.talkingelectronics.com/Download%20eBooks/Principles%20of%20electronics/CH-09.pdf
http://aries.ucsd.edu/NAJMABADI/CLASS/ECE65/13-W/Slides/ECE65_W13-7-Fundamental_Amps.pdf
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Soft latch with auto shutdown
« Reply #18 on: January 11, 2016, 12:16:21 am »
The counter period shortening/reseting is usually done using diodes. No discrete ANDs, no HC00. Simple diodes...
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #19 on: January 11, 2016, 05:18:43 am »

Dave's circuit also contains a capacitor which you've missed and the resistor values are wrong.

Your circuit won't work. The MOSFETs in the gates are configured as source followers, with the worst one having three stages cascaded, so their output voltages will be too low to activate the MOSFET.

I have some laying around witch need 1,5V. I used them in a 3,3V ATmega circuits already. But just copied from an existing project. So I need to know how and why I use them.


Quote
Have you ever used a microcontroller before? If the answer is no then this is a very useful skill to have, just as much as designing circuits.
Yes, I have. And to place a TQFP/SOIC with one decoupling cap and one pin connected to some sort of switch Programmed in C won't teach me something about circuits.


Quote
To help with designing and understanding logic gates and other circuits. I suggest you read about CMOS and different transistor amplifier configurations: common source/emitter, emitter/source follower and common base.
In some tutorials on the web I read I have to connect the gate. It is not supposed to float when there is no signal.


The counter period shortening/reseting is usually done using diodes. No discrete ANDs, no HC00. Simple diodes...
Ok, and how?
« Last Edit: January 11, 2016, 05:20:34 am by bsunisol »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Soft latch with auto shutdown
« Reply #20 on: January 11, 2016, 10:32:21 am »
If programming an MCU is too easy, do it in assembly. ;)

Look up diode gates.

The MOSFET you're using an analogue switch won't work because the body diode will conduct when the source voltage is higher than the drain. To build an analogue switch with discrete components, you'll need at least three MOSFETs: one P-channel and two N-channel. The P-channel and N-channel MOSFETs need to be connected in series (ICs connect them in parallel but you'll need to put them in series, due to the body diodes) and their gates driven opposite signals, hence another N-MOSFET for a logic inverter. It's not worth the bother. Use a proper analogue switch IC such a the 74HC4066. The spare switches can be used to make other logic gates: AND, NAND, OR, NOR etc.

EDIT:
I've just thought about this again. It isn't possible to build an analogue switch which can control signals that extend to the power supply rails, without MOSFETs with a connection to the substrate. Unfortunately all discrete MOSFETs I know of have the substrate connected to the source, forming a parasitic diode connected between the drain and source. If your hell bent on building your own analogue switch, use the CD4007 but you might as well just use the 74HC4066 which is much better.

http://www.nxp.com/documents/data_sheet/74HC_HCT4066.pdf
« Last Edit: January 11, 2016, 01:23:44 pm by Hero999 »
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Soft latch with auto shutdown
« Reply #21 on: January 11, 2016, 12:00:38 pm »
Look up "DTL logic", or only "diode logic" gates. Diode AND is made only by connecting a bunch of diodes together with their anodes, pulling the anode point to V++ with resistor. If any of the cathodes goes low, so does output.
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #22 on: January 12, 2016, 05:45:57 am »
Ok I'll Look up the diode-thing this evening.

But when I look at the avr wrist watch, is uses cmos as switches too.

Anyway. I'll search for DLT first.

Thanks.
 

Offline bsunisolTopic starter

  • Contributor
  • Posts: 27
  • Country: de
Re: Soft latch with auto shutdown
« Reply #23 on: January 12, 2016, 11:42:29 am »
Look up "DTL logic", or only "diode logic" gates. Diode AND is made only by connecting a bunch of diodes together with their anodes, pulling the anode point to V++ with resistor. If any of the cathodes goes low, so does output.

https://en.m.wikipedia.org/wiki/Diode_logic#AND_logic_gate

You mean that right? I just flipped through it, but it looks like what I was searching.

Regards.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Soft latch with auto shutdown
« Reply #24 on: January 12, 2016, 02:18:42 pm »
But when I look at the avr wrist watch, is uses cmos as switches too.
So, what's that got to do with this circuit?

CMOS switches which can switch voltages up to the supply rails are good but it's only possible to make them on an IC.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf