0

Unable to set time on Adafruit Data Logger shield
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Unable to set time on Adafruit Data Logger shield

by posfe3 on Wed Aug 02, 2017 8:40 pm

Hi all,

I'm trying to setup the RTC on a adafruit data logger shield which is connected to an Arduino Leonardo board.

Now, during the soldering process, I mistakenly soldered one of the stacking headers in the incorrect position (see pic below). Luckily, it was for the digital I/O pins which I will not utilize.

Anyways, I followed the instructions from here and I managed to set the time initially. However, after 2 weeks of not using Arduino (battery is attached to the shield), the time seems to be way off and I couldn't reset it using,

Code: Select all | TOGGLE FULL SIZE
rtc.adjust(DateTime(2017, 8, 3, 3, 0, 0));


Is it because I didn't wire the digital pins?
Attachments
IMG_20170802_224403.jpg
IMG_20170802_224403.jpg (130.47 KiB) Viewed 520 times
IMG_20170802_224251.jpg
IMG_20170802_224251.jpg (168.17 KiB) Viewed 520 times

posfe3
 
Posts: 1
Joined: Wed Aug 02, 2017 8:08 pm

Re: Unable to set time on Adafruit Data Logger shield

by Govner on Sat Apr 27, 2019 2:11 pm

Just a suggestion for the misplaced digital header.. If it were mine, I'd just get an additional header and add it alongside the one already installed. The one installed incorrectly may actually come in handy if the shield becomes a platform for expansion. Non-solder "wire-wrap" tool and proper wire are standard equipment in my shop and "wire-wrap" is very reliable if done correctly. Anyway, I thought I'd pass that along while you await an answer to your forum question.

