RTC (Real Time Clock) with Arduino - Low Cost MCP7940N

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 มิ.ย. 2024
  • Here's a video on one of my new favorite parts - the MCP7940N RTC (Real Time Clock) because it provides a super cheap way to add time keeping to your projects. I've been using this part for a while now, but just now got around to making a video on it. Stay tuned for videos showing how you can use the alarm outputs to wake up from low power sleep states on the Arduino. Also, accuracy testing stuff will be coming soon as well...
    Here's the wiki for the RTC board: www.kevindarrah.com/wiki/index...
    and that cool 328 board :) www.kevindarrah.com/wiki/index...
    Datasheet for the MCP7940N: ww1.microchip.com/downloads/en...
    Digikey link: www.digikey.com/product-detai...
    CODE IS HERE: www.kevindarrah.com/download/a...
    Check out my Tindie store (trigBoard is available) www.tindie.com/stores/kdcircu...
    Thanks to all the Patrons for dropping a few bucks in the tip jar to help make these videos happen!
    / kdarrah
    Twitter: / kdcircuits
    For inquiries or design services:
    www.kdcircuits.com
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @joshc6699
    @joshc6699 7 ปีที่แล้ว +6

    Man, please never ever stop making these videos.

  • @garthhowe297
    @garthhowe297 7 ปีที่แล้ว +2

    Thanks Kevin, this is another great reference video for future use. I like the details you include as they are essential to work on a project like this.

  • @alekovar
    @alekovar 6 ปีที่แล้ว +1

    great video, very detailed and very understandable, thanks Kevin keep doing this great job.

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

    Absolutely amazing video. Thank you. The only best video I've found for using the Arduino with this particular chip. All other videos simply use the standard DS1307 module. I don't want to use that because where I'm from, an original part costs a kidney and an eye.

  • @Bruder_chill
    @Bruder_chill 7 ปีที่แล้ว

    welcome back its amazing video thanks

  • @vonries
    @vonries 5 ปีที่แล้ว

    I know I'm very late to the party but damn that's excellent work! Keep it up, PLEASE!

  • @gribley48
    @gribley48 7 ปีที่แล้ว

    Great work Kevin!

  • @abdulazeez.98
    @abdulazeez.98 7 ปีที่แล้ว +2

    Thanks for these great videos !

  • @kieranj67
    @kieranj67 6 ปีที่แล้ว +1

    Excellent tutorial, thank you!

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

    Very detailed video. Thank you

  • @pontiac60001987
    @pontiac60001987 6 ปีที่แล้ว

    Great Video, Nice find, Thanks .

  • @nrdesign1991
    @nrdesign1991 7 ปีที่แล้ว

    I've had enough of the DS1307 and its quirks. I'm looking for a good alternative, and this looks very promising.

  • @AlleyBeachElectric
    @AlleyBeachElectric 2 หลายเดือนก่อน

    just found this. Awesome content! I will totally be using this in an upcoming project. quick q- Why would you subtract 48 and not add in regards to the ascii table?

  • @GeorgeGraves
    @GeorgeGraves 7 ปีที่แล้ว

    That's a nice little chip. So long Maxim ;)

  • @george8bitsworth
    @george8bitsworth 7 ปีที่แล้ว +1

    Why do you convert the raw data (which is stored in BCD) to decimal (actually you're converting it to binary). An example is if you don't convert it you can display the value of seconds with the command "Serial.print(rtcSeconds, HEX)" instead of "Serial.print(rtcSeconds)" and save a few lines of code.

  • @rasmushaun1773
    @rasmushaun1773 5 ปีที่แล้ว

    Nice video (: I found it working for mcp79410 also (: what is the difference between these to RTC's? (:

  • @DiyintheGhetto
    @DiyintheGhetto 7 ปีที่แล้ว

    Hello Kevin There is a one arduino board that has a RTC build on board well it has a 32khz crystal on it. Te arduino zero pro Which i used recently i been using it as a RTC clock for 2 months now and have only lost about 20 seconds of time. that chip alone is only 2.95 then you need the crystal for it and other little parts so maybe around 4 dollars for all. But it does make a good RTC clock chip and cheap too.

  • @mnunez6153
    @mnunez6153 6 ปีที่แล้ว

    is it possible to code multiple schedules of alarm each with its own output pins of the arduino board?

  • @Tapperje16
    @Tapperje16 7 ปีที่แล้ว

    Would these steps and info work with the RTC DS1302 chip?, i mostly have problems with mine now..

  • @rondlh20
    @rondlh20 7 ปีที่แล้ว

    If you just want to wake up the Arduino sometimes, but don't care about the exact time, then you can do this without the RTC(C). There is a limit to the amount of time you can make the Arduino sleep, but you can just make it sleep again immediately if there is no action to be taken.

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

    you are amazing!

  • @kemoomotivation9266
    @kemoomotivation9266 6 ปีที่แล้ว

    would the code work with th ds 1307 rtc . if not please can you adjust it .
    most of the code i cant understand

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

    sir can you make a video that synchronize 2 clock by obtaining time stamp from gsm sim card

  • @deldarel
    @deldarel 7 ปีที่แล้ว

    does it take leap years and leap seconds into account?

  • @DuongTrongHue
    @DuongTrongHue 7 ปีที่แล้ว

    Great video. But why do you need include wire.h library in your code when that library is already built in Arduino?

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

      Prewritten library hides a lot of stuff that you otherwise wouldn't see/implement yourself. To learn how to extract data, format it and use it however you want is the skill every engineer needs. Cheers!!

  • @decompyler
    @decompyler 7 ปีที่แล้ว +1

    Do you know if the battery drains from the circuit while it is connected?

    • @decompyler
      @decompyler 7 ปีที่แล้ว +3

      I meant if the battery is drained from the circuit while the circuit is supplied from an external source. I'm not a moron. Calm down turbo (therealnightwriter).

    • @Peter_S_
      @Peter_S_ 7 ปีที่แล้ว +2

      The datasheet says that the battery supply is disabled when Vcc is above 1.5V (+/-0.2V), but with 3V on Vbat, current draw is only 1.2uA.

    • @aaro1268
      @aaro1268 7 ปีที่แล้ว +1

      As said by Peter, RTCs draw little to no current. Depending on the power circuitry, some devices can disable battery drain while powered externally. With an RTC, I wouldn't worry much about battery drain; they can run a few decades to centuries on one battery.

    • @Peter_S_
      @Peter_S_ 7 ปีที่แล้ว +1

      A CR2032 has roughly 225mAH capacity. An RTC drawing 1.2uA, 24 hours a day would last for 21 years.

  • @MrEriksson25
    @MrEriksson25 7 ปีที่แล้ว

    The link for the mcp7940N is "dead"..... Where would one get a hold of it.

    • @Kevindarrah
      @Kevindarrah  7 ปีที่แล้ว

      link is good, but depending on country, may not be available through digikey. Just search for MCP7940N - should be able to find the IC

  • @pirateman1966
    @pirateman1966 7 ปีที่แล้ว

    At the risk of sounding stupid, what is wrong with using the DS1371 boards that are so cheap and readily available (~$USD 0.50)?
    I don't see any difference in performance. Do any of you?

  • @edwardmallon4646
    @edwardmallon4646 7 ปีที่แล้ว

    Excellent tutorial as always Kevin. We've been using the DS3231 RTC's for quite a while now:
    edwardmallon.wordpress.com/2014/05/21/using-a-cheap-3-ds3231-rtc-at24c32-eeprom-from-ebay/
    The eeprom that usually comes with the DS was my initial reason for going with that RTC, and this made me curious what drew you to the MCP7940?

  • @rj44319
    @rj44319 7 ปีที่แล้ว +1

    JC, 35 minutes for a RTC? WTH were you doing? :)

    • @Kevindarrah
      @Kevindarrah  7 ปีที่แล้ว +8

      lol, sit back and enjoy the show

    • @decompyler
      @decompyler 7 ปีที่แล้ว +3

      Thank you for the length... This is informative and useful!

  • @AlexAwwesome
    @AlexAwwesome 6 ปีที่แล้ว

    They made a comparison of DS3231, PCF8563, MCP79400, DS1307 accuracy. DS3231 is the winner. switchdoc.com/2014/12/benchmarks-realtime-clocks-ds3231-pcf8563-mcp79400-ds1307/

  • @BoredT-Rex
    @BoredT-Rex 7 หลายเดือนก่อน

    Will this clock adjust to time changes. I want to put it in a device, but idk how to update it if I seal it up