0

I have a few electronics projects in progress and would like to include a switch to reset by providing a short disconnect from power (be it from the wall or a battery) and on boot copy the original configuration over the in-use configuration so that as a last resort any problems can be reversed.

My issue is that to trigger this I would like to use a momentary switch, but only have it activate the reset if it's pressed and then held for five seconds. I can't seem to find an answer as to how to do this on Google or YouTube and didn't see anything on SE before posting.

Could someone help me out here?

3 Answers3

0

You would need the switch to trigger a timer of some sort. The 555 is one way. A quick google turned up this page, but there are thousands more examples of this.

nsayer
  • 1,573
  • 1
  • 18
  • 35
  • I'd seen circuits requiring 555s and that seemed find, but as I was reading them I didn't read any of the circuits as doing specifically what I wanted to do so much as determining how long the switch's action would be powered based on a momentary switch being closed. If I just misread something (as I found a shitload of 555 results too) my bad. – Diagram Alley Oct 09 '21 at 01:03
0

Either purchased or assembled, you will need an electronic circuit to create the delayed action. Your question is lacking many details necessary to recommend anything specific. In general, since the switch will be held down throughout the delay period, you do not need a true monostable circuit. A simple R-C integrator and switching device will work. This can be one or two transistors, a 555, one part of any of several CMOS logic chips, a unijunction transistor, etc. But - need more data.

What is the power source for the timing circuit?

What load does the output of the timing circuit drive? Microcontroller Reset input / solid-state relay / etc?

What are the load characteristics? Voltage / current / impedance - ?

What is the output logic polarity? That is, after the timer period, does the circuit output go high or low?

What is the intended use / market / environment?

With this information, I can add a schematic to this answer.

AnalogKid
  • 19,998
  • 1
  • 13
  • 32
  • Yeah, what I was asking how to configure a switch I meant how would I configure the circuit running the switch. Terrible wording on my part.

    Powered by the CR2012 that provides necessary power to an RTC when main power is disconnected.

    Almost no load, it initiates an overwrite of the on-board memory of the microcontroller which is stored in a flash EEPROM so if user customization or fiddling or just an unsolvable problem occurs the on-board memory is overwritten by the factory (as it were) image and then disconnects the power to ensure it reboots and uses that restored factory image.

    – Diagram Alley Oct 09 '21 at 01:11
  • Intended usage is to reset to factory firmware in case of excessive customization, corruption of function by software modification or persistent software issue that is unresolvable. On-board flash EEPROM carries shipped image of on-board memory and a tiny sub-microcontroller for just this purpose, when triggered, overwrites the main on-board memory in the primary microcontroller back to factory. Intended audience is advanced users or IT/engineer of customer who make mistakes in altering on-board firmware. Software enviro is a customized ARM linux with python and physical environment is outdoor – Diagram Alley Oct 09 '21 at 01:19
0

The LTC2950 is designed to do what you want. On a long press it sends out a signal that can be used to perform some function before actually shutting down.

From the Datasheet

The LTC ® 2950 is a micropower, wide input voltage range, pushbutton ON/OFF controller. The part contains a pushbut- ton input with independently programmable ON and OFF debounce times that control the toggling of an open drain enable output. The part also contains a simple micropro- cessor interface to allow for proper system housekeeping prior to power down. Under system fault conditions, an internal KILL timer ensures proper power down

enter image description here

crj11
  • 5,566
  • 1
  • 13
  • 32