Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Sync Time offline - RTC

    Scheduled Pinned Locked Moved FiPy
    7 Posts 4 Posters 62 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      Jana Koteich
      last edited by

      Hello,

      In my project I need to get the current time, but based on my application the following solutions are not applicable:

      • Connecting the FiPy to the internet to sync the RTC with the NTP server.
      • Adding an external back up battery.
      • Setting the time manually on each power-up.

      So, based on these conditions, how can I sync the RTC?

      Thank you.

      L J 2 Replies Last reply Reply Quote 0
      • L Offline
        livius @Jana Koteich
        last edited by

        @Jana-Koteich
        I see two possibilities:

        1. Use GPS module to retrive current time.
        2. I do not know your location, but maybe you can use DCF77 signal.

        think about people first, then computers

        J 1 Reply Last reply Reply Quote 3
        • M Offline
          Miguel Moreno
          last edited by

          Hello @Jana-Koteich .

          Why would you NOT use the internet to sync the RTC with an NTP server ? ...

          If you have a FiPy, then your device is capable ( and sort of intended/expected ) to connect to the Internet.

          If definitely you plan to use the FiPy in completely isolated mode ( no external connectivity whatsoever ) then your only choice is to add an external battery-backed standalone RTC module and poll it from the FiPy every time it powers on to update the internal RTC.

          There are plenty of choices out there "of-the-shelf" RTC solutions, such as these quick examples:

          • Simple RTC ( inexpensive, but loses around 2 seconds precision per day ): https://www.adafruit.com/product/3295

          • High precision RTC ( more costly, but has long term precision - connect-and-forget style): https://www.adafruit.com/product/3013

          Both of these samples include MicroPython libraries ( in CircuitPython, to be precise ) ... so it should be almost straightforward to use them with your FiPy.

          J 1 Reply Last reply Reply Quote 2
          • J Offline
            jcaron @Jana Koteich
            last edited by

            @Jana-Koteich is your device powered externally (so you can keep it active the whole time) or battery-powered (so you need deep sleep)? What kind of precision do you need?

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jcaron @livius
              last edited by

              @livius said in Sync Time offline - RTC:

              maybe you can use DCF77 signal.

              Or one of the many many other radio broadcasts of the current time: https://en.wikipedia.org/wiki/Radio_clock

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jana Koteich @jcaron
                last edited by

                @jcaron The FiPy is powered by a power bank battery, and it should be active the whole time since I need to scan for a whole day for Bluetooth and WiFi (The FiPy is not fixed, it should be with me wherever I go to scan).

                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jana Koteich @Miguel Moreno
                  last edited by

                  @Miguel-Moreno Thanks a lot!
                  Indeed currently I am syncing the RTC with the NTP server by connecting the FiPy to the internet. But sometimes I am in places with no coverage (I connected it to my phone's hotspot), and since my application is to scan for WiFi and Bluetooth outside, the internet is not always available. That's why I need to get the current time offline and not to be hard coded.

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 1 / 1
                  • First post
                    Last post

                  Pycom on Twitter

                  Pycom