Arduino Forum

Using Arduino => Storage => Topic started by: Tbdanny on Jun 25, 2019, 01:37 pm

Title: SD Card Not Initialising?
Post by: Tbdanny on Jun 25, 2019, 01:37 pm
Hi all,

I'm trying to get an SD card module working with an Arduino Uno, but I've run into a few issues.  I've followed this tutorial: https://randomnerdtutorials.com/guide-to-sd-card-module-with-arduino/ (https://randomnerdtutorials.com/guide-to-sd-card-module-with-arduino/), however whenever I run the SDCardInfo sketch, all I get is an error message listing things to try.  All of which don't apply, as I have tried (i.e. wiring is correct, card is inserted, and I'm using the CS pin defined in the sketch).

On top of this, I have also tried:


All of these met with the same result.  Below is the module I'm using, and how I have it wired up:

(https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/7d841308-1983-4fe0-8b31-df8b9804a5b5/dda5zln-f84ff7a0-de0a-4cc5-a693-a19dc5938a8a.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7InBhdGgiOiJcL2ZcLzdkODQxMzA4LTE5ODMtNGZlMC04YjMxLWRmOGI5ODA0YTViNVwvZGRhNXpsbi1mODRmZjdhMC1kZTBhLTRjYzUtYTY5My1hMTlkYzU5MzhhOGEuanBnIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmZpbGUuZG93bmxvYWQiXX0.gORp_sVSlfgVD5hrlwscyEYG1v707Bf-lG3D65fEY38)

(https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/7d841308-1983-4fe0-8b31-df8b9804a5b5/dda5zm3-0a55a06c-524e-478f-953a-9f28821d3125.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7InBhdGgiOiJcL2ZcLzdkODQxMzA4LTE5ODMtNGZlMC04YjMxLWRmOGI5ODA0YTViNVwvZGRhNXptMy0wYTU1YTA2Yy01MjRlLTQ3OGYtOTUzYS05ZjI4ODIxZDMxMjUuanBnIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmZpbGUuZG93bmxvYWQiXX0.mzLgu6cySXgCh4TDq1XeK4vyEDabTELDGZyrKhelBF4)


The two MicroSD cards I've tried in the adapter are 8GB and 16GB cards, which were formatted for FAT32 (Quick Format) under Windows 7.


Am I missing something, or could I have a faulty module?
Title: Re: SD Card Not Initialising?
Post by: mrobber on Jun 25, 2019, 03:00 pm
I'm having similar problems (as described in another thread), but have you tried the SD Card Formatter app instead of using Win 7?

See the pinned topic: https://forum.arduino.cc/index.php?topic=228201.0 (https://forum.arduino.cc/index.php?topic=228201.0)
Title: Re: SD Card Not Initialising?
Post by: ShermanP on Jun 25, 2019, 07:48 pm
I just started a new thread about a possible explanation.

https://forum.arduino.cc/index.php?topic=623299.0 (https://forum.arduino.cc/index.php?topic=623299.0)

But other than that, do you have a way to check that 3.3V is being delivered to the Vcc pin of the SD card (from the voltage regulator on the module)?
Title: Re: SD Card Not Initialising?
Post by: Tbdanny on Jun 25, 2019, 09:30 pm
I've got it working now.  I formatted the 8GB card with the formatter program, and tried it.  The first time I ran the CardInfo sketch, it said it couldn't find the partition.  After that, it worked correctly every single time, even after I put some files on it to test.

It also didn't help that one of the MicroSD-to-SD card adapters didn't work.
Title: Re: SD Card Not Initialising?
Post by: ShermanP on Jun 25, 2019, 11:48 pm
If your SD module works, then I'm wrong about that type of module being the problem.  Oh well.