The Perfect Christmas Lights, Overengineered ✨

Written April 2025

Modern Christmas lights don't feel as cozy as the lights from the past. When you drive down your local festive street, there is a distinct lack of warmth of times gone by. It's more heartless, piercing, and robotic. This winter, I was investigating the best Christmas lights and decided to get some of the classic incandescent bulbs with a standard filament. But what is putting me off about these new and improved LED light bulbs, and why aren't they just better?

Comparing LED to Incandescent

So that is a pretty strong performance from LED lights on all the hard and fast metrics. I can definitely see why almost everyone opts for the LEDs when at the store. However, there is something special about those lovely little classic bulbs. What is it? And how can we capture it and combine it with the frankly superior LED technology?

The Big LED Downside

They are ROBOTIC🤖

Take a look at the examples below. You have incandescent on the left and LED on the right.

If you look closely the incandescent bulbs have a relationship between each other. When one bulb flickers off, the rest brighten just a bit, resulting in a shimmering effect.

But the LEDs don't have any relationship. The non-blinking LED doesn't do anything when the others are twinkling. It's a complete lack of community spirit for me, especially during the holiday season.

There's magic in those classic lights, and I am determined to try and capture it AND leverage the practical benefits of LED bulbs.

Coziness Comes from ✨Electromagnetic Properties✨

So, why does the cozy, shimmering effect happen with incandescent Christmas lights? It's because the brightness of the bulbs is related to electrical energy added to the bulb. So, when one bulb flickers off, that electrical energy gets transferred into the other bulbs.

This transfer of energy does not happen with LED lights. LED's just flicker on and off and don't effect each other at all. This just feels wrong.

The Goal

Capture the magically cozy electromagnetic properties of incandescent Christmas lights by modelling the relationship between the bulbs in the strand in software.

Basic Circuit Design

I've simplified down the strand of bulbs into a single circuit of bulbs acting as resistors. When a bulb "blinks", the current bypasses the bulb's filament, decreasing the total resistance of the strand and increasing the voltage to the other bulbs. This means that we can use some basic calculations to figure out the amount of energy going into each bulb's filament.

Below we see a simulation of the light strand I am modelling. Notice how the voltage goes to zero when we short circuit a bulb. Also, when I do that, the other bulbs' maximum voltage increases.

generated by falstad.com play around with it here

Temperature is the Key🗝️

During my research, I discovered a bunch of interesting properties that will make this all work. We need to model all of these properties in software. Luckily, all of them are dependent on one value, temperature.

1. Temperature Dependant Resistance

The resistance of each bulb does not remain constant, but it increases as the filament heats up. That means that we need to express resistance in terms of heat. So we can't just do a simple on or off resistor, which makes sense because our goal is a gradual and natural looking state change.

2. Energy Increasing Temperature

The actual brightness of the glow of the bulb is not correlated with the energy that is being delivered by the wire at that time, but rather on the temperature of the filament which is gradually heated by the energy delivered. Also, there are 2 forces that are removing heat from the filament: convection and radiant heat transfer.

3. Color Shift as Temperature Increases

When a black body, or rather an imperfect black body, emits radiation it shifts along the electromagnetic spectrum. It first glows red, then yellow, then white, and finally finishes off with a blue. You actually encounter this all the time when purchasing LED light bulbs. The 2300K light bulbs are meant to recreate the orangish glow of a dim, 2300K incandescent bulb. 3000K refers to a more warm, white color. And then there are the gross "natural white" 3500K. And don't get me started on how horrible standard 4000K LED bulbs are with their harsh, blue light. I found this simulation online. It demonstrates the spectrum of light generated by a perfect black body. See how it starts to overlap with the red side of the visible spectrum and shifts closer to the UV as the heat increases.

visit the site yourself here

Modelling in Software

1. Temperature Dependant Resistance Modelled

The amount of resistance is modeled by a linear relationship between the temperature and a constant. This constant can be calculated by knowing the shape of the filament and its material. For my purposes, I've just used a constant I found on the internet.

R = T * c

2. Energy Increasing Temperature Modelled

I modeled the bulb's temperature with 3 main factors.

  1. Heat delivered by the electrical circuit. The heat energy delivered to the filament is determined by the current and the resistance
    E = I^2 * R
    
    So for a period of time (dt)
    dE = I^2 * R * dt
    
  2. Heat lost by the actual glowing of the bulb This is governed by the Steve Boltzman law. Which says that the energy released by a glowing black body is related to the difference in temperature and 2 constants, the Steve Boltzman constant and the specific emissivity of that material.
    dE = (T_i^4 - T_0^4) * sbc * specific emissivity
    
  3. Heat lost to standard convection This is a more simple version of the Steve Boltzman law that applies to all objects, not just radiant bodies. Also, it has a much higher effect than radiance when closer to room temp.
    dE = (T_i - T_0) * newton cooling constant
    

3. Color Shift as Temperature Increases Modelled?

There is some super interesting math that describes the radiation of a black body given its temperature. It's called Planck's law. (See the simulation I linked above) It's super cool, but I am trying to shoot for a more simple solution that approximates the colors of a light bulb. For simplicity, I opted for defining some key color values and linearly interpolating the RGB values between them.

const COLOR_CHECKPOINTS = new Map([
    [1000, new Color(0xFB1A00)],
    [1500, new Color(0xFE6901)],
    [2000, new Color(0xFC9D00)],
    [2500, new Color(0xFCCC28)],
    [3000, new Color(0xFFE64B)],
    [3500, new Color(0xFEF568)],
    [4000, new Color(0xFFFF96)],
    [4500, new Color(0xF1FFB1)],
    [5000, new Color(0xE6FECD)],
    [6000, new Color(0xD0FFFD)],
    [0, new Color(0x000000)],
]);

Bonus 4. Luminosity from Temperature Modelled

Due to the fact that I am testing this in a graphical representation, I need to somehow map the "perceived brightness" of a bulb in a standard computer display. This took me down an interesting rabbit whole of the world of photometry. I tried to quantize the amount of light in the visible spectrum using this (desmos calculation)[]. Then I correlated that with the radius, or area of the circle that represents the bulb. But this was way too ambitious. I just did not know what I was doing. And once I got a number of "human perceived luminosity" I was still going to have to correspond that with some graphical representation that matches it. Overall, way too much work and not worth it. So I just used a tuned arctan scale for the radius of the circle. This seemed reasonable from the intuition I gained from the photometry reading, and it was visibly appealing.

Details Developing the Project

I used golang to write the simulation to generate the temperatures of the bulbs over time. This was honestly a personal choice because I had not used golang much before. It gave me an excuse to to a pretty simple project and learn the golang basics. So golang gave me a file of temps with simulation timestamps. And in order to show the simulation here on the site, I simply read in that file and animate it after calculating the color and luminosity of each bulb based on the temp.

Conclusion

Overall, I really enjoyed this project and I hope you enjoy looking at the simulation. It seems much better than the LED stuff being sold today. Who knows, maybe I'll take some high end RGB LED christmas lights and program them to look like this. But that is a project for later. This took way longer than I thought.

Thanks for reading.

Sources