/DS3231-Alarm-ESP32-Cam-Telegram-Bot

Use DS3231 RTC and ESP-32 Camera to send a photo to a Telegram bot when alarm is tripped

Primary LanguageC++

DS3231-Alarm-ESP32-Cam-Telegram-Bot

DS3231 RTC wakes up ESP-32Cam periodically and a photo is sent to a Telegram bot.

Power ON > send photo and/or message > alarm is set for the next power ON > alarm is enabled > Power turned OFF

https://www.youtube.com/watch?v=TPH_MbMufHI (timelapse done with virtualdub using photos exported from Telegram Desktop)

This project utilizes the following Arduino libraries:

https://github.com/cotestatnt/AsyncTelegram https://github.com/cotestatnt/AsyncTelegram/blob/master/REFERENCE.md https://github.com/adafruit/RTClib

https://asciiflow.com/ http://www.jave.de/

                 5V
                  +
                  |
                  +-----------+
                 +-+          |
            10K  | |     + +--+S
                 +++     |    |
                  |    G | +  |
     +------------+--------+--+  AO3401 P-CHANNEL MOSFET
     |                   |
     |                   | +
     |                   + +--+D
     |                        |
     |                 +------+------+
     |                 |      5V     |
     |                 |             |
     |        +---+----+3.3V         |
     |        |   |    |             |
+----+----+  +++ +++   |             |
|   SQW   |  | | | |10K|             |
|         |  | | | |   |  ESP32CAM   |
|  DS3231 |  +++ +++   |             |
|         |   |   |    |             |
|     SDA +---+--------+IO14         |
|         |       |    |             |
|     SCL +-------+----+IO15         |
|         |            |             |
+-----+---+            +----+--------+
      |                     |
      +-----------+---------+
                  |
                  +
               GROUND

photo_2021-09-29_23-28-08 photo_2021-09-29_23-28-32 photo_2021-09-29_23-29-15 photo_2021-09-29_23-29-35 photo_2021-09-29_23-29-50

Another hardware version with DS3231 chip taken from the breakout board: photo_2021-10-12_19-05-54 photo_2021-10-12_19-06-00 photo_2021-10-12_19-06-04 photo_2021-10-12_19-06-17

Example photo in UXGA resolution, whie balance set to Cloudy 025