Power On Trigger for 3s, Power Off Trigger for 3s

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!

by gtxviper
September 27, 2018

What you have encountered here is the impossibility of describing technical requirements in mere words. You need to do two things;

  1. Learn to draw circuit diagrams.

  2. Learn to express requirements as truth tables and timing graphs.

These will make it possible for you to formulate your question.

by mikerogerswsm
September 28, 2018

No Answers

No answers yet. Contribute your answer below!


Your Answer

You must log in or create an account (free!) to answer a question.

Log in Create an account


Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

Search Questions & Answers


Ask a Question

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.


About This Site

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.

Acceptable Questions:

  • Concept or theory questions
  • Practical engineering questions
  • “Homework” questions
  • Software/hardware intersection
  • Best practices
  • Design choices & component selection
  • Troubleshooting

Unacceptable Questions:

  • Non-English language content
  • Non-question discussion
  • Non-electronics questions
  • Vendor-specific topics
  • Pure software questions
  • CircuitLab software support

Please respect that there are both seasoned experts and total newbies here: please be nice, be constructive, and be specific!

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.