0
\$\begingroup\$

I would like to create a circuit board that can toggle between 3 states, only with the press of a button.

So when pressing the button, the board should go to the next state, and at the last state, should loop back to the first.

The 3 states are like this, using 2 LEDs:

  1. LED 1 is on, LED 2 is off
  2. LED 1 is off, LED 2 is on
  3. Both LEDs are off

Can I create a simple circuit board that can do this? If so, how would it be designed?

(Disclaimer: I only know high-school electronic stuff, but I can solder pretty well)

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Can you use microcontrollers? \$\endgroup\$
    – Laki
    Oct 6, 2015 at 7:43
  • \$\begingroup\$ Yes, but I'd like to keep it simple and compact, so no arduino things. \$\endgroup\$ Oct 6, 2015 at 7:45
  • \$\begingroup\$ Use PIC16F84 or similar. Use switch statement in C and your problem is solved. \$\endgroup\$
    – Laki
    Oct 6, 2015 at 7:48
  • 1
    \$\begingroup\$ Use a 3 bit shift register (eg part of 74LS95). Initialise it to 001 with a 'power on reset' to force parallel load - first and second bit drive your LED's third bit feeds back to DS1 (serial input) - use your button (de-bounced) to provide the 'clock' \$\endgroup\$
    – Icy
    Oct 6, 2015 at 7:57
  • \$\begingroup\$ @Icy: I suggest you move that to an answer. \$\endgroup\$ Oct 6, 2015 at 9:51

2 Answers 2

5
\$\begingroup\$

A 4017 decade counter will do the job. No LED on output 0, LED 1 on output 1, LED 2 on output 2 and reset connected to output 3. You could base it on the first circuit here - http://www.clarvis.co.uk/version2/4017.html

\$\endgroup\$
4
\$\begingroup\$

Use a 3 bit shift register (eg part of 74LS95).

Initialise it to 001 with a 'power on reset' to force parallel load - a capacitor / resistor on the pin will do this.

Use the first and second bit outputs to drive your LED's. feed the third bit back to DS1 - the serial input

You will need to de-bounce the button - probably using a simple RC filter - and use that to provide the 'clock' to shift the signal on.

\$\endgroup\$

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.