Retro-ish Alarm Clock

by megardi in Circuits > Clocks

4394 Views, 38 Favorites, 0 Comments

Retro-ish Alarm Clock

5aw283.gif
IMG_1164.jpg
IMG_1083.jpg
ESP{32.jpg
1.5 Inch OLED Module.jpg
Active Buzzer.jpg
IMG_1148.jpg

Background

This project began life as a hex. What the heck is a hex? Well the makerspace I belong to, kwartzlab makerspace, has a wall of them where members can create their own hex based design, using any materials and techniques that they wish, and integrate them into the wall. The wall is powered, so some of the hex "tiles" are active.

Makers are attracted to clocks. The fact that Instructables has run a number of clock based contests bears this out. Makers are also drawn to useless machines. A useless machine is a device that does something, often entertaining, but of little or no value. My QR Code Hex Clock (pictured above) is my attempt to combine these two interests. While the correct time is continuously displayed as a QR Code, you need a smart phone (or a bar code reader) to view it.

Motivation

Because of Covid restrictions here, I have not been able to get my clock mounted onto the hex wall at the lab. So in the mean time I have had it sitting on the desk next to my laptop. And you know, the little guy kind of grew on me. I would occasionally pull out my phone, which of course has a the time prominently displayed on the home screen, and check my QR code clock's time. I suddenly wanted it to be useful. When Instructables announced the Clocks Speed Challenge that was all the motivation I needed.

My Retro-ish Alarm Clock

So my new clock has the following useful features:

  • I redesigned the clock to be free standing and not just a façade mounted on a hex.
  • The clock is WiFi enabled and get's the correct time from the NIST Internet Time Service.
  • While QR code is still one of the available options, I have added a number of additional clock "faces" that are just a little bit more readable.
  • You can set a single alarm.
  • The alarm time and "face" selection are saved to non-volatile memory in case of a power outage.
  • I don't know if cute is useful but it doesn't hurt.

Supplies

In addition to the 3D printed parts you will require the following:

  • 1 - ESP32 Development Board Wireless WiFi + Bluetooth Dual Core Module (Amazon).
  • 1 - Waveshare 1.5inch OLED Display Module 128x128 Pixels 16-bit Grey Level (Amazon).
  • 1 - uxcell12mm Diameter 5 Pcs DC 5V 2 Terminals Electronic Continuous Sound Buzzer (Amazon).
  • 2 - White Mini 7mm Momentary (Off-ON) Push Button Micro Switch (1 white and 1 black) (Amazon).
  • 1 - 5.5 mm x 2.5mm DC Power Female Socket Panel Mount Adapter (Amazon).
  • 1 - AC/DC Power Adapter 6V 2A (2000mA) 5.5x2.5 Meter Long / 5.5x2.1mm Regulated (Amazon).
  • 4 - M3 x 8 mm bolts.
  • Some hookup wire.

Print the Parts

IMG_1147.jpg

I printed the parts with no supports and the following settings (unless other wise specified):

Print Resolution: .2 mm

Infill: 20%

Filament: AMZ3D PLA

Colors: Black, white, red, copper (light brown)

Notes: Print the parts in their default orientation.

To make a Retro-ish Alarm Clock you will need to print the following parts:

  • 1 - Retro Clock Back
  • 2 - Retro Clock Bell Peg
  • 2 - Retro Clock Bell - I printed these at .1 mm to get a nice smooth curve.
  • 1 - Retro Clock Body
  • 1 - Retro Clock Button
  • 1 - Retro Clock Display Back
  • 1 - Retro Clock Display Cover
  • 1 - Retro Clock Face - Pause print at the 1.2 mm mark and switch filaments to print the tics.

Install the Clock Sketch

Flash.jpg

Connect the ESP32 to you computer and install the attached Sketch. Before downloading the Sketch change the following lines to connect to your local WiFi network:

// Used to retrieve the NTP time.
const char* ssid       = "Your SSID";
const char* password   = "Your WiFi Password";

Downloads

Wire Up the Clock

IMG_1149.jpg
IMG_1150.jpg
IMG_1151.jpg

Start by wiring the display to the ESP32. The wires that shipped with the OLED display were too long, plus there was not enough clearance to use the attached female connectors, so I cut the wires at about the half way point and soldered them directly to the ESP32 headers. Here's how to wire the display:

OLED Display    ESP32
~~~~~~~~~~~~    ~~~~~
VCC (Red)        V3.3
GND (Black)      GND
DIN (Blue)       D21
CLK (Yellow)     D22
CS  (Orange)     D14
DC  (Green)      D27
RST (White)      D26

Install the two push buttons, power jack, and the buzzer with a common ground and leads to connect them to the ESP32 as show in the second photo above.

Slide the ESP32 into the slot on the clock back with the headers pointing up. Attach the push buttons, power, and buzzer:

Component       ESP32
~~~~~~~~~       ~~~~~
Power+ (Center)  VIN
Power GND        GND
White Button     D04
Black Button     D33
Buzzer           D05

Position the buzzer with the wires facing up beside the power connector above the hole in the clock back.

Assemble the Clock

IMG_1153.jpg
IMG_1155.jpg
IMG_1156.jpg
IMG_1157.jpg
IMG_1158.jpg
IMG_1162.jpg

Attach the stand-offs to the OLED Display using the provided screws. You will have to remove the connector from the OLED Display to push it through the hole in the Retro Clock Display Back from the back. Reconnect the OLED Display and use the 4 M3 screws to attach it to the top of the Retro Clock Display Back using the stand-offs.

Being careful not to crimp any of the wires, slide the Retro Clock Display Back into the Retro Clock Back.

Attach the Retro Clock Face to the Retro Clock Display Cover with a little glue.

Slide the Retro Clock Display Cover over the OLED Display.

Slide the Retro Clock Body over the Retro Clock Display Cover.

Finally attach the Retro Clock button to the Retro Clock Back using the top center hole. Use the Retro Clock Bell Pegs to attach the Retro Clock Bells to the other two top holes. Use a little glue to hold them firmly in place.

Except for the two places mentioned the clock should hold together pretty well with just friction fitting. This allows you to get back in to fix any issues or re-flash the Sketch should it become necessary.

That's it. Your clock should be ready to go.

Using the Clock

IMG_1164.jpg
IMG_1166.jpg
IMG_1167.jpg
IMG_1168.jpg
IMG_1169.jpg

Plug in the power supply. After a few seconds the display should show the QR Code face by default. If it doesn't go back and check the wiring. Make sure that the Sketch was flashed correctly.

If you repeatedly press the the white button, the clock will cycle through the four face types seen above. The first three are pretty self explanatory. The last image above shows my "orbit" face. The inner "planet" circles the "sun" at the center once each hour. The outer planet takes 12 hours to circle the sun.

To set the alarm, press the black button once. You should see a 24 hour digital display with the hours blinking. Repeatedly press the white button to set the alarm hour. Press the black button again and set the alarm minute in a similar fashion using the white button. Press the black button one more time to save the alarm settings and return to the clock display.

To disable the alarm set the alarm time to 00:00.

When the alarm "triggers", you can press either button to stop the alarm from beeping and return to clock mode.

The face selected and the alarm time are save in non-volatile memory, so if the power goes off the alarm should still sound (provided that the power is restored of course).