Pages: [1]   Go Down
Author Topic: SD Card initialization issues with SD.h  (Read 3434 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a circuit all hooked up with a Pro Mini and accelerometer using a MicroSD breakout board (http://www.sparkfun.com/products/544) to record data using the SD.h library. Everything was working fine up until everything was soldered together, and also worked testing the circuit on an Uno. Now I'm beginning to suspect (probably correctly) that the board isn't recognizing the SD hookup because it's a 3.3v and my Pro Mini is a 5v board.

So two questions..
1) What's the best way to fix this?
2) Why would it have worked fine when it was hooked up before and during testing on my Uno?
Logged

United States (Texas)
Offline Offline
God Member
*****
Karma: 3
Posts: 525
Arduino socks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the best way to fix this is to use a level converter
http://www.sparkfun.com/products/8745 or the like (resistive dividers, buffers, whatever)

and to replace the sd card. sometimes when you overvolt silicon it blows up, sometimes is slowly dies (as you may have experienced), and sometimes you get lucky and nothing bad happens at all.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great, thanks for the help. I've got the parts to try for a resistive divider, so I'm going to try that route first.
Logged

0
Offline Offline
Edison Member
*
Karma: 63
Posts: 1604
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Resistive dividers are very unreliable.  Older cards may work if they have level detectors for the SPI signals.  Slowing the SPI clock may help with these cards.  The SD.h wrapper does not allow clock selection but direct use of SdFat does.

Many new cards use edge detectors that require a rise times shorter than can be achieved by a divider.  Changing the SPI clock may not work with these cards.

The spec requires a 10 ns rise time in SPI mode.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

fat16lib:
So how exactly would I get this working then? I got the resistive divider set up and am still having no luck with the setup. I have a brand new 2GB PNY MicroSD card I'm using, but how would I go about checking on whether or not this would work. The logic level converter isn't going to work in this setup because I only have one power source: the 5v coming in from the Mini Pro. I need to have this working by the 11th, so the quicker the solution, the better.

[Edit 17:04] Do I need to somehow change the SOFTWARE_SPI setting for the SPI mode rise? I'm not sure how to get this changed effectively, so any help is great. Thanks!
« Last Edit: February 04, 2011, 05:06:08 pm by hightouch » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I figured out how to change the SPI settings and that did not fix the problem. I also tried a few different resistor setups on the voltage divider, and that didn't help either. I did verify that everything was working with a 3.3v input by hooking that up to my Uno board... so I ordered a logic level shifter board (not requiring an upper and lower voltage) that should fix things.
Logged

Pages: [1]   Go Up
Jump to: