so, I looked around on the internet for an SD-card slot thing, and I noticed they were all quite expensive( imagining how my cell phone was made this cheap) and I thought that there must be an easier(cheaper) way to do this!

first, I thought alligator clips leading to the resistors into the arduino, but for my purposes, the card needed to be removed and put into my laptop far analysis/adding files, and I whud forget witch alligator clip went were, and they might come loose.next, i thought soldering, but quickly noticed how horrible that idea is. it makes the connections permanent, can damage the card, and make it unusable for other uses without a lot of effort to get it back to normal.

and then, I got it. kind of combining both ideas, I remembered that there are microSD cards too. thought about how I can possibly wire that. remembers that we have like 10 microSD to SD converters, and thought, "what if I solder one of those converters to the circuit! easy to remove the card, cheap, and genius!"

why did I post this? 2 reasons. 1: so you guys can use the idea if you did not already discover it (I might be like the 100th to post it, then sorry) and 2: I need your help for the following:will soldering a micro-SD converter damage it? I do not think so, as all it probably contains is some wires, possibly an SMD resistor or 2.what is the pin-out of SD cards? also, SD sockets might short pins to tell the card it is plugged in or something.how do you wire this to the mega? I know about this, http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1206874649 , but I heard you have to wire SD cards differently for the mega.lastly, is this idea sane or unique? I have a feeling it is not...

sorry for spelling, and noobness, I realise some of these questions are obvious to some and simple-looking.thanks in advance, and for reading!

I saw that. another thing is I need to order from local stores witch make things quite expensive, since in SA there is no competition on robot parts and the sort.

also, I like DIY because you can then answer "I built it myself" to "where did you get that?".lastly, I feel I need some more soldering practice for my long-long term goal: create a functioning mini-computer from scratch,using ATmegas,soldering and a custom PCB, and make it run L-OS, on OS I am working on. currently I made a proof of consept of the prototype (yes, a prototype of a prototype) and need to get all sorts of stuff to make the final prototype, while wasting as little as possible. currently it needs an SD-card and the mega, as I am running out of space on my poor UNO and need somewhere to put user programs, pictures and stuff.

Soldering to a microSD converter can make connections unreliable. Also using resistor voltage dividers can result in undetected errors.

You should use a slow SPI clock since SPI signals are marginal with voltage dividers at high speed, 8 MHz on the Arduino. The Arduino does not support CRC so most data errors will not be detected with marginal signals.

I cannot get that adafruit thing because they only sell the sparkfun SD card sheild here, but there have been complaints of it not working with the mega. Can someone confirm this or tell me what to modify (software is prefered) to make it work? Stupid expensive parts, why cant SD card slots be as common and inexpensive as battery holders...

The sparkfun breakout board does not the level converter chip that the adafruit shield has. You can wire your own chip & resistors in between the sparkfun breakout board and your arduino to get the same reliable results.

The sparkfun breakout board does not the level converter chip that the adafruit shield has. You can wire your own chip & resistors in between the sparkfun breakout board and your arduino to get the same reliable results.

Sorry, I do not fully understand that.Well, i kind of need to know what chip and what resistors i need and where for it to work. I do not realy care about fancy error prevention, ( unless it does not work 20% of the time r more) i just want it to work. Both boards look like the same IC on them. Also, I cannot do SMD soldering.

Using this with the MEGA 2560, without changing the pinout. Using SDFATLib20101010 Line 42 of Sd2Card.h Change to: #define MEGASOFTSPI 1 Line 74 of Sd2Card.h Change to: uint8t const SDCHIPSELECTPIN = 8;

This will enable software SPI and be somewhat slower, but still plenty fast for most applications.

I have no idea on how to do that, though. also, I prefer arduino's SD lib, looking at ease-of-use and the demo programs. but I guess I can use that too.can someone explain how to modify this data>

An alternative to the Micro-SD adapter is to find a dead device with an SD slot and salvage the socket off the board. Heat the back of the board with a torch or flame until the solder melts and then tap the board against a brick or tile to jar the socket loose. You can then solder wires to the socket's pins.

You can enable MEGA_SOFT_SPI for the Arduino SD library. The Arduino SD library is just a wrapper for an old version of SdFat. It has a number of bugs that have been fixed in newer versions of SdFat but they don't seem to bother most people.

Edit the file Arduino/libraries/SD/utility/Sd2Card.h and change line 42 to this:

You can enable MEGA_SOFT_SPI for the Arduino SD library. The Arduino SD library is just a wrapper for an old version of SdFat. It has a number of bugs that have been fixed in newer versions of SdFat but they don't seem to bother most people.

Edit the file Arduino/libraries/SD/utility/Sd2Card.h and change line 42 to this:Code:#define MEGA_SOFT_SPI 1

You don't need to edit the chip select pin. Just set the chip select in the begin call like this:Code: SD.begin(CS_PIN);

thanks! just what I needed!

@johnwasser ,but all the devices that have SD cards still work! if only I knew this half a year ago. yet again, you can never keep all that junk. @PaulS , i wrote that incorrectly. I meant what to change in the arduino library, I do not know why I said it the wrong way. I am very good in software and computers in general, just not soldering and electronics, but eager to learn. in fact, I recently built a functional 10 Bit computer in a computer game, complete with GOTO,GPU,RAM,ALU, it has it all, and is capable of games. and the only logic gate was NOT and OR. (sorry, I just get mad when people insult me of something I am good at, has something to do with my TERRIBLE social skills)

I actually saw the same diagram and had a similar thought. I have a lot of micro SD cards adapters that are standard SD card. I used the resistors, but used different Arduino pins based on one of the SD example sketches. I used the 1.8K/3.3K series resistors to do the breakdown to 3.3V digital high as in the example diagram in the original post.

As for soldering it wasn't terribly hard. I took the SD packaged microsd card adapter and put a small dab of solder on each of the pins Then I took some old lead cut offs (I save them for things like this), and quickly reheated the solder with the lead on top afterwards I just clipped the leads to the same length.

While I don't use pin 8 I did give it a lead in case I ever wanted to use it. The first pin with no lead is pin 9

This was a great learning experience as far as how easy it is to connect an SD card to an arduino. It took all of an hour which it would have taken me even if I had spent $10 on the sparkfun version. If you haven't tried it give it a try.

Also the sketch I used to test it was the "Examples => SD => Files". The pins I use above are the ones used in this sketch and in the other example SD sketches.