12 Jan 2023

Coordinated Holiday Lights - intro

I like putting lights up around the property for the holidays, and have run power to various locations over the years in support of this endeavour. I now have lights on the house (which includes the deck), on a bush in front of the house, on the gates (where the driveway meets the road), and on some fencing leading to the barn. In time I would like to put up even more lights in more locations. Currently each set of lights plugs into power individually, and (since I don't want these lights to be on all the time) each set of lights has its own way of turning off during the day and turning on at night. For variety, some locations use off-the-shelf light-sensor plugs, and other locations use off-the-shelf timer plugs.



Now it's time to get fancy.

During the day all these lights are off; at night they're all on. But in between being all off or all on, each set of lights in each of these locations changes state at random times. In fact sometimes a set of lights controlled by a light-sensor changes state a couple times before settling down to one state or another. Wouldn't it be nice if they all turned on and off at the same time?

One way to solve this problem would be to run extension cords to and from all these lights and then plug them all in at only one location. This would work on smaller properties, but unfortunately the distances between all the lights on my property doesn't make this practical for me. Another option would be to buy "smart" sockets... but where's the fun in that?

The light-sensor plugs have a couple drawbacks:

  • if the light sensor and the lights it controls are in too close of proximity to each other, then they end up in a perpetual cycle, at night, of turning on then off then on then off...
  • if the light sensor is close to a driveway or road, then headlights from vehicles going past at night will trip the sensor and turn off the lights for a minute or two
  • the specific light-sensor plugs that I'm using have multiple settings that are selected by pushing a button on the device; the initial, power-on setting is to stay off; I like the "dawn to dusk" setting; unfortunately the device doesn't save your preference across power-cycles, therefore every time there is a power blip I need to go around to each device and set it back to "dawn to dusk" mode

  The timer plugs also have a couple drawbacks:

  • the amount of daylight changes every day, so each timer would need to be manually modified every couple weeks otherwise the lights they control will either be on for a portion of the day (when they should be off), and/or will be off for some part of the night (when they should be on)
  • in my experience, many of these timers keep time very poorly; as a result, a timer that is set to turn on or off every day at a specific time ends up drifting away from that time very noticeably and very quickly
  • any power outage will end up adjusting the "current time" of the device by the length of the power outage, resulting in more trips around the property to adjust the timers

It's interesting that the winter solstice occurs in the middle of "holiday lights" season. So if you are using timers then you will want to be increasing the amount of "on"-time as you approach the solstice, then contract it as you leave the solstice behind.

Both of these solutions (light sensors and timers) have drawbacks. But even if one of them was a clear winner, lights in different locations would still turn on and off at different times; all the lights wouldn't be coordinated. The amount of light falling on different parts of the property varies quite a bit; so if I used light-sensor plugs everywhere, different areas would still turn on and off at different times. On the other hand, if I used timers everywhere it would be hard to precisely synchronize multiple timers. Even if they did start out perfectly synchronized, over time they would drift, and would need to be adjusted regularly for nothing else than to adjust to the amount of daylight. In other words, using timers everywhere would also not result in all the lights turning on and off simultaneously.

As a result I've decided to make something myself. I want to create a device that can be used outdoors, and provides an outlet whose on/off state is remotely controllable. This way I can send one command from a central controller and have all the lights turn on or off (as appropriate) simultaneously. Additionally, if I wanted to control specific outlets individually I would like to be able to do that as well.

Currently I will need 6 such devices (house + deck, bush, east gate, west gate, east fence, and west fence). As an added twist, I've decided to use a different single board computer (SBC) for each unit I put together. There are literally hundreds of Linux-capable SBCs from which to choose, so why not give a bunch of them a try?

2 comments:

  1. Have you thought of a central control. A bright IR beacon visible to all the lights then at each power block a receiver with a very narrow filter at the frequency the central beacon is transmitting. Not the IR frequency but, say a 20kHz. You'd need the filter and a relay all in a sealed plastic box which plugs into the power and controls an output receptacle. The Arduino and Raspberry Pi stored probably have everything you need.

    ReplyDelete
    Replies
    1. That could work in some situations, but in my case I don't have one location from which all boxes would be visible. I'm a big fan of running ethernet to everywhere, but that's a topic for another post.

      Delete