SD Card adapter (steampunk)

From RepRap
Revision as of 09:14, 13 June 2015 by Traumflug (talk | contribs) (Assembly)
Jump to: navigation, search
Crystal Clear action run.png
SD Card adapter (steampunk)

Release status: working

SD Card adapter steampunk overview.jpeg
Description
An adapter for connecting standard size SD Cards to 5 V controllers without using a PCB, integrated circuirty or similar overly modern stuff.
License
none (no sources neccessary)
Author
Contributors
Based-on
Categories
CAD Models
External Link

This page shows how I made an SD Card adapter with nothing but wire, a few resistors, two standard diodes and two connectors. The connector fits into the 6-pin ICSP header found on most ATmega based controllers on one side and accepts a standard size SD Card (or Micro-SD with adapter) on the other side.

The intention of this small project was to find an answer this this question: Do these resistor based adapters actually work? Generation 3 Electronics had such a circuitry on board already, but was never used. SDRAMPS uses a level converter chip, making it more complex.

The result is: Yes, they do. Reliable, and as far as current testing goes, at least up to a communications speeds of 5 Mhz (approx. 500 kBytes/second), which is more than enough for printer controller purposes.

Bill of Material (BOM)

  • Solderable wire.
  • 1 resistor 150 kOhms.
  • 1 resistor 10 kOhms.
  • 3 resistors 2.2 kOhms.
  • 3 resistors 1 kOhms.
  • 2 connectors, like described below.

Price estimate of all this: depending on your sources, between 20 Cents and 1 Euro.

ICSP header connector

That's a standard 2.54 mm (0.1") female header. In my case I had 8x1 ones lying around, so I cut this in two parts and glued it back together, side by side. In case you glue something, make sure the header is plugged in while the glue is hardening, else it might not fit that well at the end.

SD Card connector

That's one salvaged fom an old PC. Its original intention was to connect the Floppy drive. No modification needed, just put markings on it to see where the card should be seated.

Assembly

SD Card adapter steampunk overview.jpeg
For reference: pinout of the ICSP header.

Circuitry mostly matches the schematics on Ullrich Radigs nice page. With a few exceptions:

  • 1.8 kOhms resistors were replaced with 1 kOhms ones. Because I had these in stock.
  • 3.3 kOhms resistors were replaced with 2.2 kOhms ones. Because I had these in stock and to match the other resistor change. Resistor ratio should be between 2 : 3 and 2 : 5.
  • An additional 150 kOhms resistor between Vcc and GND to keep a small minimum current. Without current, these diodes have no voltage drop and you get full 5 volts on the card's Vcc.
  • An additional 10 kOhms resistor between Vcc (of the card) and DO. This is a pullup and neccessary for some cards to receive a signal on DO at all. For more forgiving cards it ensures proper initialisation on the spot (not after some tries).

The one separate wire in the picture above is the Chip Select line. The ICSP header's Chip Select is connected to Reset, which is not what you want. You can choose any other free ATmega pin.

Other than that, use some inspiration and start soldering. Connection by connection, piece by piece. Test each connection to make sure you don't get 5 volts on one of the card's pins. Here are two more detailed pictures:

This is the ICSP header side. Diodes and most resistors are wired up here.
This is the Floppy connector/SD Card holder side. A handwritten sticker was put onto it for less confusion during soldering.

Software

Any firmware supporting SD Cards should do. The only pin you have to configure is the Chip Select pin. In Teacup Firmware, that's SD_CARD_SELECT_PIN or the corresponding choice in Configtool. Defining this pin will also enable all the code neccessary for handling SD Cards.


Enjoy!

Markus " Traumflug" Hitter, June 2015