Hello,
So you need some kind of machine with a finite number of states. Hmm...
Without knowing any details of your implementation goals or target, here is a suggestion:
You can use discrete logic ICs and implement a Shift Register Counter (or more precisely a ring counter) with three flip-flops (ff0, ff1, ff2). The output of each flip-flop represents the corresponding state. If "high" then the state is active.
Each primary output is activated by a relay driven by a BJT transistor (with a protection diode in parallel of course). The base is driven by the outputs of the flip-flops, but with a twist:
- Use a diode from ff1 to output 1 transistor base
- Use a diode from ff2 to output 1 base and another one to output 2 transistor base.
(Note: According to flip-flop characteristics, you can also drive the relays directly)
(Second note: a transistor-only implementation is also possible)
However, please familiarize yourself with the wonderful concept of "de-bouncing" before proceeding.
If you have experience and hardware to work with microcontrollers, you can also try using a cheap, 8-pin MCU.
Cheers,
Dan