README.md 2.1 KB

esp32-alarm-clock

This repository contains a small project which uses an ESP32 microcontroller together with a DS3231 clock, a tm1637 display module a piezo buzzer and a button to implement na alarm clock that occasionally synchronizes time over NTP, displays the current time coverted to a configurable local timezone and beeps to wake you up at a time which can be configured using a REST API. It is implemented using the ESP IDF SDK.

Prerequisites

Download the ESP IDF SDK from the github project either as a release tarball or clone the repository. Follow the instructions from the project README file to install it and ensure that you can successfully compile software that uses the SDK.

Parts list

To execute this project, you will need the following components:

  • ESP32 microcontroller board (e.g. ESP32 WROOM)
  • DS3231 RTC module
  • TM1637 seven segment display module
  • (optional) CR2032 battery to back the RTC module
  • Piezo buzzer
  • Tactile button

Hardware setup

Wire the SDA and SCL pins of the DS3231 module to one of the GPIO pins each as well as the CLK and DIO pins of the TM1637 module. The example below uses the following PIN mapping:

DS3231:

  • SDA -> GPIO pin 21
  • SCL -> GPIO pin 22

TM1637:

  • CLK -> GPIO pin 18
  • DIO -> GPIO pin 19

Piezo buzzer:

  • I/O -> GPIO PIN 5

Button:

  • One side -> GPIO PIN 32
  • Other side -> 3.3V

Wiring

Getting started

All configuration variables that are available are listed in the file main/configuration.h. You should first fill in the blanks there and define your wifi configuration, time zone and the pins the modules are connected to.

After everything is set up, the program can be compiled with the make command and be flashed to the microcontroller by calling the flash target.

Authors

  • Helmut Pozimski - Initial work - Hoshpak

License

This project is licensed under the GNU General Public License, Version 2.