
CIRCUIT
Circuit - SD Card Slot & Circuit
Micro SD Card Slot (J2)
SD Cards can be used to store informa-
tion from sensors or interactions over long
periods of time. You could use it to log the
temperature of a room over the course of a
day, or even a year. The data could then be
imported into a spreadsheet and graphs can
be made! Marvelous. This is just one exam-
ple, but there are many more.
To interface an SD card with a microcontrol-
ler running Arduino code, we need to use SPI
mode. SD cards can interface using a more
complex protocol called SDIO. This is what
mobile phones and cameras use, but it is far
too complex for a microcontroller to manage.
The labels shown on the datasheet and
those on the SD slot’s diagram above are
SDIO pins. They are there for your reference
as datasheets often only mention these. SPI
uses 4 connections; a Chip Select, 2 data
lines, and a Clock Pulse. We have labeled
these from the SD slot’s point of view (the
“slave” in the master slave analogy. See the
Motherboard Manual p29 for more info).
3.3V Voltage Regulator (U1)
SD cards run off 3.3V and so does their log-
ic. Our system runs on 5V, so we use a 3.3V
Voltage Regulator to provide the 3.3V to the
card and to the logic level converter circuitry.
We have used a 7533 for this as it provides
SD Card Motherboard / Uno
CS (Chip Select) Any Pin
Data In (MOSI) D11
Data Out (MOSI) D12
CLK (SCK) D13
+3.3V
Q3-5
2N7000
R4-9
C2
10uF
U1
HT7533
+
+
J2
SD Card Slot
C10
100nF
C3
10uF
Test Point
CS_5V
DATA_IN_5V
DATA_OUT_3v3
CLK_5V
+5V
GND
GND
GND
GND
DAT0
VSS
CLK
VDD
CMD
DAT3/CD
DAT1
CD
DAT2
Dout
GND
CLK
VCC
Din
SDIOSPI
CS
the 3.3V we need at a max current rating that
exceeds our requirements.
Logic Level Shifting (Q3-5, R4-9)
Logic level shifting is needed when two com-
municating devices read a High (digital 1) at
different voltages.
The SD card regards 3.3V as high, and the
Microcontroller sees anything from 3-5V
as high.
This is ne when the SD card sends a 1 to
the microcontroller, as 3.3V is still considered
High and won’t destroy anything. This is why
DATA_OUT is not converted in our circuit.
The problem arises when the microcontroller
sends a 1 (5V) to the SD card. As the card is
only rated for 3.3V, this can cause damage.
There are a few ways to achieve logic level
shifting. One method is to use two resistors
to create a voltage divider (see Resistors in
the component index). However, this method
can be somewhat unstable and only works
in one direction.
Another method uses N-Channel MOSFETs
with some pull-up resistors. This method is
stable, fast and works in both directions. SD
cards in SPI mode are limited in speed so the
2N7000 works ne. For faster switching use
a dedicated logic level MOSFET.
Arduino, and therefore the Motherboard will
only read SD or SDHC Micro SD cards up
to 32GB. These must be formatted to FAT32.
This can be done by right clicking the SD
card in an explorer window on a Windows
PC, choosing format, selecting FAT32, then
formatting.