SD Card Initialization Help



Yes, those resistors (R1-R4) in the bottom picture. Unless my eyes are failing (that is possible..I'm old!), those particular resistors are 10Kohm. That will add a considerable rise and fall time delay.

SurferTim:
Yes, those resistors (R1-R4) in the bottom picture. Unless my eyes are failing (that is possible..I'm old!), those particular resistors are 10Kohm. That will add a considerable rise and fall time delay.

So....How to solve it? Must I change the SD module or...?

I would see if fat16lib or someone else has more to add to this thread. It may or may not be that problem. It might help other users if you posted the make, model, and size of the SD card you have in the module, and anything you have done to it, like reformatting. Most of that can be corrected.

If it is the new rc component of that circuit, you will probably need to get another type of SD module. To insure the best performance, get one with a logic level converter, not the voltage divider.

reformatting:
Put the SD card to computer,open My Computer on the desktop,see the SDcard, right click it.Select the formatting.

This looks like an SD socket that is in many ebay ads.

This card has 10k resistors connected between 3.3V and CS, SCK, MISO, and MOSI. This may not work with many SD cards when the SPI is driven by 5V signals.

Here is an example add with circuit diagram http://www.ebay.com/itm/SD-Card-Reader-Module-for-Arduino-ARM-Read-and-Write-/200659790559?pt=LH_DefaultDomain_0&hash=item2eb8416adf.

fat16lib:
This looks like an SD socket that is in many ebay ads.

This card has 10k resistors connected between 3.3V and CS, SCK, MISO, and MOSI. This may not work with many SD cards when the SPI is driven by 5V signals.

Here is an example add with circuit diagram http://www.ebay.com/itm/SD-Card-Reader-Module-for-Arduino-ARM-Read-and-Write-/200659790559?pt=LH_DefaultDomain_0&hash=item2eb8416adf.

My SD card is driven by 5V power.It is connected with 5V,not 3.3V.But it is still not work.

They are trying to tell you that the resistors are in series with the signals MOSI, SCK, and CS. This is because the arduino signals are 5V and the SD card is 3.3v. Yes, you are powering it with 5V, but there is a regulator on your module that brings it to 3.3V. That does not change the signals, though. So some cheaper modules use resistors in series to do the level translation between the 5V and 3.3v.

They are pointing out that this may cause problems. A more correct way to do it is to use a level translator IC like a CD4050 or 74HC244.

But... on your Arduino board, I see a jumper for selecting between 3.3v and 5V MISO levels. Perhaps you need to jumper that.

Actually, Retroplayer, I thought that too, but it is worse than that. The schematic fat16lib posted a link to above shows those 10K resistors are pullup resistors, not in series with the inputs. The 5v outputs of the Arduino are connected directly to the 3.3v inputs of the SD card.

Ahh... well, I looked at the schematic for the arduino board the OP is using and it appears that it has a level translator built in so the signals should be 3.3V. A pretty nice (but expensive board) actually.

I see. If the digital pins on that Mega board are 3.3v, then he is one of the lucky ones. But looking at that board, I'm not sure if it is even wired correctly for the code I would suggest.

Sorry, my english is poor.....So..
I understand you now.
But what is OP?

I looked at the schematic for the arduino board the OP is using and it appears that it has a level translator built in so the signals should be 3.3V.


Now I have two solutions if I didn't understand wrong.

  1. Select 3.3v MISO levels for the board if possible. Thus,I can get the CS,SCK,MISO,MOSI signals with 3.3V from the board.
  2. Change the SD card with a level translator IC.Thus, I can convert the CS,SCK,MISO,MOSI signals from the board to 3.3V.

Am I right?Thanks a lot!

That is correct.

OP means Original Poster = you.

There are not level shifters on this board. The SPI signals from the processor are connected directly to the SD card.

The 10k resistors are pull-ups connected between 3.3V and each SPI line. There is no pull-up on chip select.

The SD card will have 5V on signal lines instead of the required 3.3V signals.

Here is the correct diagram. It will probably soon vanish from ebay.

There are many wrong circuit diagrams for this card on ebay that show voltage dividers.

I test them with a multimeter, and find that they are all 3.3V.(MISO MOSI SCK CS)
But it is still not work.

Can I use this SPI_PPM?

You can't use SPI_PPM, these pins are not connected to the 2560.

You can't test the signal levels with a multimeter! You need a scope to see what the peak voltage is when the SPI bus is active.

If Vcc is 5V, the SPI controller will try to drive SCK and MOSI to 5V. When the chip select pin is in output mode it will also be driven toward 5V.

The SD card is a 3.3V device and should not be driven with 5V signals. The actual voltage on SD pins will depend on how much current the SD sinks.

The typical "Absolute Maximum Rating" for SD input voltage is Vdd + 0.3V. If the SD card has a Vdd of 3.3V, this is 3.6V.

Note: Some cards will tolerate 5V input but not all cards will.

Thank you,all of you!
Now I should've given up. I will get the data by a Bluetooth module.
Thank you!

Hello
I got the same module, and the same problems.
Can you please post the right circuit of connecting an SD card to arduino board?

Thanks

Mishka87:
Hello
I got the same module, and the same problems.
Can you please post the right circuit of connecting an SD card to arduino board?

Thanks

SDcard -- APM2.5
5V -- 5V
GND -- GND
MISO -- PIN 50/(MISO/PCINT3)PB3
MOSI -- PIN 51/(MOSI/PCINT2)PB2
SCK -- PIN 52/(SCK/PCINT1)PB1
CS -- PIN12/(OC1B/PCINT6)PB6

I doubt that my connection is also wrong.