An ESP32-Arduino simple alarm clock with some weather monitoring features.
Some key points about the project:
- BrickClock is a simple alarm clock plus temperature, pressure and humidity monitoring
- The name comes from the fact that I personally used a big Lego brick as a case
- A WiFi connection is required to operate
- It has a BMP280 sensor to collect indoor data whereas the OpenWeather API is used to get outdoor data;
Maybe in the future I'll use another sensor to collect external temperature and humidity... we'll see - It use a HR-SR04 ultrasonic sensor as a unique, sleepiness-proof, interface with the user: roughly put your hand in front of the clock to stop the alarm sound or change the view.
- All the settings are made through the exposed web page
- The collected data is saved inside an SD card
- A simple chart of pressure and outdoor temperature is shown on the display
- A more complex chart including humidity and both indoor and outdoor data is accessible through the exposed web page
- There is a RGB Led on the back that can be configured to change color by time
- The alarm can be scheduled by week days and the melody is a nerdy Start Wars theme (I'm planning to make it customizable)
Ok, neither building cases nor css are my speciality.
- ESP32 - 38 pin variant - Amazon
- ST7735S - TFT Display 160x128 with SD card reader - Amazon - Amazon (alternative)
- HC-SR04 Ultrasonic Distance Sensor - Amazon
- RGB LED (com. cathode, rbg) - Amazon
- BMP180 - Barometric Pressure Sensor - Amazon
- 4 X 220Ω Resistor - Amazon (220Ω) - Amazon (assorted)
- Speaker - I usually salvage it from old toys - Banggood
Of course you will also need common prototyping tools:
And if you are going to solder everything in something permanent:
- Adafruit_BME280_Library
- Adafruit_Unified_Sensor
- ArduinoJson
- AsyncTCP
- ESPAsyncTCP
- ESPAsyncWebServer
- TFT_eSPI
- melody-player
- Arduino IDE
- ESP32 Board for Arduino
- VS Code
- VS Code Arduino Extension
- ArduinoJSON Assistant: the tool used to compute json buffer size
- Fritzing download
- try to reduce json payload size
- check if it is possible to not use additional buffer in json serialization
- better naming in the configuration struct
- remove all Serial print if not in in debug
- make the alarm melody editable
- investigate and filter out abnormal sensor reading