×

SparkFun Electronics will be closed on November 26, 2020 and November 27, 2020 for the Thanksgiving holiday. We will begin normal operations at 9:00 AM Mountain Time on November 30, 2020.

×

Please see all COVID-19 updates here as some shipments may be delayed due to CDC safety and staffing guidelines. If you have an order or shipping question please refer to our Customer Support page. For technical questions please check out our Forums. Thank you for your continued support.

Member #773297

Member Since: February 11, 2016

Country: United States

  • I managed to get the SD reader working fine. The following works with ARDUINO UNO only

    The pins for other micro controllers such as ARDUINO MICRO are different (see ref section below)

    Pin 10 on Arduino should connect to D3 on the SD which is CHIP SELECT, via a potential divider. You need a potential divider because pin 10 gives out 5V and D3 can only accept 3.3V. I used three resistors for the potential divider - 4.7K, 1K and 220 ohms in series , with 4.7K attached to ground and 220 ohm attached to pin 10, tapping off 3.4V at the junction of 4.7K and 1K.

    Pin 11 on Arduino should connect to CMD on the SD which is DATA IN, via a potential divider. You need a potential divider because pin 11 gives out 5V and CMD can only accept 3.3V. I used three resistors for the potential divider - 4.7K, 1K and 220 ohms in series , with 4.7K attached to ground and 220 ohm attached to pin 11, tapping off 3.4V at the junction of 4.7K and 1K

    Pin 12 on the arduino should be connected DIRECTLY to D0 on the SD which is DATAOUT. No need for a potential divider here. D0 gives out 3.3V which is interpreted by arduino as HIGH, so no need for a potential divider.

    Pin 13 on Arduino should connect to CLK on the SD which is CLOCK via a potential divider. You need a potential divider because pin 13 gives out 5V and CLK can only accept 3.3V. I used three resistors for the potential divider - 4.7K, 1K and 220 ohms in series , with 4.7K attached to ground and 220 ohm attached to pin 13 tapping off 3.4V at the junction of 4.7K and 1K

    CD on the SD should be connected to Ground

    GND on the SD should be connected to Ground.

    VCC on the SD should be connected directly to 3.3V power pin on the Arduino

    D1, D2 and WP on the SD do not need to be connected to anything.

    NOTE: when writing to the sd card, you must use a file name with less than 6 characters, otherwise the chip does not record it, e.g. log.txt is good, but temperature.txt is too long.

    TUTORIALS

    Here are some tutorials that I found very useful

    1. http://www.martin-gardner.co.uk/how-to-connect-your-old-sd-card-to-an-arduino/

    2. http://www.ppl-pilot.com/logger/

    **3. **playground.arduino.cc/Learning/SDMMC

    I particularly liked http://www.martin-gardner.co.uk/how-to-connect-your-old-sd-card-to-an-arduino/ which shows exactly how to wire up the potential dividers.

    CONNECTING TO AN ARDUINO MICRO You will need to use the pin layout for the Micro which is different from the Uno. See here - http://www.codingcolor.com/microcontrollers/arduino-micro-wired-up-to-an-adafruit-microsd-card-breakout-board/

    Note that the MICRO has a dedicated clock pin, so CLK on the SD should connect to SLK on the MICRO, instead of pin 13 on the micro. Connection is via a potential divider as with the UNO. The MICRO has a dedicated MOSI pin, so CMD on the SD should connect to MOSI on the MICRO, instead of pin 11 on the MICRO. Connection is via a potential divider as with the UNO. The MICRO has a dedicated MISO pin, so D0 on the SD should connect to MISO on the MICRO, instead of pin 12 on the MICRO. Connection is direct - no potential divider needed.

    Pin 10 on the MICRO still connects to D3 on the SD via a potential divider. CS and GND pins on the SD are connected to GROUND VCC on the SD connects to the 3.3V pin on the MICRO

    Regards

    Craig Paardekooper

No public wish lists :(