Posted on Leave a comment

Idiot Christmas Light Controller

There are 3 types of people at Christmas time. People that put up:

  • A reasonable amount of Christmas lights
  • No Christmas Lights at all
  • An ungodly horrendous amount of Christmas lights.

I’m the third type.

I decided the world needed a box with 8 outlets that could be controlled from a master in my house. I wanted the ability to dim the lights, blink the lights, control the lights with DMX down the road ( never did that one ), but ultimately decided all I really needed was to blink them in the most chaotic way possible. Random was good as long as half the lights were on at any given time. Completely random blinking meant that half the lights were off about half the time. About 25% of the time only 25% of the lights were on. I didn’t like that.

Oh, and I made 8 boxes. So that’s 64 outlets total.

Too keep the current consumption reasonable, I decided that not only was 4 outlets the minimum number outlets, it’s the perfect amount of lights that should be on. It’s totally random which 4 outlets are on for each box, but it is only four.

Running power all over the yard was made simpler by allowing 110VAC input and output on every box.

This project consisted of:

  • A TRIAC power board x8
  • A Receiver board x8
  • 3D printed customer enclosure x8
  • A control board

ESP32

My weapon of choice whenever wireless or wi-fi is being used is the ESP32. I have many of the cheapo Ali Express Dev boards, but I spun my own boards for this one. Wireless range was a concern, but the ESP-NOW library allowed me to build up a mesh network so that each ESP32 board could talk to the other one. The library does all the heavy lifting, but range has been no problem at all even though my control board is down in a basement.

TRIAC Board

TRIAC Board

I guess you can call this a mixed signal board. It’s not EXACTLY a digital signal, but there is some 110VAC power here….at least by my standards. Each outlet is rated for 1A (20 strands of lights), but I’ve never came close to that number. The board itself is rated at 4A total, but I need to check my old notes to see how I came up with that.

The bottom pick is missing the slots where the Christmas Lights plug into. It makes much more sense with that correction. I took a chance on this approach. This 3D model does not show the enclosure the outlets must slip through before soldering. Luckily, this approach has been bulletproof for 5 years and allowed me to avoid wires. Life doesn’t get much better than avoiding wires.

Receiver Board

This receiver board is super simple. +5V input. The ESP32 talks to the Sender via ESP-NOW (more or less wi-fi, kinda). It talks to the TRIAC board via the IDC connector. I originally designed this using a press fit connector instead of the IDC connector. Lesson learned. See “Mistake” below.

Mistakes

Press Fit Connectors Without Serious Jig = Bla!

I experimented with a ribbon connector to mate the TRIAC board with the receiver board within each box. I found some new connectors where you just smash the ribbon with these jaws-of-life teeth. These are probably great if you have a jig to correctly smash them. (I later learned all about press fit connectors at work.) My “jig” was completely inadequate and some of the connections were bad. I lost one or two outlets on each box right away and had to redo the press fit process over and over to get it right. Even then, the connection was unrliable.

I could have used standard 2×5 IDC 2.54mm cables. I always have dozens on hand. I guess my need to experiment bit me that time.

The press fit style connector can not be taken off and this made troubleshooting difficult at times. Lesson learned.

If I redesigned this, I’d use a board-to-board connector…probably just standard 2.54mm headers.

Strengths

PETG Works Great For Enclosures!

PETG enclosures have been very durable. I left 2 of these boxes outside. They are covered to keep the rain out, but nothing else. In a bad storm, they’ll get wet. They’ve been outside since October 2021. They still work very well.

Modern LED Christmas Lights Use Little Power

I’m not sure I believe it, but a 25ft strand of the LED Christmas Lights I purchased only consumes 50mA….and they are really too bright. I’ve considered knocking the brightness down in the code by shortening the TRIAC “duty cycle”. I don’t that’s the term when dealing with TRIACS but this project was 5 years ago and it is the term for PWM and the concept is mostly the same.

Enclosure Ventilation Is Good

Everyone says that water and electronics don’t mix. That’s super true if you’ve got an electrolyte in your water. What they don’t tell you is humidity is everywhere ( not a shock ) and no matter how well you seal up your enclosure, water vapor is getting in. In December in Missouri the temperatures will get down to 0F sometimes and as high as 70F with a typical temperature at any given time being around 32F. That’s a recipe for condensation.

So even if you think you completely sealed your enclosure, water vapor is getting in and that moisture is going to experience condensation. Then you have water….not jus t the vapor in your enclosure. If you think you sealed the water out, you’ve now just sealed the water in. OUCH! That part isn’t intuitive.

I took ventilation seriously and it’s paid off tremendously.