3

I am trying to collect data from the arduino into a SD card for the first time, so I bought the adapter at my local electronics/arduino shop. However, I could not find an explanation as to what each pin does, and the other adapters that I have seen online have different pins, so I am not sure what to do with the pins (except for the obvious ones, GND and VCC) enter image description here

The order of pins is as follows: CD, DO, GND, SCK, VCC, DI, CS.

Could you help me figure out what they mean and where to plug them into my arduino?

  • 4
    for Uno use an 5 V SD card adapter. this is only for 3.3 V – Juraj Sep 18 at 14:05
  • 3
    You should read the documentation. – TomServo Sep 19 at 1:01
  • 2
    See instructables.com/id/… for a useful starting point – rolinger Sep 19 at 12:55
8

This is called the SPI interface (See Serial Peripheral Interface, Wikipedia. The pin names typically used for SPI are:

  • GND : Power Ground
  • VCC : Power input
  • CS : Chipselect
  • SCK/SCLK (SD-Clock): SPI Clock
  • MOSI (SD-DI, DI) : SPI Master out Slave in
  • MISO (SD-DO, DO) : SPI Master in Slave out
  • CD: Card Detect (see comment of rollinger below (thanks).

On an Arduino Uno the SPI pins are:

  • CS – digital 10; this can be in principle any pin
  • SCK – digital 13
  • MOSI – digital 11
  • MISO – digital 12
  • 1
    I'd expect CD to be card detect, switch signalling when a card has been inserted- e.g. see instructables.com/id/… for hookup of a similar / same board – rolinger Sep 19 at 12:54
  • 1
    @rollinger Thanks ... and yes, that sounds more plausible than my search on google, so I updated my question. Thanks/credits to you. – Michel Keijzers Sep 19 at 12:57
4
  • CS = Chip select
  • DI = Data In (MOSI)
  • VCC
  • SCK = Serial Clock
  • GND
  • DO = Data Out (MISO)
  • CD (not sure what it stands for, but this pin isn't used when connecting to an Arduino. I think it's used for faster transfers.)

Note that SD card run at 3.3Volt, not 5V. Also the input pins of the SD can't handle 5Volt signals. So you need to convert the 5V signals coming out of the UNO to 3.3V before connecting to the SD card.

3

CD could be one of two things:

a) a simple mechanical switch on the socket, usually used for Card Detect. Measure from the pin to Gnd and see if contact is open/closed when a card is plugged in.

b) the fifth IO pin to a uSD card. See the chart on the middle of this data sheet

https://www.molex.com/pdm_docs/sd/472192021_sd.pdf

You will see there are 4 data lines for parallel operation (Dat0, Dat1, Dat2, and CD/Dat3), and the Clock and Command (CMD) pin. Arduino uses serial operation over the SPI bus tho, so in this case CD is likely card detect from what appears to be a mechanical lever switch at the bottom of the socket.

This drawing shows how the pins are used http://www.dotmana.com/weblog/wp-content/uploads/izQKT.png

2

Your question's been well answered, but I just wanna point out, when you get the library code that lets you access the SD card, there will probably be instructions on what pins to wire up where. That's nearly always the case. Particularly since this one uses the SPI pins.

There's also loads of instruction websites that would take you through it. The cheap Chinese stuff is nearly always copies of designs from the West, as seen on popular websites. So the instructions usually apply. Arduino is bloody great! Good luck in your adventure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.