carlk3
Posts: 136
Joined: Wed Feb 17, 2021 8:46 pm

Pico Stackable, Plug & Play, SDIO-capable SD Card Expansion Module

Wed Sep 27, 2023 3:43 am

PXL_20230926_213118242a.png
PXL_20230926_213118242a.png (71.58 KiB) Viewed 4060 times
Board as shipped

Easily add many GBs of, fast, reliable, removable storage to your project! This board has the same dimensions as the Pico, so it can easily be stacked. No wiring needed!
PXL_20230926_212422091a.jpg
PXL_20230926_212422091a.jpg (12.75 KiB) Viewed 4060 times
Serving suggestion

It supports both SDIO and SPI attachment. On SDIO, it is capable of sustained write speeds of over 7 MB/s and read speeds over 12 MB/s at the default system clock frequency of 125 MHz. It is fully supported by the no-OS-FatFS-SD-SDIO-SPI-RPi-Pico C/C++ library, but it should work fine in other environments (e.g., Arduino, MicroPython).

The board is is wired as follows:

Code: Select all

GPIO	SDIO Function	SPI Function	SD Card Pin
-------	---------------	---------------	-----------
GP2	CLK		SCK		CLK/SCK
GP3	CMD		COPI (MOSI)	CMD/DI
GP4	DATA 0		CIPO (MISO)	D0/DO
GP5[1]	DATA 1		none		D1
GP6[1]	DATA 2		none		D2
GP7	DATA 3		SS (CS)		D3/CS
GP9[2]	Card Detect	Card Detect	DET
[1] Not used for SPI attachment; GPIO may be used for other purposes
[2] Optional. There is a 0 Ω resistor that can be removed to disconnect the GPIO from the switch so that the GPIO may be used for other purposes. There is also a header pin pad that could be used to route the Card Detect signal to different GPIO.

Schematics and layout files are available at https://oshwlab.com/carlk3/rpi-pico-sd- ... n-module-1.

The board is equipped with a hinged, locking ("clamshell") µSD socket that holds the card securely, even in the face of vibration.

The Expansion Module can be stacked above or below the Pico. There is an access hole for the Pico's BOOTSEL button.

I suggest you use headers like these: If you don't need pluggability, or need a lower profile, or lower weight, you can use the long-pin Male Pin Header Connectors to stack the boards directly:
PXL_20230926_213718349a.jpg
PXL_20230926_213718349a.jpg (15 KiB) Viewed 4060 times
Serving suggestion

I'm selling these for $14 ea. + shipping, payable with PayPal.

The weight of the board (without µSD card or packaging) is just under 5 g (a little under 1/5 oz.).
Last edited by carlk3 on Thu Sep 28, 2023 9:43 pm, edited 3 times in total.

ame
Posts: 8140
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 5:34 am

I don't want to be that guy, but why didn't you make the opening for the SD card holder closer to the edge?

Furthermore, those resistors are just begging to be popped off the board.

Other than that, this is something I sort of want. In fact, if it had an RTC chip and battery backup like the Arduino Nano data logging shield it would be quite compelling.

https://publiclab.org/wiki/nano-data-logger
Oh no, not again.

carlk3
Posts: 136
Joined: Wed Feb 17, 2021 8:46 pm

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 6:03 am

ame wrote:
Wed Sep 27, 2023 5:34 am
I don't want to be that guy, but why didn't you make the opening for the SD card holder closer to the edge?
In this case, after getting somewhat disappointing performance from another PCB, I decided to go all out with source termination resistors, and the SD card socket's pads are up at that end. I don't think that they are really necessary on the data lines (although they probably help keep down the noise; important for some applications), but SD cards have an incredibly fast slew rate because of the speeds that they are capable of these days.

I've designed several other variants, for example, here is a half-length board with a push-push socket:
3D_PCB1_2023-09-26.png
3D_PCB1_2023-09-26.png (235.16 KiB) Viewed 4010 times
which you can see at https://oshwlab.com/carlk3/rpi-pico-sd- ... n-module-1. Some variations:
  • Different types of sockets: clamshell, push-push, push-pull (I think this is the style that the Raspberry Pi uses)
  • Different sets of GPIO pins
  • GPIO-controlled power switch for the socket
  • Two µSD card sockets
