Introduction: Cheap DIY Micro SD Card to Arduino Adaptor - and How to Use Stripboard / Veroboard
You can probably build this from parts lying around your workshop, but the access speed to the card is limited to about 4MHz or SPI half speed.
You will need:
- Micro SD card
- Micro to full size SD card adaptor
- Stripboard / veroboard / prototyping board
- 3.3V voltage regulator - I used an LD1117AV33
- 3 x 1k8 resistors
- 3 x 3k3 resistors
- 1 x row of 7 straight header pins
- 1 x row of 6 bent header pins
- short length of wire - single core is easiest to use because it can be bent into shape
- solder + soldering iron
- soldering helping hands make this a lot easier to build
- fine sandpaper
- drill, knife or stripboard track cutting tool
- wire cutters
- or course, an Arduino - I used a Pro Nano
- 2 x jumper wires
1:12 Circuit diagram. The bent header pins will plug into a breadboard and match up to Arduino pins 10-13, VCC and GND. The single core wire can be used to link between tracks on the stripboard.
2:53 Solder the 7 straight header pins to pins 1-7 of the SD card adaptor.
3:25 Test fit the components on the stripboard, following the circuit diagram. Optionally, draw the physical layout onto squared paper to help you reassemble the circuit once you've cut the board, or copy my layout. This will also help you to plan the size of stripboard to cut out, and which sections of copper you'll need to remove. I managed to fit the circuit onto a 10x6 hole piece of stripboard.
5:09 Draw the lines you want to cut on the stripboard - it's easiest to cut down the rows of holes next to the edges of the bit of board you want. So I cut down rows 11 and 7.
5:33 Cut down the lines you drew. It's best to clamp the stripboard in a vice.
5:54 Sand the cut edges of the piece of stripboard.
6:03 Gently sand the copper side of the stripboard until it shines. This will help the solder to bond to the copper.
6:21 Use the drawing of the physical layout of the components to work out which copper tracks to break on the stripboard. If you copied my layout, you can remove the copper from the 4 holes shown in the video.
6:29 Remove the copper track from those holes. I used a drill with a 5mm bit to gently drill away the copper, but you can use a knife or a special stripboard track cutting tool.
7:01 Following the layout diagram, solder the parts to the stripboard.
7:35 Plug the adaptor into a breadboard, connecting it to Arduino pins 10-13. Use jumper wires to connect VCC and GND on the adaptor to VCC and GND on the Arduino.
8:12 Connect the Arduino to a computer via USB. Optionally, use a multimeter to test that pin 4 of the SD card is receiving 3.3V.
8:17 Open the CardInfo sketch from the SD Examples in the Arduino application.
8:40 In the CardInfo sketch, set the chipselect / CS pin to 10. Upload the sketch to the Arduino.
10:01 With a micro SD card plugged into the adaptor, open the Arduino Serial Monitor. You should see a bunch of info about the card appear in the monitor. If you see scrambled text in the monitor, check that the baud rate in the monitor window is set to the same as that in the CardInfo sketch - 9600 by default.
That should be all, but..
10:59 If you have trouble reading from, or writing files to, the card, the format may not be quite right for Arduino. This can be solved by re-formatting the card. Warning: this will erase the contents of the card. I found a good SD card library for Arduino at https://code.google.com/archive/p/beta-lib/downlo... .
11:27 Bearing in mind that this will erase the card's contents - once you install the library from the link above, you should see SdFat in the Examples menu within Arduino. The SdFormatter sketch can format your Micro SD card to the correct format to use with Arduino.
13:07 How to use the ReadWriteSdFat sketch from the SdFat library to test reading and writing files from the card.
We have a be nice policy.
Please be positive and constructive.