Wifi connected wake clock using ESP8266

Posted on by Wim Mostmans
Yello owl sleeping

Suppose you are blessed with the fact that you have some children running around. You probably know the phenomenon of one of your kids standing next to your bed at five in the morning with the question if it’s already time to wake up.

This project attempts to find a solution to restore my healthy eight hours of sleep per night. I already heard some good things about these wake clocks for kids that visually indicate if it’s time to wake up or not. The prices of these clocks are a bit expensive, and as a true DIYer, why not build it yourself. Luckily I had a nightlight that I got as a present from my colleague Koen for my son’s birth. It would make for the perfect enclosure for this project.

Some of the features I had in mind for this clock were the following;

Power Source

I had some of these cheap 18650 battery bank holders lying around. In combination with a refurbished 18650 cell of an old laptop battery, it would make for the perfect cheap power source for this project. This solution solves a lot of stuff in one go:

I first soldered the positive wire to the leftmost pin of the USB output port. I’ve drilled a hole in the battery bank cap, which I stick the positive and negative wire through. These wires were then used as my constant 5v power supply for the ESP8266.

Wake clock electronics

3D print new lid

To fit everything in the enclosure, I had to recreate the original lid. After printing some prototypes with my 3D printer, I’ve ended up with this design.

Wake clock 3d printed base

The circle is a placeholder that makes it possible to fit one of these 18650 USB battery banks. The square hole on the left is the location for the on/off slide button. The other spot reuses the original push button of the light itself. This push button will be the mode selection button.

Wake clock electronics fit

Wake clock lid

Over the air programming

I’ve made the program so that, by default, it starts in the wake clock mode. But if you turn the light off and hold the push button in and turn the light back on, it goes into program mode. I’ve also made it so that the red and green LEDs both light up, so it’s visually clear that the clock is in program mode.

Result

The result of the DIY project was a healthy night rest for both father and son. Invaluable if you ask me!

Wake clock

Github

The source code for the clock is published on Github.

Tip jar

Tip Jar

If you like this blog, leave a tip! Your tip will help provide the basic necessities which sustain this blog: coffee, beer and raincoats for surviving the pitiful Belgium climate.

Buy me a coffee
Wim Mostmans

About Wim Mostmans

Freelance full stack developer and Co-founder of the Employee Advocacy platform Ambassify, with a general interest for web technologies and electronics.

Leave a comment