1
\$\begingroup\$

I'd like to read data from a SD card using a microcontroller (through SPI protocol). Looking for a slot for the SD card, I saw two different boards.

  1. https://www.adafruit.com/product/254

This one has apparently a digital buffer and other components

  1. https://www.ebay.it/itm/Micro-SD-TF-Card-Breakout-to-DIP-Board-Module-for-Arduino-1573Z/163459088257?hash=item260eebbf81:g:VUIAAOSwsY1c9DJV

This one on the other hand looks like is only a direct connection to the SD card pins.

Why is a digital buffer needed in case? I didn't really get in general what digital buffers are used for.

Alternatively, would the second board be enough?

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Ah, the digital buffer CD4050 is also a logical level converter: ti.com/lit/ds/symlink/…. Me (and EE guys) have been using it for years to convert TTL 5V signal to input to 3V3 devices such as Rpi and 3V3 Arduino. The good thing with this CD4050 is that you need only one Vcc = 3V3. The input pins of CD4050 is 5V toterant (So no 5V power is needed). \$\endgroup\$ – tlfong01 Mar 4 at 14:35
  • 1
    \$\begingroup\$ Thank you very much @tlfong01 for your contribution! \$\endgroup\$ – Pellagra Mar 18 at 11:17
  • \$\begingroup\$ you are welcome. Have a nice day. Cheers. \$\endgroup\$ – tlfong01 Mar 18 at 12:40
2
\$\begingroup\$

Why is a digital buffer needed in case? I didn't really get in general what digital buffers are used for.

Good question.

A buffer simply provides an amplification. Ask yourself: What happens if the output impedance of the sender's pin is not low enough? Or, what happens if the input impedance of the receiver's pin is not high enough?

In such cases, a buffer eliminates the potential problems with its very high input and very low output impedances.

Additionally (after seeing tlfong01's comment), HC4050 acts as a hi-to-low logic-level translator/converter. This means, as can be seen from the datasheet, that the IC can convert high voltage (up to 15V) logic level to low voltage (up to Vcc, mostly 3V or 5V) levels. This allows the user to use the breakout board with 5V-logic devices (e.g. older 8051s). That's why the breakout board has a 5V input and a 3V linear regulator (The regulator's output goes directly to the 4050).

Alternatively, would the second board be enough?

Could be, unless you keep the traces long. Remember that SPI is suitable for the devices sharing the same board. And also SPI does not like long traces as the speed increases.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks! I guess I won't need any buffer. Do SD cards have to follow specific standards concerning their output imoedance? \$\endgroup\$ – Pellagra Mar 18 at 11:21
2
\$\begingroup\$

The board without buffer can be used to connect to a MCU board that runs at 3.3V supply and IO pin voltages, as it is nothing more than a electromechanical interface board.

The board with the buffer, it is difficult to say what it is good for. It has an onboard 3.3V regulator, and the level shifter, so that the card can (in theory) be powered and connected to a 5V MCU board. Except that the problem is that the data out from card to 5V MCU is still 3.3V, which may or may not be enough for the 5V MCU to read it in properly. The buffer also has a push-pull output, which is not in line with how SD cards should be initialized first with open-drain output mode. So, it might work but it might not always work with all cards or all 5V MCUs.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks @Justme ! I'll be using an STM32 MCU, so I guess I could just use the board with level shifter. \$\endgroup\$ – Pellagra Mar 18 at 11:19
  • \$\begingroup\$ @Pellagra For the specific case of connecting a 3.3V card to a 3.3V MCU, using the level shifter is both unnecessary and dangerous, as if you are not careful, the 5V data out can damage the MCU if the pin is not 5V tolerant. Why would you use the board with the level shifter? \$\endgroup\$ – Justme Mar 18 at 11:46

Your Answer

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.