Go Down

Topic: SD ReadWrite Issue (first time using SD module) (Read 276 times) previous topic - next topic

MRutger

Dear forum,

I recently bought a SD module to use with the Arduino uno wifi rev 2 for data logging.
Before starting my own project I tried to use the examples from the SD library to see if all the basic functionalities were working.

Using the CardInfo example worked perfectly, so I'm guessing that my wiring and SD card are fine. However when i tried out the Datalogger example problems started occuring. The Arduino would create the file for the data logging, but it wouldn't actually write anything into it. I also tried the ReadWrite example but the same thing happened. While trying the ReadWrite example the following would appear on the serial monitor:

"Initializing SD card...initialization done.
Writing to test.txt...done.
error opening test.txt"

But like i said before, nothing would actually be written onto the file created on the SD card. Now I know that most people use the SDfatlib library, but since I've only started working with Arduino recently this went a bit above my head. This issue has probably been covered before so I'm sorry for bringing it up again. Hopefully one of you is willing to help me.

I know you'll probably need more info to help me so please tell me what details you need and I'll respond asap

Juraj

You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

MRutger

Dear Juraj,

Thanks for replying. The module that I'm using is a Velleman VMA304.
It uses the SPI protocol and SD.h library. According to the manufacturer it should be compatible with the Arduino's. Altough it has both a 3.3V and 5V pin, I've been using 5V since this worked with the CardInfo example. ( https://vellemanstore-vellemannv.netdna-ssl.com/downloads/29/vma304_a4v01.pdf )

As for the SD card that I'm using, I have tried a 512MB Kingston, a 128MB Sandisk and 2GB microSD+adapter Lexar. 

MRutger

Quick Update:

While reading comments about other SD card modules some of them said that the 5V and 3.3V pin were wrongly labeled. So I tried to switch up my pins a bit and that seems to have fixed it. So now I'm supplying 5V to the 3.3V pin of the Velleman module and everything works perfectly.
Leaving this here just in case somebody else has the same problem in the future.

ieee488

So now I'm supplying 5V to the 3.3V pin of the Velleman module and everything works perfectly.

This makes no sense.
The datasheet you linked shows no 3.3V just 5V pin.

MRutger

This makes no sense.
The datasheet you linked shows no 3.3V just 5V pin.

I know, but that's the official manual of the module. You can see the 3,3V pin on the image, and it is mentioned in the specifications below the table. I didn't expect it to solve my problem, but while I was looking up other SD Card modules, one of the comments was that the 3,3V and 5V pin labeling was wrong. So I figured why not try it as well with this one.

ieee488

I know, but that's the official manual of the module. You can see the 3,3V pin on the image, and it is mentioned in the specifications below the table. I didn't expect it to solve my problem, but while I was looking up other SD Card modules, one of the comments was that the 3,3V and 5V pin labeling was wrong. So I figured why not try it as well with this one.
No, I don't see an 3.3V on any image.
Too blurry.

Go Up