Close
0%
0%

ESP32 Small Alarm Clock

Small alarm clock with ESP32 module, 0.96" OLED panel and small speaker.

Similar projects worth following
This is a small alarm clock which wakes you up every morning.
Clock is synchronized with NTP protocol over WiFi.
To make this as small as I can, I omitted enclosure and made the PCBs into a box.
Boards are connected with pin headers/sockets.

Power source is a 400mAh LiPo battery. Battery can be charged via USB.
To save energy, device is usually in deep sleep state and display is off.

This can also tell time with button push.

This is successive project of http://ktmizugaki.so.land.to/ele/wifi_voice_clock.htm .
While that clock is working perfectly for two years, I broke LCD and decided to upgrade project instead of replacing broken LCD.

The challenge for me is using OLED. I also tried to fix some of broblems and reduced width slightly.

featrues

  • Wakeup Alarm at configured time
  • Synchronize clock with NTP protocol over WiFi
  • Say time with button push
  • Show clock with button push
  • Support LiPo battery and can charge battery
  • Deep sleep to reduce power consumption
  • Check battery to prevent complete discharge
  • Web UI for configuring clock

structure

Clock consists of 7 boards.

  1. MCU boards
    This board is center of clock, enclosed by other six boards.
    ESP32 module, 3.3V regulator, 32768Hz crystal.
  2. PSU board
    This board is bottom panel and has power related components.
    PH connector for battery, mini B USB connector, charger IC and charge indicator LEDs
  3. IO board
    This board is top panel with switches and a speaker.
    Also it has resistors to measure input voltage.
  4. display board
    This board is front panel with OLED dislay.
    I added two LEDs to just fill space.
  5. two side panels
    These boards connects PSU board and MCU board (both electrically and physically)
  6. back panel
    Just a panel, no circuit on this board but has holes so that USART and reset circuit can be connected to MCU board.

Portable Network Graphics (PNG) - 95.23 kB - 06/14/2021 at 13:00

Preview
Download

Adobe Portable Document Format - 172.54 kB - 06/14/2021 at 12:57

Preview
Download

  • 1 × ESP32-SOLO-1
  • 1 × 0.96" OLED panel
  • 1 × 400mAh LiPo battery

  • Uploaded files and code to GitHub

    teru2 hours ago 0 comments

    Uploaded files and code to GitHub:
    https://github.com/ktmizugaki/wifi-voice-clock

    Current status of code is:

    • When ESP32 is started, it becomes AP and HTTP server.
      • SSID and password is printed to serial console.
    • WiFi settings can be added using Web UI.
      • URL will be http://192.168.4.1/wifi_conf
    • ESP32 can connect to added SSID.

    I haven't touched displaying part yet.(SSID and password will be shown on the display in the future)

  • Fixed display board

    teru07/05/2021 at 12:35 0 comments

    I fixed display board and satisfied with layout. I hope this will be good this time.

    And it's about time to order a speaker...

    While waiting for new parts arrive, I'll start conding using almost working object here.

    My plan is, when first powered up, the clock becomes an AP and user sets SSID and password via Web UI. So first thing I need to implement is:

    • Put SSID/password of clock AP on display
    • HTTP server and HTMLs

  • Make OLED work

    teru06/29/2021 at 13:34 0 comments

    I solderd OLED FPC cable to board. Then connected it to ESP32 dev baord and nothing happend.

    I was depressed and didn't know what to do next. All what came up is checking datasheet and checking voltage of each pin.

    When I compared pin table of datasheet and schematic, it turns out the symbol I used is not for my OLED panel.
    Guessing from pin names, it seems like I referenced SH1106 version when I created the symbol.

    I was able to patch circuit and now it works. Pins marked with red needs to be connected to GND and green pins are connected to GND, I added jumper cable to connect them

  • 2 in 1 PCB

    teru06/25/2021 at 13:47 0 comments

    One thing I am concerning about ordering PCB is minimum quantity is usually 5 but I only need 1 clock, and remaining 4 boards will be unused.

    So I tried to reduce unused boards by creating 2 in 1 PCB.
    Since this clock is rectangular box, each opposite panel has same dimensions and I combined each opposite pair of panels to single panel.
    This theoretically reduces unused materials by roughly 60% when measured by area.

    I also made the MCU board as minimal and exposed as many pins as possible so that the board possibly be used for future projects.

    Well, in the rea world, PCB manufacturer send me 8 wrong thickness boards and 8 correctly remade boards.
    Now I have 14 unused PCBs. lol

View all 4 project logs

  • 1
    Cut PCB

    First of all, cut PCB along white line.

    Below is separeted and arranged boards

  • 2
    MCU board

    Solder ESP32 module, decaps and reset circuit for EN pin on top of board.

    Solder 3.3V regulator, 32768Hz clock crystal, capacitors and pin socket to program ESP32 at bottom of board

    I could't find SMD right angled pin socket of this size, I bent leg of socket so that it looks as if a SMD socket.

    then solder pinheader at left and right side. Remaining pad to solder pin socket to connect front panel will be soldered lator.

    Now you can check if ESP32 works.

  • 3
    IO board

    Solder registers, capacitor and transistor at bottom of board.

    Solder switches and pull-up resisters on top of board.

    Cut leg of sockets to slightly less than board thickness before soldering so that the leg does not scratch fingers.

    I covered unused pads with tape so that they don't interact with speaker when I placed on.
    Remaining pads are for the speaker I haven't decided what to use.

View all 7 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates