Car Detection Christmas Lights


For years, my dad and I have wanted to improve his Christmas light display by creating something interactive with those driving by. Over the past month, I helped him make that dream a reality. To begin, I spent free time around Thanksgiving prototyping different ways of detecting cars passing by.

First, using ultrasonic distance sensors were tested with a simple arduino program. The sensor was setup to face perpendicular to the road, and in theory would read a closer distance value whenever a car passes by, acting as a vehicle “tripwire” that could detect cars coming from either direction based on the distance to the car. In practice, this did not work when cars drove by at speeds over 30mph, due to the relatively long timeout that the ultrasonic sensor must wait for a pulse to bounce back to its sensor.

The next sensor tested was a photoresistor, which when included in a voltage divider circuit, an arduino can measure the amount of light that the photoresistor is experiencing. This method proved to work almost 100% of the time at night, as the contrast between ambient darkness and even the faintest of headlights is very large.

With this complete, two small circuits with their own arduino uno and photoresistor were assembled within a waterproof transparent container, and positioned on opposite sides of the front yard to detect cars coming from their respective side. Whenever the photoresistor would stop detecting a bright light source (i.e. the car passing by the sensor), it pulls a signal wire high that can be used later on to trigger the lights.

To actually handle the turning-on-and-off, two 8-channel relay boards were used in conjunction with an arduino Mega. These 16 relays would be connected to 16 individually spliced female AC plugs, allowing any of our existing christmas lights plugged into these plugs to be toggled on and off in a programmable light show.

To connect everything together, two wires were connected from each sensor box to the main control box containing the arduino mega, allowing the sensor boxes to have both (1) a common ground, and (2) a their own signal wire, allowing the mega to perform different light shows based on which way the car is coming.

In the future, I hope to improve upon this by syncing up lights with music, and making modular wireless relay boxes for more flexibility.

View Other Projects

Let's Get In Touch!


I am always looking to take on a new challenge. Message me on LinkedIn or send me an email below and let's get started!