I have 4 basic independent circuits, each circuit consists of 1 x AA battery, some wire, a micro switch and a light bulb.

I would like to control them from a single switch. So that upon the first switch depression, only circuit 1 will illuminate; switching off when the button is released. The second press of button illuminates circuit to release and so on.

I have managed to achieve the desired result with my raspberry pi a micro switch and some relays.

Is there an off the shelf, stand-alone solution that could replace raspberry pie?

My experience with electronics is purely through experimentation, which has made researching this difficult, I don't know where to start. I am not looking for a step by step just a few keywords to point me in the right direction and I'll work it out myself from there.

  • \$\begingroup\$ In principle you could certainly design a switch where a push-button action shifts a rotary mechanism through several different contact configurations. In practice, a standard push-button switch and a microcontroller is likely to be lower in cost. You could do this with a bare micro (even a $0.50 or lower part) instead of a devel kit like RPi. \$\endgroup\$
    – The Photon
    Commented Feb 2, 2015 at 19:57
  • \$\begingroup\$ Micro controller is what I was looking for. Thank you very much :) \$\endgroup\$ Commented Feb 2, 2015 at 20:10
  • \$\begingroup\$ I don't really understand what you're asking for, but I think it's a circuit with one switch and 4 lamps such that when you press the switch the first time lamp 1 will come on, then when you release the switch lamp 1 will go off. When you press the switch the second time lamp 2 will come on, then when you release the switch lamp 2 will go off. So, each time you press and release the switch the next lamp in the sequence will turn on and off. When lamp 4 goes off, however, the next switch press will turn on lamp 1 and the sequence will begin anew. Am I right? \$\endgroup\$
    – EM Fields
    Commented Feb 2, 2015 at 20:34
  • \$\begingroup\$ Get yourself a cheap Arduino clone (e.g. a nano) from ebay and start experimenting. It will do this task and much more. \$\endgroup\$ Commented Feb 2, 2015 at 21:38

1 Answer 1


If I understand the question, I believe you could use a simple johnson counter IC which switches through a number of circuits for each pulse sent to the signal pin. A decade counter (such as a 4017), for example, allows you to sequentially change among ten separate circuits sequentially.

The image shows a simple example circuit that uses all ten outputs. You will have to modify it to do what you are asking. For example, you could shorten the sequence to four by connecting Q4 to the ICs RST pin so that every fifth pulse resets it to the first circuit. You'd have to check the specs for the particular IC you choose to use to see exactly how to do that.

I don't mean to imply that this is the best circuit or the best chip to do the job, but you could look further into the idea of using Johnson counter ICs to help you accomplish what you want.

As pointed out in the comments you would have to debounce the switch also.

enter image description here
(source: iamtechnical.com)

  • 1
    \$\begingroup\$ In the real world, you probably want to debounce that switch. \$\endgroup\$
    – The Photon
    Commented Feb 2, 2015 at 21:30
  • 1
    \$\begingroup\$ OP wants a switch that works as a momentary switch. So it turns LED1 on when pressed and it turns back off when switch is released. Press again and LED2 comes on, off when released. So your solution has half of it (the progression through LEDs) but not the momentary aspect \$\endgroup\$
    – I. Wolfe
    Commented Feb 2, 2015 at 21:30
  • 2
    \$\begingroup\$ (1)You need to add some form of de-bounce on the push switch or it will jump about randomly. (2) there is no way to connect a signal to the reset if you want a number of circuits less than 10. (3) there is no power on reset circuit. \$\endgroup\$ Commented Feb 2, 2015 at 21:34
  • 1
    \$\begingroup\$ The circuit was not meant to solve the problem completely. The OP also said " I am not looking for a step by step just a few keywords to point me in the right direction and I'll work it out myself from there." I pointed him in the right direction, or at least in a direction. The point is an IC can do this with a little extra work. \$\endgroup\$
    – Octopus
    Commented Feb 2, 2015 at 22:58
  • 1
    \$\begingroup\$ Yup, if the OP adds debouncing and 2-input AND gates between each output and the push button input, the solution is pretty much there. It's pretty similar to a ring counter or a shift register. \$\endgroup\$
    – horta
    Commented Feb 3, 2015 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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