Hello:
I am getting acquainted with a recently purchased Adafruit datalogging shield using Adafruit's introductory webpages (https://learn.adafruit.com/adafruit-dat ... d/overview).
The shield is one of the newer models using the PCF8523 chip for the real time clock (rtc). I hit a roadblock running the pcf8523.ino example code that comes with the RTClib library (https://github.com/adafruit/RTClib/blob ... cf8523.ino).
I can't get the program to serial output anything other than "Couldn't find RTC". This means it is getting hung up on the rtc.begin() command. I could use some help getting my Arduino to find the rtc. Maybe an I2C issue?
I was able to solder the headers in place and mate the shield with an R3 Uno. I used a multimeter to check that all the analog, digital, and even the ICSP pins between the shield and micro-controller have a good connection. I've also checked to make sure that the watch battery wasn't dead (it had around 3.2 volts) and was installed on the shield correctly. Beyond that, I'm kind of at a loss. Any ideas?
Thank you,
Matt
Adafruit Datalogging Shield
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Datalogging Shield
Please post some photos showing all your soldering and connections.
- NightTrain
- Posts: 3
- Joined: Thu Jun 18, 2020 5:55 pm
Re: Adafruit Datalogging Shield
pics? Sure, no problem.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Datalogging Shield
Looks like you are using a very old Arduino that does not have the R3 header pins for SDA and SCL. So you will need to solder the SDA and SCL jumpers on the bottom of the board to communicate with the RTC. You can see the jumper pads in the upper left of the image below:
- NightTrain
- Posts: 3
- Joined: Thu Jun 18, 2020 5:55 pm
Re: Adafruit Datalogging Shield
Removed and replace the watch battery and briefly was able to get further into the script. "RTC is NOT initialized, let's set the time!" was displayed in the Serial monitor one time. However, I haven't been able to reproduce this.
Any further ideas? Is there a I2C equivalent of "hello world" that let's me know I can talk to the RTC?
MF
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Datalogging Shield
There is the i2c scanner which will scan the bus and report any devices that respond by address: https://playground.arduino.cc/Main/I2cScanner/
- Katie_UR_oceanlab
- Posts: 9
- Joined: Thu Jul 15, 2021 3:51 pm
Re: Adafruit Datalogging Shield
I am also having issues with this shield. I do have the newer Rev 3 version soldered to a DF Robot equivalent of an Uno
I am also following the pdf tutorial and having issues with setting the time clock. The serial monitor spits out gibberish for everything in the set up but then starts reading out everything in the loop. However, it is not reading out the correct time. I tried manually inputting by editing the rtc.adjust line to today's date and time
rtc.adjust(DateTime(2021,7,15,12,2,8));
And still it reads out as July 14 rather than 15 and Wednesday rather than Thursday. I even commented the entire offset section in case that was messing with things.
I tried moving past this after getting frstrated with the RTC and went on to SD reading but again ran into trouble with the Card Info example...the serial monitor reads out ??????.... continuously and nothing else. All I did was change the chip select pin to 10 as instructed.
I am also following the pdf tutorial and having issues with setting the time clock. The serial monitor spits out gibberish for everything in the set up but then starts reading out everything in the loop. However, it is not reading out the correct time. I tried manually inputting by editing the rtc.adjust line to today's date and time
rtc.adjust(DateTime(2021,7,15,12,2,8));
And still it reads out as July 14 rather than 15 and Wednesday rather than Thursday. I even commented the entire offset section in case that was messing with things.
I tried moving past this after getting frstrated with the RTC and went on to SD reading but again ran into trouble with the Card Info example...the serial monitor reads out ??????.... continuously and nothing else. All I did was change the chip select pin to 10 as instructed.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Datalogging Shield
Please post some photos showing all of your soldering to the shield.
- Katie_UR_oceanlab
- Posts: 9
- Joined: Thu Jul 15, 2021 3:51 pm
Re: Adafruit Datalogging Shield
Photos of the shield alone and stacked with Uno board.
- Katie_UR_oceanlab
- Posts: 9
- Joined: Thu Jul 15, 2021 3:51 pm
Re: Adafruit Datalogging Shield
I don't know how to share the images so you can see, can I send an email or share a google folder or something?
Though if I'm being honest I'm 99% sure soldering is not the issue.
Though if I'm being honest I'm 99% sure soldering is not the issue.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Datalogging Shield
Not sure why those links don't work. Sharing images from a google drive usually works. You can also upload using the "choose file" and "Add the File" buttons under the edit window. There is a 1 meg limit. 800x600 images typically work well.
- Katie_UR_oceanlab
- Posts: 9
- Joined: Thu Jul 15, 2021 3:51 pm
Re: Adafruit Datalogging Shield
:This is the direct drive link, sharing permissions enabled: https://drive.google.com/drive/folders/ ... _jI1Qd6uBq
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Datalogging Shield
I don't see any problems with the assembly. Please post the text or links to the exact code you are using to test with.
- Katie_UR_oceanlab
- Posts: 9
- Joined: Thu Jul 15, 2021 3:51 pm
Re: Adafruit Datalogging Shield
So I am following this pdf : https://cdn-learn.adafruit.com/download ... shield.pdf
And the sketch I'm running is the examle code for the rev B under Examples->RTClib->pcf8523. The only line I've changed is the rtc.adjust(DateTime(); to try to set the clock manually but changing that line does not effect what reads out on the serial monitor. You can see below what the serial monitor displayed for me just a couple of minutes ago:
`f⸮⸮f⸮⸮⸮~fx⸮⸮⸮⸮⸮⸮⸮`fff⸮
time now= 2021/7/19 (Monday) 20:18:12
since midnight 1/1/1970 = 1626725892s = 18827d
As you can see, the day and time are wrong, being displayed as yesterday evening.
Right now I only have theSD shield on the Uno, no other analog or digital inputs being used.
And the sketch I'm running is the examle code for the rev B under Examples->RTClib->pcf8523. The only line I've changed is the rtc.adjust(DateTime(); to try to set the clock manually but changing that line does not effect what reads out on the serial monitor. You can see below what the serial monitor displayed for me just a couple of minutes ago:
`f⸮⸮f⸮⸮⸮~fx⸮⸮⸮⸮⸮⸮⸮`fff⸮
time now= 2021/7/19 (Monday) 20:18:12
since midnight 1/1/1970 = 1626725892s = 18827d
As you can see, the day and time are wrong, being displayed as yesterday evening.
Right now I only have theSD shield on the Uno, no other analog or digital inputs being used.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Datalogging Shield
Try removing the coin-cell battery for a few minutes. That should reset the RTC. Then re-compile and upload the code for the RTC.
Please be positive and constructive with your questions and comments.