Getting Started | Real-Time Clock vs. NTP Tracking Time w/ Arduino & ESP32 (DS3231 RTC) | BRK-00026

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.พ. 2020
  • • Your support helps me post videos more frequently:
    / acrobotic
    www.paypal.me/acrobotic
    buymeacoff.ee/acrobotic
    BTC: 1ZpLvgETofMuzCaKoq5XJZKSwe5UNkwLM
    ==========
    • Find me on:
    / acrobotic
    / acrobotic
    / acrobotic
    ==========
    • My shops:
    acrobotic.com/shop
    amazon.com/shops/acrobotic
    ==========
    • Description:
    This is a getting started series for the products found on my online shops!
    In this video, we setup a DS3231 real-time clock (a higher precision version of the DS1307) to keep track of time using an Arduino Uno and an ESP32 development board:
    amzn.to/3bZLId0
    Real-Time Clocks allow us to easily and accurately keep track of seconds, minutes, hours, week, date, month and year information. They're typically used for time-stamping sensor data while it's being logged. Using an external (CR2032 coin cell) battery, the RTC is able to keep tracking time even when it loses power.
    ==========
    • Related vids:
    Getting started with the ESP32 using Arduino: • Getting Started | ESP3...
    Getting started with Websockets: • ESP8266 Web Server and...
    ==========
    • Project parts:
    ACROBOTIC Development Boards for ESP32:
    amzn.to/2D3KiA6 (affiliate)
    amzn.to/303INZK (affiliate)
    acrobotic.com/products/acr-00024
    ACROBOTIC DS3231 RTC Real-Time Clock Breakout Board:
    amzn.to/3hgomlg (affiliate)
    ==========
    • Project code:
    Arduino Library for the DS3231: Available through Tools - Manage Libraries... - RTClib
    Arduino Library for getting time data from an NTP server: Available through Tools - Manage Libraries... - NTPclient
    ==========
    • Music:
    Epidemic Sound (epidemicsound.com). Standard TH-cam License.
    ==========
    #Arduino #RTC #ESP32
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 28

  • @andrasparanici5491
    @andrasparanici5491 3 ปีที่แล้ว

    Nice! Thank you! What I was looking for!

  • @TheAlibigdeli
    @TheAlibigdeli 4 ปีที่แล้ว +8

    nice one actually i was using ds3231 lib it self but i always had problems with ntp sync
    like there is a part which people need to sync their time with ntp instead of time on the device i leave the function below for those who need it:
    void SyncTime()
    {
    struct tm timeinfo;
    if (!getLocalTime(&timeinfo)) {
    Serial.println("Failed to obtain time");
    return;
    }
    Serial.println(&timeinfo, "%A, %B %d %Y %H:%M:%S");
    //rtc.adjust(DateTime(year, month, day, hour, minute, second));
    rtc.adjust(DateTime(timeinfo.tm_year + 1900, timeinfo.tm_mon + 1, timeinfo.tm_mday, timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec));
    }

    • @datasith
      @datasith  4 ปีที่แล้ว +1

      Ali to the rescue! Thanks so much for sharing!

    • @adabill295
      @adabill295 3 ปีที่แล้ว

      I'm building a timer for a light that comes on at Dusk-60 minutes and goes off at Midnight+60 mins. I am using a DS3231 RTC and was wondering how to check the RTC's accuracy after a month or two. I live in Michigan USA and I have to constantly change the light time to account for both DST and seasonal changes to dusk (disk2dawn). I want the timer to be "hands off" but had problems setting the clock initially and adjusting the clock if it drifted. This gives me an idea on how to use the internet to set the clock initially and check it after a month or two to see how it has drifted. There is already a way to use my smart phone to enter my internet credentials, if needed to get it initially connected. An OLED on the project box to show times (current, dusk(DST Adjusted) and OFF time). only one button to Force ON/OFF if needed. Connecting to the internet will mean I don't have to depend on attaching it to my computer and having to download the new program when the time needs adjusted. THANKS to both of you for the idea and code !

  • @jasonmare33
    @jasonmare33 10 หลายเดือนก่อน

    good job ! thanks

  • @adilanizuly5740
    @adilanizuly5740 3 ปีที่แล้ว

    Nice video. Thanks!

  • @scienceprojectsofdccpn3430
    @scienceprojectsofdccpn3430 ปีที่แล้ว

    thank you ❤

  • @praveenraj29
    @praveenraj29 2 ปีที่แล้ว +4

    Great Video! I believe ESP32 has an inbuilt RTC available in it. Can you we use the ESP32- RTC to get time data and will it work properly if we provide battery power without interruption for ESP32? (Anyone have tried it, please let me know as well) Thanks in advance

  • @stevenalexander7259
    @stevenalexander7259 2 ปีที่แล้ว

    can we use for display Millisecond ?

  • @Dvir1300
    @Dvir1300 4 ปีที่แล้ว +3

    Nice video. Thanks!
    What I'm looking for - is the complete solution: To connect to the NTP server (Maybe using the NTPclient example that comes with the ESP8266 basic library, using simple UDP communication), and use its input to update the DS3231 module - so also when off-line the time will stay correct.
    Would you please make "Part 2" Video with this complete proccess?
    Many thanks!

    • @datasith
      @datasith  4 ปีที่แล้ว +1

      Thanks for watching! I wanted to do exactly that, but I wanted to keep the "Getting Started" video as simple as possible. I'll add it to the (long) list of vids in the queue :)

    • @Dvir1300
      @Dvir1300 4 ปีที่แล้ว +1

      Thank you for that!
      I think it's reletavely simple to do it as "Part 2" of this video, as the basics are already here.
      I'll be staying tuned to see when it comes.
      All The Best!

  • @dniellobodesousa3555
    @dniellobodesousa3555 ปีที่แล้ว

    Estou usando uma esp 8266, quais pinos se usa?

  • @Devjorge80
    @Devjorge80 2 ปีที่แล้ว

    muy bueno el video .y la camiseta de maradona

  • @BitesandGo
    @BitesandGo ปีที่แล้ว

    Can I use the rtc lib with the RV3032 rtc? I dont find any lib for that one :(

  • @muctop17
    @muctop17 4 ปีที่แล้ว +1

    Phineas: "Ferb, I know what we're gonna do today!"
    Cisco: "Allright! Let´s do this!"
    Tnx! Just perfect, as allways!

    • @window.location
      @window.location 4 ปีที่แล้ว

      Also Phineas: *where is perry*

    • @datasith
      @datasith  4 ปีที่แล้ว

      Hahah, thanks for the kind words and the chuckle 😊

  • @imottofeivel2479
    @imottofeivel2479 4 ปีที่แล้ว

    Hey, love the vid! Can you make a tutorial on making a esp8266 remote controll for a rc projects like a rc car

    • @datasith
      @datasith  4 ปีที่แล้ว +3

      Ha! Perfect timing. Funnily enough, that's going to be one of my next two videos. Stay tuned!

    • @imottofeivel2479
      @imottofeivel2479 4 ปีที่แล้ว

      Great!! Thank you.

  • @rgmtb
    @rgmtb 4 ปีที่แล้ว

    Would this board be good to trigger a wake up interrupt? If I wanted to put a device into deep sleep (like a weather sensor) and have it awake could this do it? What's the battery life on this? Thank you

    • @datasith
      @datasith  4 ปีที่แล้ว +1

      Sh*t man, sorry for the super late reply! I would use the RTC board so that when the device wakes up from deep sleep, it can have an accurate sense of time. Not so much for waking up the device.
      Most chips these days will have the deep sleep functionality built in, which you can set by software. If you want to use an external hardware trigger, then you can build any circuitry you'd like for doing this, but there's little advantage to that, and you'd also need to power yet another device. So, I'd recommend giving the built-in one a try.
      Here's a good set of posts with examples:
      blog.voneicken.com/projects/low-power-wifi-intro/

    • @Dvir1300
      @Dvir1300 4 ปีที่แล้ว

      AFAIK, the DS3231 module has an "alarm" option, and some extra pins that may be used to 'send a pulse' to wakeup by an interrupt. But I'm not sure, and would be glad to get smarter with that by someone that knows better.

  • @dennishopper8687
    @dennishopper8687 ปีที่แล้ว

    not a single bit of code?