Need advice on designing simple delayed latching power switch - Page 1
Forum section: electronics / projects

author: reddsta87
author_rank: Newbie
timestamp: June 17, 2019, 01:33:21 pm
content: Good morning everyone. I'm a electronics repair professional with years of experience on fixing broken electronics but never designed a circuit from scratch before. My boss tasked me to figure out a simple switch to turn on and off a device that is normally always on when not plugged up to a charger. It is a vibrating notification device, kind of like those things they give you at restaurants that let you know your table is ready, except used for a more industrial purpose and important that it stays on. I believe he is wanting just a simple toggle switch, but thing is that a regular toggle switch could be turned off without the person knowing by accident. So I decided to try my hand at a design that I've seen used regularly in things like cellphones and in the eevblog video. What I would like the switch to do, is be a pushbutton latching power switch that has a delay; so when pressed briefly, nothing happens. But when pressed for 3 to 5 seconds it toggles either on or off. It seems like i need to add a capacitor to slowly charge when the button is pressed that will eventually get to a high enough voltage to activate the gate of either the mosfet or transistor but that's where my lack of EE experience catches up with me. Any advice on where I should put a capacitor and how to properly calculate the RC time constant to get a good enough delay. Any advice would help a lot. This is kind of intimidating for me being one of the first "from scratch" designs I've tried doing.

author: paulca
author_rank: Super Contributor
timestamp: June 17, 2019, 02:49:34 pm
content: This might give you some ideas:

author: Ian.M
author_rank: Super Contributor
timestamp: June 17, 2019, 04:02:56 pm
content: Any time you want a simple circuit using discretes and/or analog ICs, with a delay of several seconds.its potentially problematic. A RC network with a time constant of 5 seconds needs either a large low leakage capacitor or a large resistor or both. e.g. 1.5uF with a 3.3 Meg resistor gives you a time constant of fractionally under five seconds.Unfortunately large capacitors in physically compact packages tend to have high leakage currents and be significantly temperature sensitive, and even slight surface contamination in parallel with a high value resistor can significantly lower its effective resistance. That all tends to make simple long period timers unreliable.Its probably worth looking at using a low pin count MCU to interpret the button pushes, check they are long enough, and toggle an output to switch an external MOSFET to control power to the device. If the supply voltage is outside the range 2V to 5.5V, it will probably also need a regulator to power the MCU.

author: Zero999
author_rank: Super Contributor
timestamp: June 17, 2019, 04:32:36 pm
content: I've done a similar thing before. Fairly long delays are possible with discrete components, using tantalum capacitors, J-FETs and high value resistors. The problem is accuracy, although that's often not important.https://www.eevblog.com/forum/projects/onoff-switch-with-timer/msg825310/#msg825310I definitely agree with the idea of using a small microcontroller.

author: reddsta87
author_rank: Newbie
timestamp: June 21, 2019, 12:35:09 pm
content: Thank you for the link! That seems just what I'm looking to do minus the reset and auto-sleep modes. I have a bunch of mosfets on hand but none that are equivalent to the irl540 like in the final schematic or the 2n7000. I also noticed that you are referencing a +12 DC input. Would using a 9V battery change the transistor/mosfet/capacitor values i should use? If so what should I be looking at on the mosfet specs to tell me which ones I should be using?( i.e:Struct =MOSFET;Polarity =N;Pd >125W;Vds >100V;Vgs >0V;Vgs(th) <2V;Id >24A;Tj >0C;Qg <64nC;tr <0nS;Cd <0pF;Rds <0.11Ohm;Caps =TO220)

author: Zero999
author_rank: Super Contributor
timestamp: June 21, 2019, 01:00:12 pm
content: The circuit should work from 9V.I don't know whether that MOSFET is suitable or not, because it depends on how much current the load requires.

author: reddsta87
author_rank: Newbie
timestamp: June 21, 2019, 02:38:40 pm
content: Ive measured the current draw from the load while idle at 3 to 4 mA. It uses a small 3v vibrator motor when activated (http://www.vibration-motor.com/products/download/Z7AL2B1692612.pdf) I don't know if the current draw matters when its first turned on or when the motor kicks in.

author: reddsta87
author_rank: Newbie
timestamp: June 21, 2019, 02:46:12 pm
content: http://www.vibration-motor.com/products/download/Z7AL2B1690002.pdfa better link to the specs of the motor

author: Zero999
author_rank: Super Contributor
timestamp: June 24, 2019, 07:56:56 am
content: I thought you said the power supply was 9V? If the load is only rated to 3V, then it will be damaged, if powered from 9V.The MOSFET's drain current (ID) is the specification you're after: it needs to be greater than the load current.

author: reddsta87
author_rank: Newbie
timestamp: June 24, 2019, 11:00:53 am
content: The voltage is stepped down to 3V. The power supply is a 9V battery yes but the battery also powers an ir receiver that tells the device when to turn on the vibrator motor.