Initialization Issues with HiLetGo Arduino Uno Micro SDHC Module

I bought from here: https://www.amazon.com/HiLetgo-Adater-Interface-Conversion-Arduino/dp/B07BJ2P6X6. I have used the canonical code setup and wiring that many people use e.g. from Arduino Micro SD Card Module Tutorial - How SD Card Module Works and How to use it with Arduino. All the SPI pins are correctly connected, the code is standard initialization, and I am using 5 V.

I check on my card daily and the fact that it’s so random when it chooses to work or not is annoying.

For 3 of the days, I’ve had it work with no problems. All of the logs were fine. A couple of other days have appropriate logs as well though not at the volume that I have been expecting, not sure why. But recently, the card just FAILS TO INITIALIZE and thus no logs.

#include <SD.h>
#define chipSelect 10
void setup() {
  pinMode(chipSelect, OUTPUT);

  digitalWrite(chipSelect, HIGH);

  Serial.begin(9600);
  s.begin(9600);

  Serial.println("did this initialize??");

  if (!SD.begin(chipSelect))
  {
    Serial.println("SD initialization failed.");
  }

  Serial.println("SD initialization done.");
}

I've tried storing placeholder files on the card so that the module sees that there is storage and thus a card present (a solution I found online that helped when I had initialization errors before).

I am careful to eject my SD card from the computer every time. Every time I take it out I make sure to unplug power first. When I’m done I put the sd card back, then turn on power again.

It’s just so frustrating so if anyone has suggestions that would be great. Tomorrow, I will try to do a step down from 5 V to 3.3 V for each of the pins to see if it does anything. I am annoyed that I even have to do this because these modules are supposed to work for both voltages.

If anyone has experience with this module let me know. I've cycled through 4 of them (all used for different amounts of time so I doubt the reason is that they go bad quickly) and 2 SD cards and continue to have the problem.

By chance do you happen to have another SPI device connected?

If so those boards likely don't tri-state the MISO line.

I don’t believe so? The SPI pins are taken up by the module. I do have an ESP8266 connected via serial but that’s just via two digital pins, plus i haven’t done any data transfers so it’s just sitting there. No other heavy devices like those.

Which rather suggests your code is fine. The intermittent results could be down to intermittently-available adequate power, or intermittently-kosher slack-arsed wiring.

I only had long female-male cables at hand, so essentially I had to loop those six up a ton and rubber band it to not cause a mess. Surely that's not causing an issue right? The ends are properly attached to the Arduino and module pins. I am pretty sure the Arduino is adequately powered.

Who would know? Yes, you say it's 5v, but where from and how connected?

I have conducted my tests both via cable with plugged in laptop and via a transformer that steps down 24 V AC to 12 V DC that is plugged in via Arduino barrel jack.

No mention of amps, I see.
And the 12v transformer is probably not such a good idea.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.