Soft latch with auto shutdown - Page 1
Forum section: electronics / beginners

author: bsunisol
author_rank: Contributor
timestamp: January 09, 2016, 10:48:38 am
content: 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 GermanyRobert.

author: bsunisol
author_rank: Contributor
timestamp: January 09, 2016, 11:02:04 am
content: ...and also no MCU's. The complete circuit has to be without.

author: bsunisol
author_rank: Contributor
timestamp: January 09, 2016, 11:52:37 am
content: well, very rough scetchI will hav a look and think about it.

author: Aodhan145
author_rank: Frequent Contributor
timestamp: January 09, 2016, 12:37:43 pm
content: Quote from: blueskull on January 09, 2016, 11:20:14 amit must of been faster and easier to open your schematics software and export an image than draw that.

author: Zero999
author_rank: Super Contributor
timestamp: January 09, 2016, 02:16:20 pm
content: I built such a circuit just before Christmas.https://www.eevblog.com/forum/projects/onoff-switch-with-timer/

author: bsunisol
author_rank: Contributor
timestamp: January 09, 2016, 02:19:23 pm
content: Hey thats great. Nice Thanks.I will look at this, too.What timeperiod does this have?

author: bsunisol
author_rank: Contributor
timestamp: January 09, 2016, 05:36:15 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: January 09, 2016, 06:21:54 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: January 09, 2016, 06:28:20 pm
content: Err you mean Vdd as it uses FETs, not BJTsI tested the circuit at 12V. I haven't done any calculations or looked at the waveforms on a 'scope yet though.

author: Yansi
author_rank: Super Contributor
timestamp: January 09, 2016, 06:35:01 pm
content: 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

author: Zero999
author_rank: Super Contributor
timestamp: January 10, 2016, 11:01:05 am
content: Quote from: blueskull on January 09, 2016, 06:59:51 pmThat's within the bounds of the specification of the 2N3819.http://www.onsemi.com/pub_link/Collateral/2N3819-D.PDFLTSpice's 2N3819 model cuts-off the MOSFET at around -3V.

author: bsunisol
author_rank: Contributor
timestamp: January 10, 2016, 04:11:51 pm
content: 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/14after about 1,5/3/6h for the off-time.Or am I on the wrong way?thanks and regards.

author: Zero999
author_rank: Super Contributor
timestamp: January 10, 2016, 06:40:07 pm
content: Oh my, that looks complicated. Can't you simply use the 74HC00?

author: bsunisol
author_rank: Contributor
timestamp: January 10, 2016, 06:53:37 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: January 10, 2016, 07:31:28 pm
content: 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.

author: bsunisol
author_rank: Contributor
timestamp: January 10, 2016, 09:05:30 pm
content: 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.

author: bsunisol
author_rank: Contributor
timestamp: January 10, 2016, 09:40:08 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: January 10, 2016, 11:21:38 pm
content: Quote from: bsunisol on January 10, 2016, 09:05:30 pmDave'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.Quote from: bsunisol on January 10, 2016, 09:40:08 pmHave 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-28http://www.talkingelectronics.com/Download%20eBooks/Principles%20of%20electronics/CH-09.pdfhttp://aries.ucsd.edu/NAJMABADI/CLASS/ECE65/13-W/Slides/ECE65_W13-7-Fundamental_Amps.pdf

author: Yansi
author_rank: Super Contributor
timestamp: January 11, 2016, 12:16:21 am
content: The counter period shortening/reseting is usually done using diodes. No discrete ANDs, no HC00. Simple diodes...

author: bsunisol
author_rank: Contributor
timestamp: January 11, 2016, 05:18:43 am
content: Quote from: Hero999 on January 10, 2016, 11:21:38 pmI 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.QuoteYes, 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.QuoteIn some tutorials on the web I read I have to connect the gate. It is not supposed to float when there is no signal.Quote from: Yansi on January 11, 2016, 12:16:21 amOk, and how?

author: Zero999
author_rank: Super Contributor
timestamp: January 11, 2016, 10:32:21 am
content: 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

author: Yansi
author_rank: Super Contributor
timestamp: January 11, 2016, 12:00:38 pm
content: 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.

author: bsunisol
author_rank: Contributor
timestamp: January 12, 2016, 05:45:57 am
content: 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.

author: bsunisol
author_rank: Contributor
timestamp: January 12, 2016, 11:42:29 am
content: Quote from: Yansi on January 11, 2016, 12:00:38 pmhttps://en.m.wikipedia.org/wiki/Diode_logic#AND_logic_gateYou mean that right? I just flipped through it, but it looks like what I was searching.Regards.

author: Zero999
author_rank: Super Contributor
timestamp: January 12, 2016, 02:18:42 pm
content: Quote from: bsunisol on January 12, 2016, 05:45:57 amSo, 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.