Home › Forums › Mayfly Data Logger › [rtc] time kept without power (has cr1220)? › Reply To: [rtc] time kept without power (has cr1220)?
I haven’t had any problems with the Mayfly boards not retaining the time. I just tested 2 boards that have been on my bench for several months without any external batteries (other than the CR1220) and they both still knew the correct date and time. I then got out 5 new boards, inserted new CR1220 batteries, and then programmed them with the sketch you linked to, first uploading the code with the correct date and time in line 11, then commenting out line 19 and reprogramming it so the board only prints the current date/time on powerup. Leaving the boards for anywhere from 5 to 15 minutes without any external power, then connecting the USB cable, opening the serial terminal, and they all retained the correct time.
I’ve attached a photo showing the proper orientation for how to insert the battery. Double-check that you inserted it correctly. You should also check the voltage of the battery to make sure it is at 3v. The easiest way to do that is to put one voltmeter lead on the top of the CR1220 battery holder (the positive side), and use the metal housing of the main microSD card socket for the ground. You should see around 3v. If not, then remove the battery and check it outside of the Mayfly. Let me know what you find out.