User Tools

Site Tools


2016 Electronic Advent Calendar


Last year I built an electronic advent calendar. Whilst I quite liked it, there were a few downsides with it. For instance, it looked hacked together (which it was) and since it was using a microcontroller, it also invited pranksters to find bugs and try to break it. Most serious, however, is the fact that one only had to push a button to advance a day, which really didn't feel right. Advent calendars are supposed to require some manual activity!

With my mind set on improving these deficiencies, I set off to design a brand new advent calendar for 2016!

Design and Overview

The calendar features 24 transparent IC sockets, behind each of which are two red LEDs. When a chip is plugged into a socket, the LEDs under that socket come on and illuminate it.

Advent calendar on December 9.

Plugging in a chip also causes a fixed amount of current to flow though a moving-coil meter. The scale of the meter is designed such that one gradation is equal to one day, which also matches the current added by plugging in a chip. The currents of all days add up to result in a full-scale deflection of the meter when all chips are inserted.

Close-up of a single IC.

In order to preserve the advent calendar tradition of having to spend a few seconds looking for the day's door, the IC sockets are placed randomly. This is enforced by the sequential days being connected electrically such that the LEDs will only come on if the chips are inserted in the right order.


The ICs that are plugged in are 74AC14 hex Schmitt-trigger inverters. When the IC is plugged in, the circuit for a day looks as follows:

Schematic of one day.

Four of the inverters simply drive the LEDs with approximately 12mA each. Whilst not technically necessary and a little bit naughty, I decided to use two pairs in parallel just to be sure I can comfortably drive the LEDs. It is also important to note that AC series logic was chosen because of its current drive - other logic series would not work with the relatively high LED currents.

The purpose of U1.1, U1.6 and the 4.7k resistor is to enforce the correct sequence of insertion. The days are connected in sequence though their “previous” and “next” ports. When inserted and active, the previous day will pull its “next” line low, hence enabling the LEDs and current output on the next day. If no chip is inserted in the previous day, the 4.7k resistor pulls the “previous” input high and disables this and all subsequent days.

Driving the meter is extremely simple. The logic output after U1.1 is connected through a 120k resistor to the meter. The meter has a 1mA full-scale reading with 60Ω internal resistance, which is negligible compared to the 120k. Hence, the current added by each day is approximately $\frac{5V}{120kΩ} = 41.7\mu A$ - which is exactly 1/24 of the full-scale current.

Summing currents in the meter.

There are two main sources of error with this simplistic approach to driving the meter:

  1. As ICs are inserted, more and more 120k resistors are effectively put in parallel. With all 24 ICs in the circuit, the effective parallel resistance is 5k, making the 60Ω of the meter slightly less negligible. However, it is still only a 1.2% error and should not be too noticeable.
  2. If an IC is inserted out of order, the LEDs do not light up, but its 120k resistor is shunting a tiny amount of current to ground and resulting in a reading that is ever so slightly too low.


Due to the number of components, I designed a PCB and had it made by EasyEDA. There is a large cut-out in the board to accommodate the meter. The meter is flat on the bottom and mounted slightly up from the bottom edge of the board, which results in the calendar standing quite firmly at an angle of about 20° from the vertical.

Standing on the meter.

Since there is no local regulation on the board, the full-scale deflection of the meter (1mA) depends directly on the supply voltage of the external 5V supply. The supply I picked has quite good load regulation, but I still had to add a 1.5k resistor in parallel with the meter to get exactly 1mA which all chips inserted.

Getting the IC sockets right was the trickiest part. At first, I thought I would use regular turned-pin sockets. These stand up slightly from the board and I hoped that there would be enough light coming through the gap to give a nice glowing effect. However, this did not work well at all and the light was only noticeable in the dark.

Sockets and LED placement.

Not content with a poor-looking advent calendar, I remembered that I once had (and possibly still have in my continental storage site) transparent IC sockets. A quick trip to ebay later I was the proud owner of 25 (that seller's entire stock!) NOS transparent IC sockets. These were made by Seifert in Germany and look remarkably similar to the ones I remember. One slight annoyance is that probably due to ageing, some of the sockets have a distinctive amber hue, whereas others are still nice and clear. A bigger annoyance is that they are completely flat on the bottom, which means that there is no place for the 1206 LEDs to go. However, that problem was also swiftly resolved by some Dremel action, resulting in 24 sockets with more or less carefully crafted pockets for LEDs.

Transparent IC socket (bottom). No room for LEDs.

Another unforeseen issue was light leakage. Since the sockets are quite close together, a fair amount of light can couple between sockets. If an unlit socket is adjacent to two lit sockets, it does glow quite brightly which doesn't look great. After some experimentation, I found that aluminium tape would block the light entirely but also look acceptable. Unfortunately, I only realised this after I had assembled everything so I had to fiddle sticky aluminium tape between the sockets on the board. It would have been much easer to wrap the tape around individual sockets or even paint their sides white instead.

Aluminium tape helps keep the light in.

Finally, it would have been rather boring if I had left the meter with its original 0-3V scale. Instead, I scanned in the original scale for reference, created my own Chirstmas-related one, printed it on Avery L4775 adhesive labels and placed them on the back of the existing scale panel. That way, I can revert the meter to its original condition in the future.

Design Files

Environmental Impact

48 LEDs… 12mA each… 220Ω dropper resistors from 5V… yeah…

The advent calendar even works in far infrared!

Spot the dropper resistors!

projects/advent2016.txt · Last modified: 2016-12-11 19:23 by robert