Introduction: Dreamday Box for the Special Person in Your Life

About: Tinkerer, nerd, gamer, numberphile. I also like mountain biking and rock/metal music.

This little box tells the number fo days my beloved one and I are living our lives together. Of course, for you the date could be anything, it could tell the days since your marriage, since the day you and your spouse have met, the day you've moved in together or anything else that matters a lot to you.

The 8x8 pixel matrix can display any symbol, it's quite simple to alter the code for your desired picture. I went for this sparkling heart to symbolize the love and affection we give us in everyday life. (Also I've kinda wanted to finish the project before Valentines Day, but the SARS-CoV-2 delayed it a bit)

Power is delivered by a USB rechargeable 18650 LiIon cell, which should last about 24h of constant displaying of the 7-segment and the 8x8-matrix, but keep in mind that they don't glow if the box is closed. So realistic battery life will be years. The real-time clock (RTC) keeps the time used to calculate the days gone by. It has its own backup battery (CR2032) which will last for about 8 years.

The base is a custom printed circuit board. I had it produced by JLCPCB. The Gerber files can be found in the GitHub repository. You can upload them to any PCB manufacturer, it's a universal file format. Or of course, you can write me an email, I have some spare I'm willing to send out, just for the cost of shipment.

Also included is a BOM file (bill of material) in which you find every single electronics part needed for the project.

Total cost without the wooden box or the photo prints will be around 30$, depending on the PCB cost.



  • Soldering iron
  • Arduino ISP dongle (see my other Instructables on how to make one)
  • PC or Mac to program
  • Custom PCB (Gerber are included, or ask me, I have some spare)
  • Electronics parts (see BOM-file)
  • Box of some sort (or make your own)

Step 1: Ordering Your PCB

Go to JLCPCB and upload the from the GitHub repository, you can choose your desired PCB color as well.

You can also write me an email, I might have some PCBs spare I'm willing to send to you for the cost of shipment.

Step 2: Ordering the Parts

The BOM file contains all the electronics parts you'll need to populate the PCB.

I have ordered the parts from LCSC and digi-key. But most of the stuff can be found on any electronics supplier. If you struggle to find something or aren't sure if it's the right part, email me.


Step 3: Minimal Assembly (for Burning the Bootloader)

In order to successfully burn the Bootloader (explained in the next step), some parts should not be soldered to the PCB. The essential parts are the ATmega32u4 (obviously...), the crystal and its two load capacitors, the six-pin header, and the three capacitors for the ATmega32u4.

It is important that you don't solder on the 0Ohm resistors/jumpers on the serial connection.

Step 4: Burning the Bootloader

Before you can upload a program to the ATmega32u4 with the Arduino IDE, it needs to have a Bootloader burned in. Normal Arduinos already have this done to them, but since we are working with a bare chip here, we need to do that ourselves. But don't worry, it's really not hard at all.

Connect your Arduino ISP to the six pin header on the PCB, be sure to have the polarity right.

If you don't have an Arduino ISP, check this Instructable of mine. One can be built within 10 minutes.

Check the following settings in the Arduino IDE:

  • Tools -> Board: Arduino Leonardo
  • Tools -> Port: [Select the COM-Port of the programmer]
  • Tools -> Programmer: Arduino as ISP

You can find the COM-Port in Windows Device Manager.

Finally, click on Tools -> Burn Bootloader

Step 5: Assembly of PCB

After the Bootloader is successfully burned, you can place all the remaining parts on the PCB. I find it convenient to start with the smallest parts like resistors and capacitors, then the ICs and in the end the cell battery holder, the 7-segment display and the 8x8 pixel matrix.

Solder the two 90° pin headers on the backside to hide away the battery and switch cable. I used a 3-pin header for the battery, that way it can't be connected the wrong way around later on.

Step 6: Installing Libraries

In order to upload the programs provided in this instructable you need to install the following dependencies:

Download the .zip files and import them through the Arduino IDE via:

Sketch -> Include Library -> Add .ZIP Library

If for some reason, the download links don't work, copies of the libraries are withing THIS GitHub directory. Simply drag them to your Arduino libraries folder.

You may need to restart the Arduino IDE after this.

Step 7: Set the Time on Your RTC (real Time Clock)

Check my GitHub for the latest version/updates on the project!

The DS3231 integrated circuit on your PCB keeps the current time needed to calculate the days gone by. But to achieve that, you first need to tell it what time/date it currently is. This is done by uploading the RTC_set.ino sketch.

Make sure your settings are as follows before uploading:

  • Tools -> Board: Arduino Leonardo
  • Tools -> Port: [Select port of the Arduino Leonardo, not the ISP from the Bootloader step]
  • Tools -> Programmer: AVR ISP or AVRISP mkII

Hit the Upload-Button and wait until it's done.

Step 8: Altering Program Code

Check my GitHub for the latest version/updates on the project!

Now we can start modifying the main program. Open the main.ino project with the Arduino IDE. There are several lines in the code where you can/need to change some values to suit you. I won't mention any line numbers, because they might change sometime, but I try to make it as easy to find as possible.

Set your special date:

You need to get the Unix timestamp from your date. Go to this website and enter your date:

This will give you a 10-digit decimal number. Copy that number to the line in the code that says "const long special_date = " and replace the number there. This number is the number of seconds since January 1. 1970, also known as Unix time.

Set your 8x8 pictogram:

You can change the picture on the LED matrix by altering the values in "const unsigned int matrix_heart_big[8]". Those 8 0x[XX] values represent the vertical lines on the display from left to right. If you don't know what the values mean, try 0x00, 0x01, 0x02, 0x04 and see what happens, or read up on hexadecimal notation. (Or write me an email)

Step 9: Uploading Your Program

Once you have made all the changes to the code you need, make sure you have the following settings dialed in your Arduino IDE:

  • Tools -> Board: Arduino Leonardo
  • Tools -> Port: [Select port of the Arduino Leonardo, not the ISP from the Bootloader step]
  • Tools -> Programmer: AVR ISP or AVRISP mkII

Hit the Upload-Button and wait until it's done.

Step 10: Preparing the Box

To support the PCB in the box and keeping it from falling down, I've cut down some 8x10mm wooden strips and glued them into place.

I suggest treating the wood with some sort of lacquer, so it will remain nice for a long time. Maybe one could even laser something onto the top, I'm thinking about a skyline of the place you've met or your names.

To actuate the switch which disconnects the battery when the box is closed, I've glued a little piece of wood into the corner of the lid. No need to go into detail on this mechanism, there are countless ways of doing that and I'm sure you can come up with something way neater.

I've also used sticky hock n' loop strips to secure the battery holder on the bottom.

Step 11: Final Assembly

All that's left to do is plugging everything together, placing the PCB into the box and maybe cutting a photograph to size and place it into the lid.

I hope your significant other finds joy in this little thoughtfulness.

Heart Contest

Runner Up in the
Heart Contest