Project tutorial

Automated Staircase RGB LED Lights © GPL3+

Create an awesome looking motion activated RGB lights for any staircase under $20!

  • 23,946 views
  • 15 comments
  • 86 respects

Components and supplies

Arduino Nano R3
×1
Individually Addressable LEDs WS2812
I'm going to use 26 LEDs - less than a half of the strip
×1
Motion Sensor HC-SR501
One for the bottom, one for the top of the stairs
×2
5V 1-2A Power Supply
×1
Cable Trunking (25mm x 16mm x 2m)
×2

Necessary tools and machines

09507 01
Soldering iron (generic)
10mm Drill bit
Hy gluegun
Hot glue gun (generic)
Hacksaw
Used to trim the cable trunking
3drag
3D Printer (generic)
You could use wider trunking to create the enclosure for PIR sensors instead

About this project

My staircase has claimed a broken toe some time ago. Fortunately, it wasn’t my toe, but I feel for the poor fella. The toe is OK now, but it got me thinking, is there anything I could do to reduce the risk of dealing with another victim? Plus if I could do this on the cheap, that would be super!

I created this tutorial for my personal blog (NotEnoughTech.com) where you will find more details about the build.

I came up with a rough sketch of what I have in mind just by staring at the staircase. To create nice lighting effect and keep things tidy, I would run the lights on the right side of the stairs. To trigger the lights automatically, I will need motion sensing.

The best layout I could come up with would be enclosed in some sort of trunking, with two LED’s per step. I have 13 steps which means I would need a total of 26 RGB LEDs to create the staircase RGB LED lighting.

PART 1 THE DESIGN

PART 2 THE HARDWARE

PART 3 THE SOFTWARE

Cable Trunking

Let’s start with the trunking. I know, that steps are 30 cm apart so I need 2 holes for each step – 15 cm apart. Drill it in the shallow end otherwise (8-10mm drill), you will have a hard time getting the LEDs inside.

While you at it, you may as well drill the mounting holes (4mm). I found 5 per 2 m trunking to be sufficient. Make sure you have a mounting hole next to each end. If you know the dimensions of the PIR sensor enclosure, you can cut the trunking to size. I didn’t and I ended up cutting it later. Doing this in advance will save you time. Taper the ends of the trunking so the top edge and bottom edge finished perpendicular to the floor.

To join the trunking with a minimal gap, I cut one part shorter, so the cover with LEDs would overlap the joint.

LEDs

Test the LED strip first to make sure all works great, then cut the strip down to individual pieces (pay attention to markings, mind the orientation of the LEDs – it’s IMPORTANT). Mark out the directions inside of the trunking before you proceed.

Mark:

  • the direction of the input/output wire
  • ground side
  • positive side

Before you glue down the LEDs, use a soldering iron to prep the contact points. It’s quicker this way. Make sure each side has a small blob of solder on the contact. If your LEDs strips come with 3M adhesive, remove the adhesive first.

Glue down the LEDs, minding the orientation. Be sure to follow this orientation across each trunking. If you tapered the ends, you won’t be able to change the order of the trunking anymore.

Soldering

This is the time-consuming part. Each LED needs 3 wires between each other. To make your job easier later, be consistent with a colour coding. Pre-cut the wire to even pieces and start connecting the LEDs. Leave a tiny slack, but don’t be excessive. I would advise you to glue down the wires in between the LEDs otherwise you will end up snagging it when closing the trunking.

Extend the VCC and GND at each end, in addition to this, the joining parts will need the data wire.

PIR sensors

I found a nice enclosure on thingyverse.com which I have printed out and made a small incision to allow wires to go inside. I used jumper wires to connect the pins. I removed the plastic separators from the pins to bend the pins sidewise. This way the sensor is sitting flushed with the back plate. You can power the sensor from the LED’s power rails.

The top sensor has to have a cable, that runs all the way (unless your Arduino is at the top, then flip the scenario) across the trunking. I split all my wires and used the jumper connections, so I could separate the trunking for transport. This way I can assemble the pieces at will, by connecting 4 cables (VCC, GND, DATA, PIR).

The bottom sensor is linked directly to the Arduino. I also ended up using the power rails of Arduino Nano to power it.

Schematics

There are few things to remember. First, you have to share the common ground with Arduino so the LED data signal was correct. There are many ways of achieving this setup. I used jumper wires at first for testing and then I made a small PCB which has an Arduino Fixed to it, and all the cables fixed to it.

I have harvested a spare mini-USB cable and connected the RED and BLACK strains into the power. This way the voltage is regulated, it’s not advisable to power the Nano through the pins. The big advantage of keeping your cables neat is that you can fit the Nano inside the trunking.

To drive 26 LEDs I needed about 300mA at peak time, which means almost any USB charger will be strong enough to drive it. I used the other part (USB-A) of the cable to create an extension that will go from the mains to the Arduino and LEDs.

Mounting the Staircase RGB LED Lighting

Start from the top, this way the gravity won’t get in your way. Affix the wider trunking to the wall using screws. Pay attention to the ends, make sure that mounting screws are reasonably close to each end. Once happy with the result mount the PIR and drag the cables out through the holes.

Connect the cables for LEDs and work your way down to close the trunking, making sure that cables are not snagged inside. I used the leftover from the trunking to put the Arduino Nano inside. It’s longer than microcontroller itself, and it has an access hole at the bottom for the power lead.

You will see that I have a power connector. I connected it this way, as there is no easy way of reprogramming the board, if you want to get fancy, you can make a socket that would house the Arduino Nano, making it completely removable.

Lastly, I cleaned up the cables and clamped the power wire to the skirting board for nearly invisible effect.

Code

The Arduino Code
An excellent base code written by Dean Montgomery with lots of effects.

Custom parts and enclosures

Schematics

The connection diagram
Schematics that shows how to connect everything (replace the battery with the relevant 5V power source)
Untitled sketch bb 1myesc6she

Comments

Similar projects you might like

Lightpipe 7-Segment Display

Project tutorial by Brian Lough

  • 2,856 views
  • 3 comments
  • 9 respects

Arduino - Control Arm Robot via Web

Project tutorial by phpoc_man

  • 358 views
  • 1 comment
  • 11 respects

ElBanquos 1D Pong

Project showcase by ElBanquo

  • 183 views
  • 2 comments
  • 2 respects

Arduino Spider Robot (Quadruped)

Project tutorial by MEGA DAS

  • 2,457 views
  • 1 comment
  • 18 respects

PENXZYL: Arduino 3-Axis Brush Plotter

Project showcase by Guiye Perez Bongiovanni

  • 4,593 views
  • 4 comments
  • 20 respects

Arduino Joystick

Project tutorial by Ingeimaks Ingeimaks

  • 132 views
  • 0 comments
  • 3 respects
Add projectSign up / Login