# LED lights if two or more switches are on at same time [closed]

I have a need to know if two or more of eight switches are on at the same time. The supply voltage is 12 volts dc. The switches are SPST. I have looked at digital circuits but have yet to figure it out. Any help, please.

• Are the switched dedicated to this problem? Or do they have another use as well. If they have another use, you should add that information to your question. – Math Keeps Me Busy Mar 1 at 14:03
• Your question title does not match your description (is it one or two switches?). Please correct it to avoid confusion. – StarCat Mar 1 at 14:26
• A microcontroller and some resistor voltage dividers would be simple enough to do this. But we need to know more about your circuit. – Passerby Mar 1 at 15:03
• Looks like homework to me ... – brhans Mar 1 at 15:21
• @Bob You should fix the title – Math Keeps Me Busy Mar 1 at 18:07

You could do something like this:

simulate this circuit – Schematic created using CircuitLab

R9 + R10 is 7.07K, which is optimized to maximize the difference between Vcc/2 and the voltage with one switch and two swiches (about 1V nominal difference in each case). 1% resistors are suitable and cost about the same as 5% these days.

Here are the voltages at the comparator vs. the number of switches closed (>6V turns the LED on):

This is a simple voltage adder circuit. Resistance values are just for show. In this circuit you can play with the switches and see that the output voltage changes based on how many switches are thrown. You can also see how the output voltage changes with resistance.

Reading Vout will tell you exactly how many switches are thrown if you set the range of the adder between Vmin and Vmax of your ADC. If you only want to know when 2 or more are flipped just make Vout = Vmax when 2 switches are thrown (This is now digital logic).

The equation is (V1-D1)/R1 + (V2-D2)/R2 ... = Vout/R4

If you don't care about a little power feeding into the other lines you can make the resistance values large and remove the diodes.

simulate this circuit – Schematic created using CircuitLab

A circuit like this will get you there:

simulate this circuit – Schematic created using CircuitLab

The idea is that you choose the R values and the zener voltage so that when the desired number of switches are closed, you get a voltage above the (-) input on the (+) input.

In this case 1 switch will only get you 6V but two will get you 8V and the output will turn on.