Building an electronic advent wreath with an Arduino Uno



The motivation:
It was Christmas season and there is the obligatory waiting time between December 1st and December 24th until you can stuff yourself with enormous amounts of food and unwrap some presents and then complain about the weight gain that noone saw coming. To pass that time a little faster, you usually have an advent wreath and light a candle every seven days. As we were eager to stuff our bellies but were not allowed to light candles at our workplace, due to fire protection, a friend of mine and I decided to build an electronically controlled advent wreath. Instead of candles, we decided to use LEDs – Less fire, less problems. And as we are lazy engineers we wanted the thing to light the LEDs by itself, when it was the right time.

The hardware requirements:
Basically all you need is something, that tells you the time and something that lights LEDs. We decided to go with a DS1307 RTC module, as it features the I2C protocol and has an excellent Arduino library available. For microcontroller we used an Arduino Uno board – Although you do not need that much processing power. We went with 12 LEDs, 3 for each „candle“. Why 12 LEDs? Because that was the maximum amount of LEDs the Arduino can power by using it’s internal power supply. You could of course go with more but you would have to alter the circuit and go for an external power supply oft he LEDs. Here ist he part list that we used:

  • Arduino Uno board
  • DS1307 RTC i2C module
  • 12 LEDs (the ones you can get your local electronic store)
  • 12 330 Ohm resistors for the LEDs
  • Soldering material (wires, soldering gun, soldering tin)


The software requirements:
The main idea is to light up the according LEDs as soon as the according advent is due. The code therefore only has to get the current time from the DS1307 module and then decide (with a case or conditional statement) if and how many LEDs it should light. The full code can be found on my github page in this repository.

Wiring it up:
The following two images show the breadboard layout and circuit diagram for the above mentioned hardware. I have only drawn one LED instead of all twelve, but the wiring of the other eleven LEDs is analogous to the one shown.




The final result:
Add a fir branch and some Christmas decoration and off you go:


Comments

Popular posts from this blog

Measuring bank angles with the MPU6050 and Raspberry Pi - The introduction and hardware requirements

Measuring bank angles with the MPU6050 and Raspberry Pi - Wiring the components and installing the required software packages

Measuring bank angles with the MPU6050 and Raspberry Pi - The software