Pages: [1]   Go Down
Author Topic: Is there a SD Tutorial?  (Read 1923 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 2
Posts: 226
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
is there something like a complete tutorial for an SD Module like this:
http://www.ebay.de/itm/180868021964?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

If i need external power supply and all the other things?


I saw a tutorial where the author would use a digi IO pin to power up the SD module. But then i read somewhere writing to sd might use 100mA, isnt that way above the max specs?
I dont want to use a faulty tutorial ending up burning my ardu :-(

is using external 9V power via jack and ardu attached to usb at the same time ok?
« Last Edit: June 29, 2012, 08:57:18 am by lax123 » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8974
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://arduino.cc/en/Reference/SD/
http://arduino.cc/en/Reference/SDCardNotes

You don't need external power.  Looks like it has a built-in 3.3V regulator so you can power it from the +5V pin which can supply about 400 mA.

It's not clear if they support both 3.3V and 5V logic.  Doesn't look like enough resistors to do that and they don't provide a schematic.  The Arduino inputs will work with 3.3V logic and the SD-card inputs will probably work if you put a voltage divider on each.  Two 1k resistors in series between the Arduino output pin and Ground.  The signal between the two resistors (2.5V) should be safe for the SD-card inputs.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Full Member
***
Karma: 2
Posts: 226
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thx for the reply,

i found a schematic. Do i still need those extra resistors for a voltage divider, can u see that?

If i wouldnt use a divider if needed, what would happen? Destroying the SD card?

You say "supply about 400mA", would that not overload usb? i think i read somewhere it would shut down at 300mA by fuse in the ardu.
« Last Edit: June 30, 2012, 09:42:01 am by lax123 » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8974
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The USB fuse in the Arduino is 500mA.  The Arduino itself uses less than 100 mA leaving 400 mA for various peripherals.

I don't know if SD card inputs are supposed to be 5V-tolearant or not.  If not, using a 5V signal on them might well destroy them.  Most shields with SD sockets provide some sort of level shifter.

You could power your Arduino on 3.3V but then you would have the problem of 16 MHz be out-of-spec for 3.3V power. smiley-sad

Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Full Member
***
Karma: 2
Posts: 226
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thx,
so you would strongly advise me to use the divider?
i only have 1k resistors, would that be sufficient? i also have somewhere 100k i think, that would be better, right?

Im just wondering why there r like 30 sellers on ebay for exactly this sd module without anyone mentioning that u d need some external things like resistors to make it properly work. so i guess like 90% would just connect it to ardu like every other sd module with lvl shifters...
Logged

0
Offline Offline
Edison Member
*
Karma: 67
Posts: 1673
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The specification for SD cards is

Supply voltage, Vdd, in the range 2.7 - 3.6 volts.

Voltage on all signal lines from -0.3 V to Vdd + 0.3 V.

Logic levels on input lines:

Input high voltage 0.625*Vdd to Vdd + 0.3.

Input low voltage -0.3 to 0.25*Vdd.

You need level converters to convert the Arduino outputs Chip Select, SCK, and MOSI to this range.

Resistor voltage dividers do not perform well on many cards since they have long rise/fall times.  IC level converters are preferred since they work better with cards that use edge detectors.

No level converter is needed for the Arduino input MISO.
Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 226
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thx,

does that mean i can try with dividers, and if it doesnt work i can put the whole module into the garbage?
Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 226
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Without anything additional its working with 5V, but i dont want to risk damaging the sd card.

I tried voltage dividers for the lines CS, MOSI and SCK -1,8K and 3,3K. For the first 2 lines its ok, but as soon as SCK gets its divider it stops working.

What could i try to make it work?
Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 226
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

using 1k and 2,2k for SCK 3,44V divider and its working like a charm :-)

btw how freaking awesome r fat16libs expample progs :-)


using 5V or 3,3V dividers except for SCK line: Quickstart: everyting is great
Eventlog ( guess cause its trying to write to SD ): error, error and garbage files
« Last Edit: July 04, 2012, 05:30:10 am by lax123 » Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 226
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i altered a schematic.

It shows how this sd module started to work perfectly for me.

I hope this can help someone else in future, that is facing the same issue.
Please notify me if i made a mistake.


* SD.jpg (32.14 KB, 508x541 - viewed 31 times.)
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
CJH Innovations
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I would not recommend the use of resistor dividers for the SD card. You can read about this kind of design and the instances of burned up SD memory on the LadyAda site.

The right way to do this is toe use four MOS-FETs as a level shifter for SS, MISO, MOSI and SCK lines.
There are also ICs that will suffice.

http://www.adafruit.com/datasheets/an97055.pdf

« Last Edit: July 24, 2012, 05:21:22 pm by Checkers1811 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
Looking to make my sdcard to work with ADPmicroSD from www.propox.com with any library i found.
What is strange he use 4 line level shifter and looking at http://www.ladyada.net/make/logshield/ they dont use lvl shifter for all 4 line just 3 and let MISO w/o lvl shifter as long the line is IN for my Ardruino Mini Pro 5v 16mhz and as long the sdcard is powered by 3.3v the in will not go over the capability of Amtel328p.
I dont know if this make my board to dont recognize any micro sdcard i have around me (2x2G, 1x8, 1x16) all give me same answer.
I will wait to get my cheap SDcard breackboard with resistor divder (for 2usd it worth to try) and 3.3 regulator.
Logged

Pages: [1]   Go Up
Jump to: