Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Mayfly clock and battery

Home Forums Mayfly Data Logger Mayfly clock and battery

Viewing 15 reply threads
  • Author
    Posts
    • #13622
      Matt Barney
      Participant
        I would like to better understand the Mayfly dependency on having its clock set correctly prior to deployment. If you remove the coin-cell battery for many days, then reinstall it, will the Mayfly los
      • #13623
        Sara Damiano
        Moderator
          If you remove both the coin battery and the mayfly loses power, even for an instant, the clock will reset to Jan 1, 2000 0:00:00.

          The coin battery isn’t necessary if there’s another power

        • #13624
          Shannon Hicks
          Moderator
            There’s no reason to remove the CR1220 coin cell battery before shipping the board.  You’re not able to ship loose batteries, or larger multi-cell batteries, but it’s okay to ship o
          • #13625
            Matt Barney
            Participant
              Thanks for your quick responses! The shipping constraints are good to know; going forward I won’t remove the battery after setting the clock.

              I was able to confirm, using PCSync, that my develo

            • #13627
              Sara Damiano
              Moderator

                Was anything recorded on the SD card?

              • #13629
                Matt Barney
                Participant

                  Yes

                • #13630
                  Matt Barney
                  Participant

                    I’ll attach the code here. Thanks, Matt

                    Attachments:
                  • #13640
                    Sara Damiano
                    Moderator

                      I didn’t try running it, but there’s nothing that jumps out at me in a very quick glance through the code.  Did the SD card have data on it?

                    • #13645
                      Jake Lemon
                      Participant
                        The SD card did have data. I left the SD card in  long enough to complete one measurement. Attached. I then removed the SD card and took it home to look at the data, but left the station running with
                      • #13647
                        Matt Barney
                        Participant
                          That’s good to hear. Yep, all looked as expected in the data file on the SD card. It was named with 2000-01-01, so apparently never connected and synced to NIST. I’ll zip and attach the cs
                        • #13649
                          Sara Damiano
                          Moderator
                            Oh.  Oops.

                            The data was probably rejected because of the timestamp.  The clock resets itself to 2000-01-01T00:00:00 – but then ModularSensors applied a negative offset to it assuming you want

                          • #13650
                            Sara Damiano
                            Moderator

                              I made an issue for myself to fix this: https://github.com/EnviroDIY/ModularSensors/issues/304  Unfortunately, that doesn’t give you back lost data.

                            • #13651
                              Matt Barney
                              Participant
                                No problem.

                                So, to make sure I’m understanding: the funky date issue aside, had the Mayfly connected to the internet successfully, we believe it would have set its clock from NIST and would hav

                              • #13652
                                Sara Damiano
                                Moderator
                                  Yes, that’s what it should have done.  I don’t see any obvious reason why it wouldn’t have, other than that it clearly didn’t.  The single battery measurement was on the low
                                • #13653
                                  Matt Barney
                                  Participant
                                    Here’s our platformio.ini, which I didn’t post earlier. It’s identical to what works from my desk, so don’t suspect there’s a problem here.

                                  • #13654
                                    Sara Damiano
                                    Moderator

                                      That configuration looks good to me.  Let me know if you see any bugs I can smash.

                                  Viewing 15 reply threads
                                  • You must be logged in to reply to this topic.