I am currently working on a project with my Raspberry Pi.... I would like to be able to control 5 different lights at the same time, but only one of the lights will be on at a time. In theory, I would be able to change the status of my system and only 1 light would be lit at a time. If I change my system's status from #1 to #2, light #1 would turn off and light #2 would turn on, etc etc.

I have already set up my webserver on the RPI to listen for when I change the status of proposed light system, but I need a compact way of controlling the lights. I have already seen this to control the power of the lights but I plan on putting these lights in a enclosure. Therefore, 5 of those power cables would be extremely bulky... I have asked around for some ideas (S.E. DIY, S.E. Electric, and on a few other forums) for direction of this project and I came across this insane Christmas light setup which showed the use of Solid State Relays.

I also just came across this website which provides quite the walkthrough on wiring the RPI (pin schema) and software that supports controlling it.

Should I use Solid State Relays for a multiple light control system controlled from my RPI ? or is there a whole different approach to this ?

If need be, I can provide some diagrams of what I would like to do.

  • 1
    Can you clarify the type and purpose of the lights? Are they indicators, or illuminating something? Do the lights need to be 120V, or would LEDs or 12volt lights work? The options available can vary quite a bit with the answers to these questions.
    – TomG
    Commented Mar 31, 2013 at 22:23
  • The purpose of the light is just a global visual status indicator. I can change the light on my rpi's web server that would output the status change of the light. The light just needs to be roughly around 1000 lumens.
    – Zero
    Commented Apr 1, 2013 at 3:17
  • Just a idea: Use a board with five lights. Each one only activates at a certain voltage. Send the gpio the voltage deepening on what light.
    – Algo
    Commented Apr 1, 2013 at 21:24
  • Why not use arduino to control the lights, and the Pi to control the arduino? Commented Apr 2, 2013 at 13:05

3 Answers 3


For 1000 lumens you can go two ways:

  1. Follow the design using the Solid State Relays. This is a classical approach. The RPi GPIOs control the relays and the lamps have external power (12V or mains power) switched via the relays. You can also use electromechanical relays.
  2. There are 1000 lumen LEDs. YOu need extra power for them as well. I don't think the RPi should drive the 11W per LED from it's GPIOs. Just use some transistor circuit to switch the LEDs.

High power LEDs need cooling but last a very long time when used properly. The relay solution is generally simpler though (basic tech) and could be cheaper.

In particular when using LEDs consider that you might not just need 1000 lumens but that your indicators must be visible over a distance. The a diffusor and maybe reflectors are needed to direct the light and to illuminate a larger surface for longer distance visibility.

Just as a sample and by no means advertisement or reference the first 1000 lumen LED Google stumbled upon: http://www.lightmalls.com/5000-5500k-10w-high-power-9-11v-1000-lumen-white-light-led-emitter-metal-plate-with-optical-lens-5000-5500k-900ma.


I've also looked into this and came across Sainsmart 8 Channel 5V Solid State Relay Module Board. The 3v3 voltage of RPi GPIO will drive the input side, separate 5v control for driving the unit and 75-250v @ 2A output. Additionally, the relays are driven optically, so very quiet as well.


If you are more of a software guy (like me), and you are living in a European country, the Gembird power strips are also a way to go. They use electromechanical relays and have USB interfaces. Each strip has 6 outlets, 4 controlled via USB. You can use multiple strips via a USB hub.

They can be controlled via sispmctl, which is also available as a package in Raspbian. I even started writing a simple web frontend for sispmctl, but it is very primitive at the moment.

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.