Good luck with it. (I'm having similar RTC issues with the same datalogger shield also. I don't get it. It was working fine for a few days and then now the sketch can't get past the "RTC is NOT running" point in the code. Resetting the current date might "kick-start" the clock but that's not a good solution at all. I'll keep watching here rather than starting a new thread. Good luck !

Govner
 
Posts: 107
Joined: Wed Sep 14, 2016 4:42 pm

Re: Unable to set time on Adafruit Data Logger shield

by franklin97355 on Sat Apr 27, 2019 6:02 pm

Check your code to make sure you are using the correct clock chip. They changed a while back.

franklin97355
 
Posts: 21215
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Unable to set time on Adafruit Data Logger shield

by Govner on Sun Apr 28, 2019 12:14 am

Franklin,

Quick question.. do these earlier versions have any known idiosyncrasies?
I'm probably going to just remove and replace the RTC chip unless that will simply bring me back to square-one due to some inherent issues with this version of SD shield. Please advise. The shield is Adafruit's production #4116, GC-2, 94V-0.

Another option is just to piggy-back a different RTC (3231) and use the shield just for the SD logging perhaps. It depends on what you say now.

Thanks for the usual good support. I'll start a new thread but please weigh in on the question. Regards, GOV

Govner
 
Posts: 107
Joined: Wed Sep 14, 2016 4:42 pm

Re: Unable to set time on Adafruit Data Logger shield

by franklin97355 on Sun Apr 28, 2019 12:33 am

The RTC is either a DS1307 on the older boards or the PCF8523 on the newer boards.

franklin97355
 
Posts: 21215
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Unable to set time on Adafruit Data Logger shield

by Govner on Sun Apr 28, 2019 1:24 am

Yes.. the board silkscreen is clear.. "PCF8523" and the installed chip is correct/matching.

(The rest of this posted discussion was deleted because, upon discovering that a hardware issue was at fault, I deleted a lingering discussion about software/libraries/etc.) Save your eyes.
Last edited by Govner on Wed May 08, 2019 5:02 am, edited 1 time in total.

Govner
 
Posts: 107
Joined: Wed Sep 14, 2016 4:42 pm

Re: Unable to set time on Adafruit Data Logger shield

by adafruit_support_carter on Mon Apr 29, 2019 10:45 am

Does the initial problem repeat? After a few days is the time off and you can't set it again?

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: Unable to set time on Adafruit Data Logger shield

by Govner on Tue Apr 30, 2019 3:56 am

I haven't had to run the RTC 1307 constructor to "kick-start" the RTC 8523 chip again yet. At present, the RTC chip is running fine. I suspect it will continue running fine until the register contents are disturbed. It's not a big concern of mine such that I'll waste any more time digging deeper now that I know that running the 1307 initialization apparently re-configures the 8523 such that it starts/runs. Once it's running, I do edit out the 1307 rtc constructor and replace it with the proper one. This is not acceptable in the field so I'll just use the shield here locally, which is fine.

Until the cause of this bug is resolved (if ever), I will simply include 3231 RTCs -- as supplemental RTC to the projects where consistent performance is a must.

I will be more than happy to post anything helpful that might be discovered on this issue. I might just replace the 8523 chip just in the unlikely chance that it has some mysterious failure mode but I seriously doubt that it's a hardware (or chip failure) issue.

Time will tell of course.


no worries. Thanks for the usual great product support.

Gov

Govner
 
Posts: 107
Joined: Wed Sep 14, 2016 4:42 pm

Re: Unable to set time on Adafruit Data Logger shield

by Govner on Tue Apr 30, 2019 4:16 pm

Govner wrote:I haven't had to run the RTC 1307 constructor to "kick-start" the RTC 8523 chip again yet. At present, the RTC chip is running fine. I suspect it will continue running fine until the register contents are disturbed.

Gov



Well, not so fast. Over night, I removed all power (except RTC battery) from the UNO/Logger Shield. Today, the RTC was not running again until I did the "kick-starting" procedure previously described.

The battery is new.

For now, I'm going to use another RTC piggy-backed onto this logger shield.

Thanks and have a great week,

GOV

Govner
 
Posts: 107
Joined: Wed Sep 14, 2016 4:42 pm

Re: Unable to set time on Adafruit Data Logger shield

by rstolfa on Thu May 02, 2019 1:07 pm

I too have one of the PRC8523 boards and cannot seem to get the RTC to run. No matter if I use the RTC_PFC8523 or the RTC_DS1307, I cannot seem to get a time of anything other than:
2165/165/165 165:165:85
out of it.

Has there been any other progress by anybody else?

rstolfa
 
Posts: 2
Joined: Thu May 28, 2015 1:28 pm

Re: Unable to set time on Adafruit Data Logger shield

by rstolfa on Thu May 02, 2019 3:17 pm

Ok. In searching around, I found a hint that some Unos don't support the SDA/SCL quite correctly. So, I soldered the pads together under the board, and viola! It works.

rstolfa
 
Posts: 2
Joined: Thu May 28, 2015 1:28 pm

Re: Unable to set time on Adafruit Data Logger shield

by Govner on Thu May 02, 2019 11:06 pm

rstolfa wrote: .... some Unos don't support the SDA/SCL quite correctly. So, I soldered the pads together under the board, and viola! It works.



Hi rstolfa,

Interesting exception. I hope you find that this is a helpful & full explanation of your VOILA moment.

To explain, older UNOs use only 1 set of pins A4/A5 (for SDA/SCL, resp) on one side of the board. On the other side, these older versions do not have "SDA" & "SCL" pins installed adjacent to the ARef pin. They are, in fact, simply missing - not there. Because TheDataLogger Shield header intends by designed to plug into (and connect) to these missing pins, the shield ends up with no connection to the I2C bus (SDA/SCL). However, since ALL Uno designs have A4 & A5, the solution to missing SDA/SCL pins is to "jumper" A4 and A5, as you wisely did so. The jumpers, in effect, simply connect the the SDA/SCL, I2C logic signals from A4 & A5 over to the other side of the shield and directly to the shield's respective header pins that are otherwise just "floating". So, even though the shield's header pins will appear to be floating (not-connected) to anything on the UNO, they are now actually connected and getting their signals from your jumpered A4/A5 header pins . And so, that's why you got a nice "voila"! Good for you! If you re-read the silk screen on the shield near the jumpers that says: "Short on '328s without SDA/SCL pins", it should make perfect sense. I must say that I have not seen any quote "Original Arduino UNOs" without the said SDA/SCL pins, it doesn't mean that there are not plenty of "knock-offs" out there without these two duplicate pin sets. I suspect that Adafruit was wisely anticipating this exception.

I would be curious to see a photo of your "UNO". Is it a knock-off or is it an Arduino-brand, abeit early edition, board?

Good luck,

GOV





Thanks,
Govner
Last edited by Govner on Sat May 04, 2019 12:19 am, edited 3 times in total.

Govner
 
Posts: 107
Joined: Wed Sep 14, 2016 4:42 pm

Re: Unable to set time on Adafruit Data Logger shield

by Govner on Fri May 03, 2019 12:01 am

Hi Product Support,

I purchased my DataLogger Shield long ago, circa 2016. In getting to the bottom of this current RTC issue, I re-read the original product description and, on the first page, I noticed this revision note:

======================
Technical Details
Revision History:

As of April 19, 2018 we've updated this design slightly to add a 10K resistor + 10uF capacitor on the RTC battery input pin to help avoid the RTC losing the date/time from a rapidly-dropping power supply.
======================

This, to me, is the missing clue. Perhaps this note is in the product's .pdf file and I just missed it. I looked for evidence that this "mod" has been promulgated in the schematic and the PCB layouts but can't find any. I ordered two more of these shields today and hope to see this design change implemented but the wording of the revision notice above says "...design slightly [ TO ] add a 10K resistor + 10 uF capacitor...". Tricky wording, no? Does this mean that the design change was implemented or that the customer needs to do it himself? I guess I'll be able to answer this question when I receive my order but I tender this question as a way to clear the air and perhaps you might steer others who appear to be experiencing the RTC's loss of date/time by disconnecting the Vcc power supply. (rapidly-dropping?) That would certainly be true when disconnecting Vcc.

Please point to the link for the schematic showing the revision. I'm fumbling the mouse.

Thanks & have a great Friday !

Gov

Govner
 
Posts: 107
Joined: Wed Sep 14, 2016 4:42 pm

Re: Unable to set time on Adafruit Data Logger shield

by adafruit_support_carter on Fri May 03, 2019 11:49 am

I think that comment is referring to these:
rtc.jpg
rtc.jpg (17.15 KiB) Viewed 284 times

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: Unable to set time on Adafruit Data Logger shield

by Govner on Fri May 03, 2019 1:04 pm

Hi Carter,

Awesome!

YES! That would make more sense. So, the design change connects a 10K & 10 uF to the VDD pin of the chip, NOT to be confused with the chip's "battery input" pin as the revision wording states. Perhaps an "correction/edit" is appropriate that states reference to Vdd vice the "battery" ?

Thanks for the clarification. The 'DataLogger Shield' version that I purchased is, in fact, one that loses RTC data (absent the R-C design change). I suspect that we've nailed down the likely the cause of the "RTC restart" issues people are writing about. Finally.

I will utilize the handy proto area plate-thru holes on this shield to mount a thru-hole 10K (1/16w) and 10uF-10vdc cap. After isolating the 8523 Vdd trace, I will connect the added R-C directly to the chips Vdd pin.

I ordered two new shields ( shipped ) from you guys yesterday. Case closed. I don't suppose you'd consider a swap/recycle for this older edition? Just asking.

Thanks again,
GOV
Last edited by Govner on Fri May 03, 2019 1:37 pm, edited 1 time in total.

Govner
 
Posts: 107
Joined: Wed Sep 14, 2016 4:42 pm

Please be positive and constructive with your questions and comments.