Santa's Mailbox

Table of contents

Santa's Mailbox

Abstract

The goal of this project is to create a Santa's mailbox, which will be a template to be modified each year as kids grow up. For this first year, the mailbox was painted and a eink screen was used to show a countdown to get the presents.

Introduction

For most people, Christmas is a time to gather with family and friends and celebrate. This season of the year is even more exciting when there are kids around, as they still keep the innocence and the illusion that we as adults usually lose as time passes by.

When our daughter was born, my wife had a great idea. We could put a Christmas-themed mailbox to send the letters to Santa. As our daughter was too young to even care about Santa, we didn’t do it.

One day I helped a relative change a broken mailbox, so I remembered the idea and decided to keep the broken one for this project. With the help of a friend, we made a base for it. The base can change its height, so it will accompany my kids as they grow up until the time they don’t believe in magic anymore arrives.

Build

For the Christmas theme, the mailbox and the structure were painted in red. First, white was also used, but the result was not good. The design was improved using more layers of red and adding the white color with duct tape. Even if the design is so simple, and we can say it is finished, we can consider it just a white page, so the kids will further decorate and make their own. The mailbox can be observed in Figure 1.


Santa's Mailbox

Figure 1. Santa’s mailbox build.

To take part in this contest, some electronics need to be added. As it happens with the physical build, this is just the beginning. I hope someday I will be able to add more electronics with my kids, sharing this hobby with them.

The first part to be added is a M5Paper I have lying around. It is an E-ink display powered by an ESP32. It has low power consumption, some magnets to be attached to the mailbox, and it can be easily read. The main advantage is that I am using one of the multiple pieces of electronics that otherwise end in a drawer. The disadvantages are that only 16 grayscale levels can be used, so we needed to be creative, and in my opinion, the lack of documentation. For the programming, UIFlow UI and Blockly are used. The M5Paper is powered by a battery, showing a countdown to Christmas together with the basic drawing of a snowman. Once Christmas day arrives, it shows a message saying it is the time to enjoy the presents.

The second electronic part for this project is a ZigBee PIR sensor by Sonoff. I use different ZigBee sensors for home automation, and I got this for a project that I have not deployed yet. I used it to detect when the letter was placed inside the mailbox. With the help of my Home Assistant Instance, a video of Santa is played on the screen of my Nest Hub.

M5 Paper Code

As it has been previously explained, programming is made with UIFlow UI. The snowman is drawn just using circles, triangles and lines of different gray scale levels. While it cannot be considered a great design, as I am far from being an artist, it is easily recognized and liked by my daughter. 

The code itself is simple and self-explanatory:

  1. Time and date are retrieved.
  2. Title is shown.
  3. The screen is initialized. 
  4. Days to get the presents are shown. If the day has already arrived, the message “Enjoy your presents” is displayed.

An example of the UIFlow interface is presented in Figure 2. It has to be noted that it is just a screenshot taken during my different tests and not the actual final program.

UIFlow example

Figure 2. UIFlow example.

To see the program on the M5Paper, Figure 3 is presented. This is a closeup picture of the actual code running a few days before Christmas. 

M5Paper running the code

Figure 3. M5Paper running the code.

Video playback

With my home automation system already working, the video playback part of this project was a piece of cake. My ZigBee Sonoff SNZB-03 was already linked to my ZigBee hub for a previous project, not finished yet, so it was available in Home Assistant.

For video playback, media extractor integration is employed. An automation was created that is triggered anytime when met the following condition: the sensor was clearm and it detects occupancy. The action to run is to play a video from YouTube in the Nest Hub.

Note: it's late night here so I cannot record a video without waking everyone up, if allowed I'll add it tomorrow. I'm not going for the prizes, just sharing the project.

Category : project