I have a data logger shield. The SD card functionality works absolutely fine, but the RTC chip
functionality simply does not work. The time cannot be set either automatically or manually and it puts out a 2165 date along twith the standard message that the RTC is not working. I have a Mega.
I have loaded the right library for the Mega from the Arduino website. I tried the non-Mega library too. I have followed the instructions on the website to the letter. The soldering is perfect and there are no connections to external devices so there is no need to send a picture. The coin cell provided by Adafruit was only 2.65V, but a replacement with 3.2V makes no difference. I have read all the support blogs. According to one of them, when the chip
itself goes out in cold temperatures, it puts out this 2165 date. Another blog post indicated that the chip can give a 2165 date when the power supply is bad - but this was for a different product - not this particular shield. The
shield is not working at normal room temperatures and the power supply does
not make a difference. I have put many hours into this. I do not want my
money back, I just want another shield (and instructions on who to talk to to get this done) if there is not a simple undocumented trick to fix the problem. I would be happy to mail my shield
back to Adafruit. Let me know what to do please. Thanks.
Real time clock cannot be set
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Real time clock cannot be set
Is it a pre-R3 Mega? Older mega's do not have R3-standard pins for SDA and SCL and require jumpers to access the clock.I have a Mega.
If you post some clear photos of the sheild we can check for any assembly issues as well.
-
- Posts: 6
- Joined: Sat Jul 12, 2014 11:36 am
Re: Real time clock cannot be set
I believe that is is pre - R3, because there is nothing on it to indicate R3. This may very well be the problem - I have not heard anything about the jumper issue. What jumpers will I need to do? Are there any instructions out there? Assembly is not an issue - it was pre-assembled and the the headers I added are perfect!
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Real time clock cannot be set
For pre-R3 Megas, you should have two extra pins near the AREF pin that do not engage in the Mega headers. These are the SDA & SCL pins.
See about halfway down on this page for instructions for adding jumpers to R2 and earlier Megas: https://learn.adafruit.com/adafruit-shi ... -assembled
See about halfway down on this page for instructions for adding jumpers to R2 and earlier Megas: https://learn.adafruit.com/adafruit-shi ... -assembled
-
- Posts: 6
- Joined: Sat Jul 12, 2014 11:36 am
Re: Real time clock cannot be set
Hooray! This is the answer! The jumpers fixed the problem immediately. Thank you!
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Real time clock cannot be set
You are welcome!
- REng27
- Posts: 9
- Joined: Tue Sep 30, 2014 4:25 pm
Re: Real time clock cannot be set
Hello - I just wanted to piggyback on this posting as I am having the same problem.
I am using a Mega R3. Instead of the data logger, I am using the RTC DS1307 and the microSD breakout board (https://www.adafruit.com/product/254z).
My code was working fine, but for the past two days it hasn't - I am not sure what the problem is caused by.
The code takes the data from the RTC and logs it on an SD (along with other data). I am now getting: Time: 2165/165/165 165:165:85.
I tried using the RTClib on its own and it works just fine. I used the SD card, and it works just fine. For some reason, combining the two has become a problem (without any changes to my code). Without the battery inserted, and supported only by USB, the code works just fine with the RTC and microSD logger.
I'm assuming its a power issue? But I don't understand what is causing the problem if it works some of the time, on either power supply.
Any help would be greatly appreciated!! Thanks!
I am using a Mega R3. Instead of the data logger, I am using the RTC DS1307 and the microSD breakout board (https://www.adafruit.com/product/254z).
My code was working fine, but for the past two days it hasn't - I am not sure what the problem is caused by.
The code takes the data from the RTC and logs it on an SD (along with other data). I am now getting: Time: 2165/165/165 165:165:85.
I tried using the RTClib on its own and it works just fine. I used the SD card, and it works just fine. For some reason, combining the two has become a problem (without any changes to my code). Without the battery inserted, and supported only by USB, the code works just fine with the RTC and microSD logger.
I'm assuming its a power issue? But I don't understand what is causing the problem if it works some of the time, on either power supply.
Any help would be greatly appreciated!! Thanks!
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Real time clock cannot be set
If it worked before and stopped, then it is likely either a battery or a connection issue.
Check the battery - the voltage should be close to 3v.
And double check your wiring. If you post photos showing your soldering and connections we'll take a look.
Check the battery - the voltage should be close to 3v.
And double check your wiring. If you post photos showing your soldering and connections we'll take a look.
- REng27
- Posts: 9
- Joined: Tue Sep 30, 2014 4:25 pm
Re: Real time clock cannot be set
Curiously, when I attached an outside power source (I am also using the adafruit v2 motorshield, so it is a 12 V power supply), it logs just fine.
I will attach photos as soon as I am able.
Thanks for the help!
Last edited by REng27 on Wed Nov 05, 2014 11:39 am, edited 1 time in total.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Real time clock cannot be set
Motor noise and power fluctuations can often have an adverse effect on other circuitry. Using a separate power supply often clears things up.
- REng27
- Posts: 9
- Joined: Tue Sep 30, 2014 4:25 pm
Re: Real time clock cannot be set
While testing the RTC and SD, none of the motors are connected.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Real time clock cannot be set
How were you powering it before?
- REng27
- Posts: 9
- Joined: Tue Sep 30, 2014 4:25 pm
Re: Real time clock cannot be set
Only USB. The shield wasn't on - I've tested it many times this way so that I don't overuse the motors unnecessarily, and it has worked fine.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Real time clock cannot be set
No idea why a 12v supply would work better than USB. USB 5v power is usually pretty clean.
- REng27
- Posts: 9
- Joined: Tue Sep 30, 2014 4:25 pm
Re: Real time clock cannot be set
I'm not sure either - especially because the SD logs the RTC data correctly when ONLY the USB is connected and the battery is not inserted into the RTC. So it does work with the USB as long as the battery isn't present.
When the battery IS inserted, it works only using the serial monitor and not the SD logger OR if the 12V adapter is attached the RTC talks to the SD logger just fine.
When the battery IS inserted, it works only using the serial monitor and not the SD logger OR if the 12V adapter is attached the RTC talks to the SD logger just fine.
Please be positive and constructive with your questions and comments.