2

I am using a micro sd card shield with an arduino zero, and I am not sure I am using a proper circuit with it. This is the circuit I am using right now:

sd card circuit schematic That is all it is there, just a capacitor for the power and a pullup resistor for the chipselect. The tags just go to the processor.

I have seen a lot of schematics out there with resistors in series to the processor, some times with pull up resistors, some times with pulldown resistors...

I'm not sure the pullup resistor I am using is a good idea, and I am unsure about the value.

To me something like this makes more sense:

enter image description here

Can someone teach me a proper circuit for this? what is best and why?

Right now I am not very happy with the performance of the micro SD card socket. That's why I want to improve it.

EDIT: Turns out I didnt really understand very well the second schematic, it was just voltage dividers to lower the 5v os arduino uno to 3V. But what about the pullup resistor of the MISO?

New contributor
Espada86 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2

As per the SD card specification:

When an SD card is operating in SPI mode or 1-bit SD mode, the CMD and DATA (DAT0 - DAT3) lines of the SD bus must be pulled up by 10 kOhm resistors. Slaves should also have pull-ups on all above-mentioned lines (regardless of whether these lines are connected to the host) in order to prevent SD cards from entering a wrong state.

Basically you need to ensure that "everything is off" until the Arduino actively drives the SD card. Without them the SD card's inputs will be floating and doing anything they like until the Arduino starts communicating.

Resistors in-line with the signals are there really just to increase the impedance and prevent damage when hot-swapping a card.

If you have a 5V Arduino you will require logic level translation. This is a separate thing to the resistors. While resistors are OK for UART or simple IO logic level translation they are not suitable for use with an SD card. This is because the clock frequencies involved are too high and the resistors will corrupt the signal (through low pass filtering). Instead you require an active logic level translation system, such as a dual voltage, or TTL input, buffer, or active MOSFET level shifters.

4
  • I think those are not a good idea. They are actually voltage dividers from 5V to 3V. – Espada86 2 days ago
  • @Espada86 What are not a good idea? And what is a voltage divider between 5v and 3v? – Majenko 2 days ago
  • Arduino UNO works with 5V, but SD Socket works with 3V. Thats the reason they put 3 voltage dividers. – Espada86 2 days ago
  • @Espada86 Logic level translation is a completely separate issue. The resistors are still required even if you have level translation. And using resistors as logic level translation for SD cards is not practical - the frequencies involved are too high. – Majenko 2 days ago

Your Answer

Espada86 is a new contributor. Be nice, and check out our Code of Conduct.

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.