# Is there any alternative mechanism of using 7 relays?

I want to control 7 AC bulbs using a microcontroller. Only one bulb will be ON at a time. I can do that using 7 relays. But Is there any alternative mechanism or IC that can do that with low cost, less wiring and with saving space?

Remember, I don't need more than one light being turned on, but with relays, any number of lights can be turned on and off; so relays are kind of a waste here.

Optocouplers and TRIAC can be used but it will not be low cost or less wiring than relays.

PS: I'm not a graduate of Electronics Engineering (I'm a Computer Science graduate). I thought it will be helpful to know when you're answering.

• Using DC LEDs , will be much cheaper with a shift register and driver. May 15 at 0:21
• @TonyStewartEE75 yeah controlling dc circuit is much easier and cheaper using microcontroller. Controlling AC with microcontroller sometimes becomes a huge pain. May 15 at 0:59
• You can also use DC in AC bulbs but there is a surge current 10x same as AC May 15 at 1:02
• Are we talking about AC mains power? How does your insurance company feel about this? Are you in a country with an electrical code? If AC mains, is there any way you can settle for low voltage DC? May 15 at 4:12
• @Harper-ReinstateUkraine yes this circuit will be used with mains electricity. Working with mains electricity is not considered as a crime in my country (yet). But always precautions has to be taken while working with high voltage AC. May 16 at 20:21

You can do it with 4 two pole change over relays or just 3 if you have a 4 pole changeover relay available.

Relays 3 and 4 are driven together if two pole changeover ones are used. Four pole changeover relays are not as common as two pole is the reason I suggest that.

It is basically a binary selection tree.

Relay one selects between the first and second group of 4 lamps.

Relay 2 selects the first or second pair within each of those groups of lamps.

Relay 3 and 4 (or just relay 3 if you have a four pole relay available) selects the odd or even lamp from each pair.

Lamp 0 is intentionally missing - select that one so no lamp is illuminated. This is the state with no relays energized.

simulate this circuit – Schematic created using CircuitLab

• Two pole change over relay! I need more time to understand the connection between each relay and microcontroller. One quick question - if it can turn on/off 4 bulbs, then do I need first two relays (relay 1 and 2)? Can't I just use relay 3 and 4 directly with microcontroller? (-was it a silly question!). And are those less or more cost than 7 relays? May 15 at 0:55
• @TareqNewazShahriar You can see how a 3-to-8 decoder looks with relays here. I just purchased 4PDT Fujitsu fbr442nd012 relays for USD 1.50 each. So they are not expensive. However, I cannot say they would handle your bulbs as I don't have specific details about them.
– jonk
May 15 at 1:01
• Would really be best for the at-rest (de-energized/NC) position to be the empty bulb. May 15 at 4:14
• @Harper-ReinstateUkraine - Agreed that is a nicer arrangement. May 15 at 13:24
• @jonk ohoo! I was on the verge of making one. If you hadn't say it, I would have complete it. ;) May 16 at 18:02