15

I need to add a second SD card reader to my Raspberry Pi for the project www.samplerbox.org (the RPi will be embedded in a box, so I need a user-SD-card reader).

Here is what I would like to use (it is a very common electronic part):

enter image description here

How to wire this to the RaspberryPi? Via GPIO? (if so, how?) Via USB port? (if so, how to wire these pins to a standard USB plug?)

UPDATE: Here are the 2 * 8 pins : GND, 3V3, 5V, CS, MOSI, SCK, MISO, GND:

enter image description here

Basj
  • 800
  • 3
  • 21
  • 49

5 Answers5

10

It seems like it is a SPI device. You should first need to enable SPI using raspi-config. Then you'll need to wire:

(Reader) GND  --  GND       (GPIO-Raspberry Pi2) 
         3V3  --  3.3 V (Pin 1)
         5V   --  NC
         CS   --  GPIO8 (Pin24)
         MOSI --  GPIO10 (Pin 19)
         SCK  --  GPIO11 (Pin 23)
         MISO --  GPIO9 (Pin 21)
         GND  -- NC
Jacobm001
  • 11,904
  • 7
  • 47
  • 58
KeremE
  • 116
  • 1
  • 2
6

Raspberry pi pinout

You should connect GND, 5V and 3V3 to the appropriate pins on the pi. Then MOSI and MISO are also marked in the picture, SCK should connect to SCLK (this is the 10MHz clock which should be driven by the pi) and finally connect the CS pin to CS0 (Chip-Select, so you can connect 2 SD or other SPI-compliant devices).

According to the first reply on this thread, if you're running kernel version greater than 3.2.20 it should support the SPI hardware on the board and should give you 1MB/s throughput with little CPU load, which is impressive.

If your kernel is of a higher version but is compiled without SPI device support you should recompile it with an appropriate configuration (see the mentioned thread again).

Egal
  • 169
  • 2
2

An excellent blog post tutorial has been posted here:

http://blogsmayan.blogspot.com/p/interfacing-sd-card.html

Please review that detailed posting for a complete answer to connecting your SD card reader to the Pi.

There is a companion You Tube video available here:

https://www.youtube.com/watch?v=ihqXzQgaIaw

Kolban
  • 1,794
  • 2
  • 16
  • 28
1

Without knowing much about the card reader itself, I will give the best answer I can.

The reader seems to have markings on it next to the GPIO pins. Connect them to the corresponding pins on the RPI using some female-female jumper cables (or a more permanent method for your application). If they do not have a corresponding pin, attach them to a free pin on the pi and take note of it.

The API for the reader may need some extra configuring to allow file transfer through the other pins, but I cannot help you with this part.

Hopefully this should work!

angussidney
  • 703
  • 10
  • 21
0

Based on your description of your need and visiting your project page, an alternative would be to make your RPi boot off a USB stick and use the internal card reader to accept cards from the user.

Bruno Bronosky
  • 1,540
  • 17
  • 20