Go Down

Topic: SD card read/write with Arduino (Read 115053 times) previous topic - next topic

florinc

#120
Oct 01, 2009, 03:16 pm Last Edit: Oct 01, 2009, 03:16 pm by florinc Reason: 1
Try multiple SD cards. The one you have may be defective. It happened before.

Fritz Brause

Hi, I did try multiple cards. All of them work on my notebook though.

It is really frustrating...

I would be even willing to pay if somebody could compile a zip-file with all libraries and sketches required to run the SD-demo with an off-the-shelf Arduino duemilanove.

Mart

#122
Oct 16, 2009, 05:09 pm Last Edit: Oct 16, 2009, 05:13 pm by Mart Reason: 1
What library has the smallest footprint? ( I need to create new file and to oread/write :) )

bHogan

#123
Oct 16, 2009, 09:25 pm Last Edit: Oct 16, 2009, 09:25 pm by BroHogan Reason: 1
Without regard to the footprint, the ability to read from the card narrows the field. The ability to create new files from scratch narrows the field again.

The Fat16 lib. does both and is well documented. So it's definitely worth looking at.
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

pixeldoc2000

#124
Oct 29, 2009, 03:10 am Last Edit: Oct 29, 2009, 03:26 am by pixeldoc2000 Reason: 1
For all who still have problems with SD-Card, here is some infos...

1. Pull-Ups
add 10K pull-ups to 3.3V for "CS" (CMD) and "DO" (DAT0) line. (refer to sd/mmc datasheets).


This is from  Sandisk SD Card Product Manual.




2. Partition and Filesystem
Ensure your SD-Card contains one primary FAT16 partition.

Windows: Use Active@ Partition Manager, Acronis Disk Director, Paragon Partition Manager or simular to verify your Card is correctly set up.
Don't rely on Windows Partiton info, because windows shows "FAT" filesystem for FAT16 and FAT12 (only with small SD-Cards like 16MB).


Linux: Use cfdisk and mke2fs.




3. Updated Schematic





4. Arduino Library
I also recommend Fat16 lib. Its really nice and well documented.
Work right out of the box for me with Arduino 0017, Arduino Duemilanove and three 16MB SD-Card for my digi-cam.




Anyway, this is a very basic solution for (very) low speed SD-Card access.
Its recommended to use a real bi-directional level shifter (5.0V <-> 3.3V). Read more about it here (German).




:) don't give up...
Why is it that only drug dealers and software developers call their clients "users"?

tep

Hi!

Is this compatible with the SD slot of the Ethernet Shield?

HS

Just wondering if someone could give me some advice, I am looking at using data logging on an Arduino board, a 3D accelerometer for postion sensing and then an SD card to store the data. Having read this post i understand it is possible to do this, but I would be very grateful if someone could maybe outline how i would go about doing this as i am relatively new to the Arduino.

Thanks...

(sorry if this is maybe not the best post to have posted in!)

GH_Blackout



hi guys --- Do i fail the wiring? dont work
~blackout~ @ grayhats.org

PaulS

There appear to be 6 resistors that look like they are trying to form voltage dividers. Three have one end on the ground bus, with a red wire going to the ground pin on the freeduino.

Red is supposed to be used for +V, not ground. Although the electrons don't care what color the insulation is, people make assumptions about the purpose of a wire based on it's color.

There are pairs of resistors, with wires leading from the center point to some Freeduino pins. It's hard to be certain that the resistors and wires are on the same bus, but I'll assume that they are.

The other end of the resistors do not all share a common +5V bus, so it would appear that you are not getting any power to the voltage dividers.

I also don't see an SD card reader/writer in the picture. So, the purpose of the wires and non-functioning voltage dividers is not apparent.

So, I guess I'd have to say that, yes, you fail the wiring.

What are you trying to do?

GH_Blackout

#129
Dec 17, 2009, 05:46 pm Last Edit: Dec 17, 2009, 06:26 pm by blackout314 Reason: 1
@Pauls: thanks

Your advice about colors is right : thanks.
For Resistors dimesions im following a http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1206874649/8

For voltage i have linked SD_pin_4 of 3.3V of freeduino (like as combatduino or experimentduino).

Freeduino works, but the software return me :
"MMC/SD initialization failed"

I think isnt sofware problem but "wiring problem" because i'm eletronic-newbie (only teoric)


update:
~blackout~ @ grayhats.org

PaulS

Quote
For voltage i have linked SD_pin_4 of 3.3V of freeduino


I don't understand this statement. The freeduino appears to be a 5V device, just like the Arduino. You should have a wire from +5V to the buss that one end of three of the 3 resistors are on. The other 3 resistors have one end on a bus which is connected to ground on the freeduino. There should be three bars (like you have) where two resistors and a wire come together. The three wires go to digital pins on the freeduino.

There is also a wire from +5V on the freeduino to the SD card, to power it.

GH_Blackout

#131
Dec 17, 2009, 07:29 pm Last Edit: Dec 17, 2009, 07:34 pm by blackout314 Reason: 1
@pauls:
do u have wiring planning?
i have tried roland lib and arduinonut lib --- not work

i wiring wrong .... is a fact
but i have copyied the roland riegel wiring :-(
~blackout~ @ grayhats.org

PaulS

No, you haven't copied the wiring correctly.

You have resistors plugged into C1, C2, and C5. These are on three separate bars. Nothing else is connected to those three bars. You need to connect them together, and to +5V.

You have a yellow wire in E7, going to the freeduino. Nothing else is connected to the 7 bar. What is that wire (supposed to be) for?

What are the ground wires on the #6 bar for?

Where is the SD card reader?

GH_Blackout

#133
Dec 17, 2009, 08:09 pm Last Edit: Dec 17, 2009, 08:18 pm by blackout314 Reason: 1
rows c1 c2 c5 are wired through by - column

i have measured power con b1 b2 b5 and power is 3V3

rows #3 and #6 are wired through and they are wired in - column

c7 going to digital pin 12 of freeduino

~blackout~ @ grayhats.org

GH_Blackout

thx pauls .. work nice

(the problem is manual SD sock)
~blackout~ @ grayhats.org

Go Up