I just don't know what there's a need for.
ame wrote:
Wed Sep 27, 2023 5:34 am
Furthermore, those resistors are just begging to be popped off the board.
I'm not sure what you mean.
ame wrote:
Wed Sep 27, 2023 5:34 am
Other than that, this is something I sort of want. In fact, if it had an RTC chip and battery backup like the Arduino Nano data logging shield it would be quite compelling.
There is this: Pico RTC DS3231, which looks like it would stack nicely with this board (but I haven't tried it).
ame wrote:
Wed Sep 27, 2023 5:34 am
https://publiclab.org/wiki/nano-data-logger
EDIT: That Nano Data Logger looks interesting, but now I'm wondering why an external RTC is even needed. How about just some kind of battery backup for the RP2040's RTC? Does it draw too much power even in sleep mode with clk_rtc as the only clock running (~1.3 mA vs. 70 µA for DS3231?)? Or is it question of accuracy?
Last edited by carlk3 on Wed Sep 27, 2023 7:19 am, edited 1 time in total.

MartinPacker
Posts: 15
Joined: Thu Jan 20, 2022 6:45 pm

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 7:18 am

When you say "No wiring needed!" Does the Pico (W) need to have header pins? I'm not a good solderer.And I assume it does work with both Pico and Pico W (the latter being what I tend to prefer).

ame
Posts: 8140
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 7:33 am

carlk3 wrote:
Wed Sep 27, 2023 6:03 am
ame wrote:
Wed Sep 27, 2023 5:34 am
Furthermore, those resistors are just begging to be popped off the board.
I'm not sure what you mean.
Basically the card has to slide over the top of the resistors. They are bound to get caught by the edge of the card, or a fingernail.
ame wrote:
Wed Sep 27, 2023 5:34 am
Other than that, this is something I sort of want. In fact, if it had an RTC chip and battery backup like the Arduino Nano data logging shield it would be quite compelling.
There is this: Pico RTC DS3231, which looks like it would stack nicely with this board (but I haven't tried it).
ame wrote:
Wed Sep 27, 2023 5:34 am
https://publiclab.org/wiki/nano-data-logger
EDIT: That Nano Data Logger looks interesting, but now I'm wondering why an external RTC is even needed. How about just some kind of battery backup for the RP2040's RTC? Does it draw too much power even in sleep mode with clk_rtc as the only clock running (~1.3 mA vs. 70 µA for DS3231?)? Or is it question of accuracy?
Well, you could keep the Pico RTC alive, but it might be easier to keep the DS3231 alive as a reference and reset the Pico RTC every time you wake up.

The Nano data logger board has been around forever. I'm surprised a Pico version hasn't surfaced by now. But, then again, you can log a lot of stuff to the Pico flash, and use its RTC, so maybe that's what people are doing.
Oh no, not again.

carlk3
Posts: 136
Joined: Wed Feb 17, 2021 8:46 pm

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 8:29 am

MartinPacker wrote:
Wed Sep 27, 2023 7:18 am
When you say "No wiring needed!" Does the Pico (W) need to have header pins? I'm not a good solderer.And I assume it does work with both Pico and Pico W (the latter being what I tend to prefer).
Actually, a fair amount of soldering on 0.1" pin headers is needed. That seems hard to avoid, because the pins on the Pico H and Pico WH are far too short to mate with a female socket on top. You could put the SD card board on the bottom, but then you'd pretty much have to unplug the Pico to remove the SD card (which might be OK for some use cases). I could look into making another version that has the SD card sticking out from one end of the board so it could be accessed more easily in that arrangement.

There are a multiple possibilities if I were to include headers: no headers, female headers on top, female headers on bottom, male headers...

carlk3
Posts: 136
Joined: Wed Feb 17, 2021 8:46 pm

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 8:45 am

ame wrote: Basically the card has to slide over the top of the resistors. They are bound to get caught by the edge of the card, or a fingernail.
In this case, it's a hinged card socket. You can only slide it only a couple of mm to unlock it; then it pivots up. The hinged lid actually holds the card. It's the HIROSE DM3CS-SF.
PXL_20230927_223559200.png
PXL_20230927_223559200.png (78.92 KiB) Viewed 3758 times
ame wrote: Well, you could keep the Pico RTC alive, but it might be easier to keep the DS3231 alive as a reference and reset the Pico RTC every time you wake up.
I'll have to see if there's enough room on the board for a battery, DS3231, and µSD socket. My no-OS-FatFS-SD-SDIO-SPI-RPi-Pico library currently uses the built in RTC for time stamping files, etc. I might leave it up to the user to sync that with an external RTC.
Last edited by carlk3 on Wed Sep 27, 2023 10:40 pm, edited 1 time in total.

carlk3
Posts: 136
Joined: Wed Feb 17, 2021 8:46 pm

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 3:39 pm

MartinPacker wrote: I assume it does work with both Pico and Pico W (the latter being what I tend to prefer).
Yes, it works fine on Pico W. But I suppose that's another application where it would be best to mount the SD card board under the Pico W so that the antennas are not obstructed.

carlk3
Posts: 136
Joined: Wed Feb 17, 2021 8:46 pm

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 4:54 pm

ame wrote: The Nano data logger board has been around forever. I'm surprised a Pico version hasn't surfaced by now. But, then again, you can log a lot of stuff to the Pico flash, and use its RTC, so maybe that's what people are doing.
I think what you're looking for is the Adafruit PiCowbell Adalogger for Pico. The big difference between that and this board, besides the RTC, is that the PiCowbell Adalogger only supports SPI connection to the SD card. This board supports SDIO: 4-bits wide data transfer.
Last edited by carlk3 on Wed Sep 27, 2023 6:08 pm, edited 1 time in total.

hippy
Posts: 15113
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 5:18 pm

carlk3 wrote:
Wed Sep 27, 2023 8:29 am
There are a multiple possibilities ...
It's always a challenge to design what people will want. In this case I would say I have rarely seen any RP2040 board with female headers on top, the Pico H and Pico WH only have header pins underneath.

That would dictate to me that any add-on board should go underneath, which then sets the foundation for that board design. In this case that an edge aligned push-push or push-pull SD Card connector would be needed, probably at the USB end so as not to interfere with the Pico W/WH antenna.

carlk3
Posts: 136
Joined: Wed Feb 17, 2021 8:46 pm

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 6:10 pm

hippy wrote:
Wed Sep 27, 2023 5:18 pm
carlk3 wrote:
Wed Sep 27, 2023 8:29 am
There are a multiple possibilities ...
It's always a challenge to design what people will want. In this case I would say I have rarely seen any RP2040 board with female headers on top, the Pico H and Pico WH only have header pins underneath.

That would dictate to me that any add-on board should go underneath, which then sets the foundation for that board design. In this case that an edge aligned push-push or push-pull SD Card connector would be needed, probably at the USB end so as not to interfere with the Pico W/WH antenna.
(emphasis mine)
Good point, although that makes the ergonomics of getting to the card during development a bit worse, if it's under the USB cable.

hippy
Posts: 15113
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 7:38 pm

An SD Card extension cable might solve that during development.

There's never going to be a right answer. At the non-USB end would be just as annoying if using SWD on a Pico or Pico H.

I suppose the obvious thing to do would be to try it, see if there is any significant issue with having an SD Card socket under a Pico W antenna.

carlk3
Posts: 136
Joined: Wed Feb 17, 2021 8:46 pm

Re: Pico Stackable, Plug & Play SD Card Expansion Module

Wed Sep 27, 2023 8:34 pm

Like this?
3D_PCB1_8_2023-09-27a.png
3D_PCB1_8_2023-09-27a.png (127.11 KiB) Viewed 3789 times
This is under "Long near end push pull" at https://pro.easyeda.com/editor#id=6ce73 ... fdbdd107a6

Return to “For sale”