Hallway Lighting with LED Strips

Controller Box_arty
Click the image to see the box rotate on imgur.
box opened
Lots of room to spare inside the LED strip controller box.



Walking down a dark hallway is scary! You’ve got to look for things popping out of the doors and watch your step at the same time. It’s better if you have some light to brighten things up. It’s even better if the lights extend the entire way down the hallway, and you can change the color with the twist of a knob.


The hallway is lit with three 5 meter strips of LEDs – one red, one green, and one blue. Each strip’s brightness is controlled by pulse width modulation with the signal originating in an Arduino Pro Mini and switched using three MOSFETs (similar to a transistor but designed for on/off operation rather than amplification). RGB brightness levels are controlled by a single rotary encoder is read by two of the Arduino’s digital inputs. The knob also has an RGB LED inside it. When it is turned, it produces a color opposite that of the hallway. For instance, if the knob on the control box is green, then the green strip in the hallway is at its lowest level.

The strips come with an adhesive backing on them, but the strength is not very good. I’ve had success using double sided mounting tape, but I didn’t want to tape up the entire length of my hallway. I made a trip to the local plastic supply store and purchased some clear acrylic tubes with about 1/2″ inner diameters. These worked well for keeping the strips in place on the ceiling and on the wall. The tubes are held up by wrapping a small 1″x4″ piece of clear plastic sheet around them. The sheet is then tacked to the wall with clear thumb tacks.

LEDs in Hallway
Just the first meter or so of LEDs in my hallway. The blue lights look purple in this photo.

Before I designed the circuit, I tested all three strips of lights at full brightness, connected directly to a 12v 6A power supply. The outer plastic casing of the power supply got alarmingly hot during this test, so I tried powering just two strips of LEDs with the same 6A power supply. This time the power supply got hot, but not alarmingly so. I suspect that the power supply that I purchased was not actually rated for 6A. I decided to power the red and green strips with the “6A” power supply and the blue strip with a different 2A power supply. In hindsight, this project could have been simpler using a single 6A power supply, but at the time I did not want to purchase a more expensive supply that was rated for more amps. I was also curious to try two power supplies since I had never attempted it before. I was also curious to see if I would observe the effects of any strange interference between the two supplies. After using the final circuit for several months, I’m happy to report that nothing strange was observed, and I am satisfied with the result.

The circuit board was made with a piece of prototyping material. After taking this photo, I decided to remove the green power connectors on the left side and replace them with the JST connectors seen in the final product. I also added three 1000uF capacitors to the power inputs: Two on the 6A input and one on the 2A input. The black female headers are for the Arduino Pro Mini. this fit nicely inside an aluminum project box. During testing, I found that it was not necessary to add heat sinks to the MOSFETs.

Circuit Board
This is the circuit board with the Arduino headers, the IRF540 MOSFETs, and some resistors and connectors.


5m Red LED Strip, 5m Green LED Strip, and 5m Blue LED Strip

Red LED StripGreen LED stripBlue LED strip

I got the non-waterproof kind because it never rains in my hallway. You can find these on eBay from $5-$9 each.

MOSFET Transistors: IRF 540

IRF540These MOSFETs come in a TO-220 package that has a heat sink tab on the back. I could not detect the tabs warming up at all when I was testing the LED strips at full brightness. This is because the IRF540 has a very low “on” resistance. They can be purchased from China on eBay, Qty=10 for about $4.

Arduino Pro Mini + Encoder

2014 RGB encoder experiment I used an Arduino Pro Mini for this project because it easily fit inside the project box, and it is cheap to purchase on eBay, around $2.50. The digital encoder that I chose was sourced from Sparkfun.com

RGB Rotary Encoder $4

Clear Knob $1

Breakout Board for Encoder $3

The breakout board wasn’t absolutely necessary for this project, but it made testing on the breadboard much easier. At a total of $8, the RGB digital encoder is the most expensive in the parts list, but it adds a great way for the user to interact with the project.

Power Supplies

I decided to use two power supplies for this project. Please note that even though they are the same voltage, the positive leads of these supplies are not connected anywhere in the circuit. Directly connecting the positive leads together without adding additional diodes and capacitors could cause some nasty oscillations to start up, leading to overheating one or both power supplies.The 2A power supply is connected to the blue LED strip, and the 6A power supply is connected to the arduino and both the red and green LED strips.

12V 2A power supply 12v 6a power supply

The 2 amp power supply can be found on eBay for about $5. The 6 amp power supply can be found on eBay for about $8.