Chasing lights

Lights on the stairs

Lights on the stairs

I switch on led lights in sequence using an Arduino board and PCF8574 modules . Creating a nice visual effect on the garden stairs.

Since each PCF8574 module can control 8 lights, I used 5 of them to insert a light on each of the 36 steps of the staircase.

Although in the title I indicate to simplify chasing lights, in reality the system allows you to set the lights that must be turned on moment by moment and therefore allows any play of lights.

Instant by instant the lights on

Vector with the lighting sequence

The lights turned on in instant 1 are stored in the first 5 bytes of the step vector [], that of instant 2 in the next 5 bytes and so on … Using the bits of the bytes of a vector was an obligatory choice to reduce the memory used on the Arduino board.

In this way we can make the lights turn on in sequence the way we want, in a simple sequence like the one I used, or in complex sequences by simply setting 1 on the bit of the vector.

The program is attached and it is very simple. How to carry out the realization can be deduced from the attached photos. The lights are nothing more than small pieces of three LEDs from a LED strip , greater brightness by cutting pieces of 6 or 9 LEDs.

The resulting effect is visible in the following video:

Video: “Chasing lights”

The realization is simple, but it takes a long time because you have to handle a lot of electrical wires. Given the final effect it is worth it. To complete the project, two PIR sensors to be installed one on the first step at the top and the other on the fourth step at the bottom.
With these sensors, the sequence of lights move in the direction of travel of the stairs. If you go up the low sensor it will trigger the effect so that the lights seem to go up. The high sensor will start the sequence in reverse giving the impression that the lights are going down.

The time between instants is given by the program variable called “ Time “. Each routine has its own “ Time ” variable. It is in milliseconds. By increasing this value or reducing it, you will adjust the scrolling of the lights to your speed of travel on the stairs.

The sketch for the sliding lights can be downloaded from the following link: LuciScaleGiardinoConSensoriV2.ino

In the following photos you can deduce construction details.

The lights are obtained from a led strip

The lights are obtained from a led strip

 

Remove the rubbery coating from the proximity of the contacts

Remove the rubbery coating from the proximity of the contacts

 

Electric wires to connect

Electric wires to connect

 

Connect the wires with tin

Connect the wires with tin

 

Waterproof contacts with heat shrink tubing

Waterproof contacts with heat shrink tubing

 

Waterproof the other end with a heat shrink tubing

Waterproof the other end with a heat shrink tubing

 

Final aspect of the led light for a stair step

Final aspect of the led light for a stair step

 

Make 2 for each step

Make 2 for each step

 

Need to connect one by one

Need to connect one by one

 

A garden wire mesh as a support for the led lights

A garden wire mesh as a support for the led lights

 

The mount mounted

The mount mounted

 The support before closing the step with the top

The support before closing the step with the top

The step with the LED lights on

The step with the LED lights on

 

Mini PIR sensor

Mini PIR sensor

 

Mini PIR sensor with an extension between the sensor and the circuit

Mini PIR sensor with an extension between the sensor and the circuit

 

Modified and waterproofed mini PIR sensor

Modified and waterproofed mini PIR sensor

 

PCF8574 modules in cascade

PCF8574 modules in cascade

 

LED driving board with PCF8574 modules - Detail

LED driving board with PCF8574 modules – Detail

 

LED driving board with PCF8574 modules

LED driving board with PCF8574 modules

 

LED driving board for PCF8574 modules

LED driving board for PCF8574 modules

 

System to test LED lights

System to test LED lights

 

Test with PIR sensors

Test with PIR sensors