level shifting 5v to 3.3v

Hi there!

For last couple of days I was trying to hook up SD card to my arduino duemillanove but without success. Schematics I used was found on the net using voltage dividers to shift 5v from arduino to 3.3v. Instead of 10k and 4k7 resistors I used 1k and 470 resistors as I had them with me. I tested 3 different cards. Old 16mb mmc card was formated as fat12 and I didn't know how to format it as fat16. I tried to format it in dos prompt and choosing allocation unit size so the cluster number would be greater than 4086. After formatting was completed, in the last row at the screen, it said "16 bit per fat sector" or something like that. Is this the right way of doing it? Nevertheless arduino didn't recognize it. Two other cards were micro sd card fit fat32 filesystem on them. One of them was recognized as SD2 type card but as not formatted ( and, of course, it was).
So, my few questions are: 1) How to force format fat16 filesystem to 16mb card? 2) Do the resistors in voltage dividers have to be the same or similar to those used originally in schematics? 3) Is it possible to use opposing voltage source in series to shift 5v to 3.3v? That would be like connecting gnd pins from SD card to external +1.7v or maybe +1.5v as it is easier to achieve using battery for example.

No it is only the ratio of the values that have to be the same. The absolute values determine the current through the chain. The value you use should be better than those you are trying to follow.

On question .3 no because a logic zero would look like a negative voltage and destroy the SD card

First of all thanks for your quick response.
It was not my intention to cross post. It looks like I was accidentally pushed post button without knowing and before even finishing the post. The post I wrote was gone and I thought it was deleted. Sorry once again. Should I delete the old post as it has been answered already?

You can always hit the modify button and change the post.
Yes delete it, I will delete my reply and copy it over here.

How to force format fat16 filesystem to 16mb card?

http://forum.arduino.cc/index.php?topic=186074.0

Why is everyone talking about level shifting? Doesn't the arduino boards have 3.3v? I'm a bit confused :confused:

flocked:
Why is everyone talking about level shifting? Doesn't the arduino boards have 3.3v? I'm a bit confused :confused:

They have a 3.3v output pin yes, but the i/o pins are 5v on most, and it's that 5v that needs to be cut, as far as I read it anyhow.

flocked:
Doesn't the arduino boards have 3.3v? I'm a bit confused :confused:

The 3V3 is a power output for supplying only 50mA to an external device. All outputs are 5V so to connect them to a device that has a 3V3 power supply you have to reduce this 5V signal to a 3V3 one.

On the other side a 3V3 output is not quite enough to register as a logic one, but most of the time it will but it is out of spec. So for the best designs you need to step up a 3V3 output to 5V.

Grumpy_Mike:
On the other side a 3V3 output is not quite enough to register as a logic one, but most of the time it will but it is out of spec. So for the best designs you need to step up a 3V3 output to 5V.

I'm little bit confused. Did you mean, step down 5V output to 3.3v, as 5v output can provide more current than 50mA? SD cards are powered with 3.3v not 5v, right?

fat16lib:

How to force format fat16 filesystem to 16mb card?

[Solved] Arduino Control 16MB SD Card - Storage - Arduino Forum

Hm, so this card should be detectable even if it is formated as fat12. Mine is not detected at all. After detecting and replacing one of the wires which was broken, other 3 micro sd cards were successfully detected and fully functional (2 SiliconPower micro SD cards of 2GB and 4GB and one SanDisk microSD card of 8GB) all of them were fat32.

igorb:

Grumpy_Mike:
On the other side a 3V3 output is not quite enough to register as a logic one, but most of the time it will but it is out of spec. So for the best designs you need to step up a 3V3 output to 5V.

I'm little bit confused. Did you mean, step down 5V output to 3.3v, as 5v output can provide more current than 50mA? SD cards are powered with 3.3v not 5v, right?

I am talking about the input and output signals. The output ones can be cut down with a potential divider and the input ones boosted to 5V with a transistor or FET.
You should power your SD card with 3v3 but it takes more current than the arduino's 3v3 output can provide so you will have to put in a voltage regulator to cut the 5v down to 3v3

Grumpy_Mike:
You should power your SD card with 3v3 but it takes more current than the arduino's 3v3 output can provide so you will have to put in a voltage regulator to cut the 5v down to 3v3

Will another voltage divider work? Or if it has to be regulator can I use adjustable lm1084 which I have at home? I an no expert at electronics as you may have guessed :blush:

Will another voltage divider work?

No you can't power things with a voltage divider, this is because the current variation in the load will cause the voltage on the load to change quite dramatically.

Or if it has to be regulator can I use adjustable lm1084

Well the 5A capacity is a bit of an overkill but yes you can use this.
Don't forget to include the capacitors on input and output.