Doing this with a counter and an AND gate will be one option. A fourth press will turn it off. Then three more presses will turn it on.Dear all, I am looking for a circuit that can on an led by pressing the same button for 3 times?
Thank you for reading and have a nice day![]()
Welcome to AAC.Probably overkill, but...
If you use a tiny arduino-like board (they're ridiculously cheap&small now), then the firmware can do the debouncing and also deal with the timing of the button. For example... if the button is depressed less than 3x what do you do? Should that time out if all three button presses don't occur within some window of time?
Exactly. Has the TS thoroughly worked through all the possible scenarios?What happens if you press it two times, then wait an hour and press it a third time?
How do you turn it off?
Hi sir, thanks for replying. Well, I think CD4017 or CD4022 Johnson counter with some logic gates are good for my case. And after the led lights up, I can just reset everything by disconnect and reconnect power supply, thus, it should be working properly for the next cycleWhat happens if you press it two times, then wait an hour and press it a third time?
How do you turn it off?
How does that answer my first question?Hi sir, thanks for replying. Well, I think CD4017 or CD4022 Johnson counter with some logic gates are good for my case. And after the led lights up, I can just reset everything by disconnect and reconnect power supply, thus, it should be working properly for the next cycle![]()
The led will be on the third press and any subsequent press after thatHow does that answer my first question?
And what happens with a fourth press?
This means that you need to have a suitable power-on reset to ensure that everything starts up the way you want it to.Hi sir, thanks for replying. Well, I think CD4017 or CD4022 Johnson counter with some logic gates are good for my case. And after the led lights up, I can just reset everything by disconnect and reconnect power supply, thus, it should be working properly for the next cycle![]()