Adalogger RTC SD Initialization Failed - Repeatable Fix

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
tyler123
 
Posts: 16
Joined: Thu Jul 01, 2021 9:54 am

Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by tyler123 »

I recently purchased 2 Huzzah32 boards and 2 Adalogger RTC boards.

When running any SD card file (for example the example listFiles), the board would always say initialization failed during the initial setup.

In trying to debug, I put the initialization attempt in a while loop and it would fail hundreds of times in a row. But then I found out I could make it pass initialization by jiggling it. Once it initialized, it had no problem writing to files.

Through further jiggling, I narrowed it down to just touching the SPI Microcontroller In Sensor Out (MISO) pin would allow it to initialize. In a kind of sketchy maneuver, I threw a 1Mohm resistor from 3v to the MISO pin and now it connects every time.

Am I the only one that's had this issue? Why is this occurring? Is there a better fix that my sketchy resistor? Is my sketchy resistor going to cause any issues with that MISO pin?

Edit: This issue is 100% repeatable on two different sets of boards.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by adafruit_support_mike »

That's certainly odd, and we've never seen that behavior ourselves.

It sounds like a connection issue though. Did you get the RTC FeatherWings with presoldered header, or solder your own?

User avatar
tyler123
 
Posts: 16
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by tyler123 »

Thanks for the reply!

Unfortunately, I don't believe the RTC Adalogger has a presoldered option, so I soldered it myself. The Huzzah32 came presoldered. This exact problem occurs on 2 different Huzzah32s with 2 different RTC Adaloggers and my solution fixes the problem on both boards. The solder looks clean and I've soldered a wide variety of LEDs and sensors (IMUs, etc) with no issues.

The thing that makes me think it's not a soldering issue is that once I initialize, I can remove the resistor and it continues to write to the SD card. I can send sensor data from the Huzzah32 to the wing and write it to the SD card. I can send RTC data from the wing to the Huzzah32 and broadcast that over UDP. The only issue is SD card initialization.

Edit: While I have somebody's attention, I also had the same issue as the user in this forum post from 2019: viewtopic.php?f=22&t=147315. The guide was never updated with the fix. The important bit is that the file needs to open and close every loop or it never actually writes anything to the card.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by adafruit_support_mike »

For the sake of a sanity check, post a photo showing your hardware and connections please. 800x600 images usually work best.

User avatar
tyler123
 
Posts: 16
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by tyler123 »

See attached. Without that resistor, it fails initialization every time. As soon as I either touch the pin or connect this resistor, it works every time. 100% repeatable on 2 different board setups. I've attached the code as well although it's pretty much the demo file.
Attachments

[The extension ino has been deactivated and can no longer be displayed.]

Huzzah32SDFail.png
Huzzah32SDFail.png (725.6 KiB) Viewed 168 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by adafruit_support_mike »

Thank you.

Your soldering looks good overall, but I see a couple of onion-shaped joints. That’s often a symptom of poor wetting between the solder and the pad.

Give any joint that isn’t a nice fillet from the pin to the pad a dab of solder and reheat them. See if that has any effect on the SD behavior. It may not, but connection issues will obscure any deeper issues.

User avatar
tyler123
 
Posts: 16
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by tyler123 »

Hey Mike,

It's been a while since you suggested cleaning up the solder. I've been busy and didn't have time to respond. Since your suggestion, I've cleaned up the solder on those 2 boards and I've received 2 additional boards. All 4 boards have the exact same problem and solution. To be clear, this is 4 different Huzzah32's and 4 different Adaloggers.

To recap - the SD card on the Adalogger fails to initialize nearly 100% of the time. When I touch the MISO pin with my finger or a wire, it instantly initializes the SD card. My "permanent" fix is to throw a 1Mohm resistor from 3v to the MISO pin and it connects 100% of the time. This fix works on 4 boards.

I'm confident that this is a problem and solution you could recreate on your end. It would be awesome if you could recreate it and provide some more information on a better fix or at least confirm that my resistor fix isn't going to cause any issues.

I'm going to also redraw attention to this statement from one of my earlier posts: "Edit: While I have somebody's attention, I also had the same issue as the user in this forum post from 2019: viewtopic.php?f=22&t=147315. The guide was never updated with the fix. The important bit is that the file needs to open and close every loop or it never actually writes anything to the card."

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by adafruit_support_mike »

I have those boards and will try to replicate it. The fact that you’re seeing repeatable behavior across several boards does suggest a systetmic issue.

User avatar
tyler123
 
Posts: 16
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by tyler123 »

That's great, thanks! Let me know what you find. Here's the simple bit of code that I used to test touching the MISO pin:

Code: Select all

while (!SD.begin(SD_PIN)) {
    Serial.println("Card init. failed!");
  }
  Serial.println("Card init. succeeded!");

User avatar
tyler123
 
Posts: 16
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by tyler123 »

Hey Mike,

Did you get a chance to prototype this?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

Post by adafruit_support_mike »

I did some quick tests and wasn't able to reproduce the problem on my boards. I want to do some more detailed testing to see if there's a margnal signal somewhere, but life has been getting in the way.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”