The basic idea
Almost every time I see a problem related to switching LEDs I manage to solve it with the help of a powerful circuit idea. I came up with it in the 80's and even managed to patent it... but later I saw it being used in TTL gates and other circuits. The idea is as follows:
If we connect several diode elements with different forward voltages in parallel, the current passes through the element with the lowest forward voltage.
This allows switching between two diodes only with a simple SPST switch and not with a SPDT switch or two SPST switches as is the straightforward solution. Run the simulation below to try it:
- with "ideal" diodes D1, D2 and D3 having different forward voltages of 1 V, 2 V and 3 V respectively
simulate this circuit – Schematic created using CircuitLab
- with diode strings having different total forward voltages
simulate this circuit
The implementation
Here the problem was more complicated because the OP required that a combination of switches in series be used as well. Going over the different combinations in my head I suddenly got the idea of using a bridge. I wish I had remembered how I came up with this idea... and told it here... but I was quite excited and I cannot remember now. Here is the schematic.
simulate this circuit
As you can see, the forward voltage of the RED and GREEN diodes is artificially increased by connecting ordinary diodes (D1, D2) in series (these diodes become redundant if you use LEDs with different forward voltages).
The operation
SW1 = OFF; SW2 = ON
The current is diverted through the D2 and green LED and only it lights up.
simulate this circuit
The other diodes (D1, RED and YELLOW) do nothing and can be removed from the circuit.
simulate this circuit
SW1 = ON; SW2 = OFF
The current is diverted through the D1 and red LED and only it lights up.
simulate this circuit
The other diodes (D2, GREEN and YELLOW) do nothing and can be removed from the circuit.
simulate this circuit
SW1 = ON; SW2 = ON
The current is diverted through the yellow LED and only it lights up.
simulate this circuit
The other diodes (D1, D2, RED and GREEN) do nothing and can be removed from the circuit (or drawn in pale gray).
simulate this circuit
Evaluation of the solution
Let's finally appreciate this circuit solution based on the "self-switching diodes" idea.
simulate this circuit
If we assume that the two switches, the three LEDs with a (common) resistor in series and the power supply are already there... then the circuit consists of "nothing"! This is the power of the inventive idea compared to a straightforward design solution.
Since the current is steered between the diodes, only one LED current is consumed (hence the name "current steering" of thus technique).
The only requirement is that LED3 must have less forward voltage than LED1 and LED2 (in the diagram above, I have simulated this with "ideal" diodes of different forward voltages). Well, if we cannot find such LEDs, we will settle for using two diodes.
"Non-bridge" diagram
The circuit diagram can also be drawn not as a bridge configuration; for some it might be more understandable that way.
simulate this circuit