Instructables

Arduino DIY SD Card Logging Shield

Featured

Step 3: Using a level shifter

Picture of Using a level shifter
Constructing the project looks pretty simple at first glance.
Just connect power and ground, and the four signal pins.
It's only a matter of figuring out which four (digital) Arduino pins
to connect to, right? Well, yes, but there's a complication.

SD cards, like many recent electronic devices, operate on a 3.3 volt logic
level. But, most Arduinos output 5 volts on their digital logic outputs for ON.
A direct connection of 5v to an SD card could fry it. So, what do we do?

The best solution is something called a level shifter. Essentially, this means
putting 5v on the input of a non-inverting buffer and getting 3.3v from the output.
Shifting the voltage level, get it?
But just how is this magic accomplished?
One way is to use a CMOS hex buffer IC,
here a 4050, and power it (pin 1, Vdd) at 3.3v.
Put 5v on the input of one of the gates,
and you get 3.3v on the output of that particular
buffer. For example, with 3.3 v on pin 1 (Vdd) and
pin 8 connected to ground, a 5v logic level on
input pin 14 (gate 6) results in 3.3v on output pin 15.

 
Remove these adsRemove these ads by Signing Up
mrmonteith1 year ago
I was wondering about that. I found item #221242530114 on ebay and several others that stated specifically they support 3.3 or 5v levels on inputs as well as supply voltage. Guess it depends on the device. I wish they would supply data sheets.
thegrendel (author)  mrmonteith1 year ago
Data sheets? Data sheets?
We don' need no steenkin' data sheets.

If they supplied data sheets and docs, then they wouldn't be selling
these breakout boards for a coupla bucks, shipping included. If you want docs and tech support, then buy the same products for about $10 more from Adafruit or Sparkfun.
naeger1 year ago
OK, one more question :) ... I read the description on several of the SD card modules like for example: http://www.ebay.com/itm/SD-Card-Module-Slot-Socket-Reader-For-Arduino-ARM-MCU-Read-And-Write-/170817952203?pt=LH_DefaultDomain_0&hash=item27c58b19cb ... it clearly states: "Support 5V/3.3V input" no mentioning of the necessity to shift down the logic input level from 5V to 3.3V! If you look closely at the picture there is a resistor connected between each data pin and the SD card holder. Wouldn't this already do the trick (provided that the resistor has a value so that 1.7V fall off to the resistor and the remaining 3.3V fall off to the SD card)? Wouldn't this also fix the problem with noise and allow SDHC cards? ... Have you ever tried to directly wire up the module without the level shifter (and measure with a volt meter how many volts reach the sd card slot)? Thanks again for answering my questions :)