1

I don't have much experience with electronics. I was wondering if it is possible to create a push button switch, which will turn on the device only if it is tapped twice in quick succession?

If it is tapped only once, then the device should behave as if nothing happened (i.e. tapping the switch again after a specified duration should have no effect).

  • Create something which uses an interrupt to wake from sleep on a single button press, and return to sleep if a second is not detected within a short window of time. – Chris Stratton Sep 30 '14 at 20:15
2

You can use something like the ATtiny25/45/85 then have a button cell battery to power it, make it a sleeper that listens to the button, and when clicked it activates the Arduino.

The Arduino is then turned on keeping a capacitor alive holding a transistor active, then add another button that drains the capacitor, thus closing the transistor and turning the Arduino off. Or you can program the ATtiny to drain the capacitor if the button is held down.

A button cell on an ATtiny in sleepmode should last around a year or so.

Just some information to get you going further:

http://playground.arduino.cc/Learning/arduinoSleepCode : The sleeper code, it is power saving using interrupts.

http://www.instructables.com/id/Program-an-ATtiny-with-Arduino/ : How to burn an ATtiny using Arduino. Fairly simple, did it myself a few times.

| improve this answer | |
  • The ATtiny isn't necessarily needed - it should be possible to get either the ATmega328p or the 16u2 to do the low-power wakeup role, and keep the other asleep until needed. – Chris Stratton Sep 30 '14 at 20:14
  • Yes, it would be the same principle, but he specifficly stated that the arduino would be turned off and then turned on, and not put in some kind of sleep mode. So thats what i went with. Ofcause i could have elaborated other posibilities, but since the feedback from the questioneer was lacking i didn't think i should spend more time on this question :) – Magic-Mouse Oct 1 '14 at 8:28
  • Thanks! I don't know what any of this means. But i will try it! – Kaizer Sozay Oct 1 '14 at 11:44
  • @John feel free to ask questions i have a little experience in the ATTiny's mostly blink examples and sirens made of used 8ohms speakers. But a bit more in burning the chip, it can be a bit tricky but follow the guides and it will get you far! – Magic-Mouse Oct 1 '14 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.