Hello everyone I have problem with card reader module connection to Arduino Uno.
The problem is no matter what I do (checking wiring, changing pin from 4 to 10 or change arduino uno board) SD library example "CardInfo" doesn't work.
I use:
SD card module HW-203
Arduino Uno
Micro SD card for 2 Gb formatted to FAT16 / FAT32
Wires
SD library version 1.2.4
I tried:
Changing pin from 4 to 10 and vice versa
Define chip select pin as an output and digital write to high
Changing from 3.3 V to 5 V and vice versa
Changing arduino boards (also I tried Arduino nano)
I would be happy to any help!!!)))
Thanks in advance
Your topic was MOVED to its current forum category as it is more suitable than the original as it nothing to do with Installation and Troubleshooting of the IDE
Why this random wiring? 5 volt devices should be powered by 5 volt and 3.3 volt devices by 3.3 volt. Connecting different devices like that call for level shifters.
Hi, thanks for your answer)
The module allows connection either 5 V or 3.3 V.
I though, may be one line is not working so tried both.
The wiring presented on the picture below.
I know I shouldn't define it, but I found some solutions in internet that say it worked, so I tried.
Nevertheless, It didn't work.
Hi, thank you for your answer.
I don't know if I am wright or wrong, but on the module there are 2 pins for V3.3 and V5. So I assumed, that it is either or. It doesn't meter, because I tried both 3.3 and 5 volts and it didn't work.
Thank you for link, I will try with new module.
If you have any other suggestion I would be happy to hear.
I'm confused. In your first post you said you were using a microSD card. But the HW-203 SD module you are using is for full-size SD cards. If you have a microSD card, then the module recommended by fat16lib in post #8 is what you need. Your HW-203 module, for full-size cards, only works with 3.3V Arduinos, not 5V. The problem is not the power supply voltage, but rather the voltage on the CS, MOSI and SCLK lines output by the Arduino. The HW-203 has no voltage translation, so you would be sending out 5V on those lines when the card is powered by 3.3V, which you shouldn't do.
Hi, thank you for your answer.
Sorry, to hear that I confused you. Let me explain my self.
You are right. The module is designed for full size SD card. I used microSD card with adapter.
I think the difference between SD and microSD is only the size. Please , correct me if I wrong.
Also, the module, as I understand it, can work from both 5 and 3.3V.
I tried 3.3 V it also didn't work.
Regards
Okay,
I am not sure what should I do with it.
If I connect to 3.3 V it should work.
I did, it didn't.
I am not familiar with arduino or any other platform. I only start to use it.
I though that this module should be very simple.
May be you can give some advice where to fined problem or how to "debug" circuit.
Thanks a lot
Your HW203 module will never work with Uno. The Uno has a 5V CPU The HW203 is designed to work with 3.3V CPUs. Connecting the HW203 power pins to 3.3V or 5V will not change the Uno's SPI levels to 3.3V.
The problem is with the SPI logic levels. The Uno has 5V levels, the SD requires 3.3V levels. You must use an SD modules that translates levels. The SD module must have level shifters. The HW203 has no logic level shifters.
Thanks a lot !!!!!
I mean a looot!!
Now I get it.
You just saved me hours of time and effort )))
I will use module that you advised in post earlier.
I have to ask:
Will it work if I use resistor to reduce voltage from 5 to 3.3 V? For all connection pins.
Best regards)))
You will probably be happier with a microSD card module like the one recommended. But if you have three 1N4148 diodes, there is a fix for the full-size module that might work. Pictures below.
You cut the existing traces and insert the diodes. With that, the Arduino can only bring the lines low. When not brought low, the lines will be pulled up to 3.3V by the module's 10K pullup resistors.
Only try this if your module looks like the one in the picture.
Edit: One other possibility for your problem is insufficient power going to the SD card module. It might be helpful if you could show how your Arduino is powered, and where the 5V (or 3.3V) for the module comes from.
Thank you tor possible solution.
The arduino is powered by USB cable connected to PC.
I am not sure why there are diodes and not resistores. Is it because of nature of spi protocol? Like it is not a simple DC so we need diodes.
Also I don't really have diodes, so it is easier just to take other module.
Regards
I'm not an expert, but isn't it wrong that he connected 5 volts to the digital pin and not to the 5 volts itself as well as sending 5 volts to the 3.3 volt input as shown in the picture? As someone mentioned wouldn't these things even without the other things on destroy the board? There are exact instructions for the board.