When in doubt, a clock. Whether you're planning to recycle an old tablet or get precise weather reports, the clock is an ideal project to satisfy your DIY bug. With that in mind, we recently discovered Tiny Internet Clock, published by 'gokux' on Instructables. All you need is a small OLED screen, an ESP32 or ESP8266-based module, and the exact amount of 3D printing.

Tiny Internet Clock: Build a Small WiFi Clock
Tiny Internet Clock: Build a Small WiFi Clock

Arduino, Raspberry Pi, microcontrollers, 3D printing… without a doubt, it's one of the best times to dip your toes into the DIY waters. In fact, there are many online projects that don't even require a soldering iron, and they offer an excellent opportunity for all users. The Tiny Internet Clock by 'gokux' is one of those projects, but if you have access to a 3D printer and are willing to apply a couple of solder points to the connections, you can get a very compact and simple WiFi clock.

How to Build a WiFi Clock

Tiny Internet Clock: Build a Small WiFi Clock
If you think about it, even the case is optional.

From a technical point of view, you only need three things: a compatible ESP32 or ESP8266 module (here it uses the Seeed Studio Xiao), an SSD1306 OLED display with a 128x32 pixel format, and some power source. 'gokux' decided to simplify the design as much as possible and power his Xiao with a USB Type-C cable, but it's not a bad idea to add a TP4056 module and a small battery to 'cut the cord'. Still, we can't talk about portability because the WiFi credentials are hardcoded in the Arduino code (details below).

Tiny Internet Clock: Build a Small WiFi Clock
Two cables for power, and two for data
Tiny Internet Clock: Build a Small WiFi Clock
Everything ready to start...

'gokux' also had the kindness to share the files to print the case of the Tiny Internet Clock, consisting of three pieces that should fit perfectly even on the most basic of printers. By far, the intimidating part of the project is uploading the Arduino code to the ESP32, but in reality we only care about four parameters:

  • const char* ssid = "SSID"; — Here we must replace "SSID" with the actual SSID of the WiFi network (in quotes).
  • const char* password = "Password"; — Same, but we write the password.
  • int GMTOffset = 19080; — Here goes the negative or positive offset of our timezone, in seconds.
  • int daylightOffset = 0; — Similar to the previous, but we enter the offset for daylight saving time (if necessary).

The only additional line of code I'd like to highlight is:

configTime(GMTOffset, daylightOffset, "0.in.pool.ntp.org","time.nist.gov");

The server 0.in.pool.ntp.org belongs to India, and maybe it's more convenient to use a local NTP.

With all the code loaded, the rest is a matter of checking the physical connections between the ESP32 and the screen, turning it on, and waiting for it to sync. Give it a try!

Official site: Click here