I have a device, powered by USB, that I want to automatically have turn on when it sense's power and turn off when the power is removed.
The device is turned on by holding a push button for at least 1 second but no more than 3 seconds. As at 5 seconds the device enters a reset menu. To turn off, the same process has to be followed or else the internal battey will keep it on for 6 hours. I don't want to remove the battery as sometimes it will be handy to manually turn it on when there is no power.
I soldered two wires and an NO button switch to either side of the device button an this allowed me to function the device.
I was thinking, bearing in mind im a mech eng who really just dabbles with electronics and tends to let the smoke out, that the following solution might work...
A normally open SPST relay (relayBTN) with its switch (relayBTNsw) wired in parallel with the device push button.
In parallel with the device power source would be the relayBTN and one switch (relayTMRsw01) part of a normally closed DPDT relay (relayTMR).
In parallel with the relayBTN would be a capacitor (capBTN) and the second switch (relayTMRsw02) part of a normally closed DPDT relay (relayTMR).
In parallel again would be the relayTMR, a capacitor (capTMR) and a diode.
The idea being... 1) When the power is turned on relayBTNsw closes, capBTN and capTMR both charge. And the device turns on. 2) When capTMR reaches enough voltage, after 2 seconds, relayTMRsw01 & 02 both open stopping capBTN charging and also opening relayBTNsw. And the device avoids going to the reset menu.
As the power remains on, the circuit will stay in the above state.
3) When the power is turned off, capBTN discharges... closing relayTMRsw01 & 02. 4) The relayBTNsw closes as capBTN is discharged. The diode prevents the charge from powering relayTMR again. 5) Once discharged, after 2 seconds, relayBTN opens.
At this point I could power the device on because of the battery and if the power is turned on it would turn the device off.
There must be an easier way of doing this and a way to stop the flip flop effect if I power the device on using the battery?
Every piece of help would be appreciated? A fully drawn circuit diagram with components list of a working idea is definitely worth a few pints!
September 27, 2018
What you have encountered here is the impossibility of describing technical requirements in mere words. You need to do two things;
These will make it possible for you to formulate your question.
September 28, 2018
No answers yet. Contribute your answer below!
Anyone can ask a question.
Did you already search (see above) to see if a similar question has already been answered? If you can't find the answer, you may ask a question.
CircuitLab's Q&A site is a FREE questions and answers forum for electronics and electrical engineering students, hobbyists, and professionals.
We encourage you to use our built-in schematic & simulation software to add more detail to your questions and answers.
Please respect that there are both seasoned experts and total newbies here: please be nice, be constructive, and be specific!
CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.
|New @ CircuitLab|