(Yet Another) RP2040 Expansion Card, With 10x2 Exposed 2.54mm Pins

Hello, just posting about my RP2040 board for feedback/posterity. How did I do? Is there a better way to expose pins for general purpose use? Should I have done anything much differently? Do you want one?

Why

I’m a student, and I like the RP2040 because of the sheer number of peripheral systems and great documentation. I figured this would be a good portfolio piece and it’s something I want to own.

Features

  1. Exposed diode protected 5V VSYS from USB
  2. Exposed 3.3V 600mA LDO regulator (not diode protected)
  3. 12 GPIO exposed, with 10 sequential GPIO exposed for use with PIO
  4. GP26-29: ADCs
  5. GP0-5: UART, SPI0, and I2C
  6. GP20-21: I2C0 and Clock In/Out Mux
  7. Bootselect and run pins exposed, so it can be reprogrammed without being removed
  8. Functional USB device with a stable 12MHz crystal
  9. SWD pins exposed for programming with external devices supporting SWD
  10. Expansion card sized :slight_smile:
  11. Requires no modification to the default CMAKE settings to function, and has many default peripheral pins exposed (although many Arduino developers hate nice numbers like GP0-1 for UART, so I can’t guarantee anything)

Notes

It had to work with as little guesswork as possible first of all, so I used the board template and USB-C device from the Framework github repo. https://github.com/FrameworkComputer/ExpansionCards/tree/main/Electrical/KiCad_templates.

I wanted to reduce the software development requirements, so as many defaults native to the OEM Pico needed to be designed onto the board as possible:

  • GPIO Pins 0-5 are exposed as the standard interfaces of UART0-1 and I2C0-1, (although SPI0 is fully exposed many libraries seem to use GP4-7)
  • A 12MHz crystal is used so the CMAKE definition doesn’t have to be changed for C compilation, and the board works well when software expects the OEM Pico. This also enables full USB functionality
  • An LED is attached to GP25, with an additional at 24 (although I made a purchasing error and assigned the same color to both in a 0603 package, which I have no intention of fixing by hand)
  • The same flash storage size and speed was used.

Fitting a second row of pins onto this requires some jank, but the fact that it is possible and seems halfway decent is fantastic. It requires a normal female header for the first row, but the second row is just the same header with much longer post lengths so that it can be bent around the first row’s connections. I then added the smallest gauge heatshrink for isolation and called it a day.

Known Issues:

  • Not even slightly waterproof
  • I genuinely love my solution to creating two pin rows. It is also very ugly and an obvious point of failure
  • The pin headers stick out of the expansion card
  • Some parts are assembled by hand, and I can’t clean flux off the board with a toothbrush and alcohol as well as a factory with piranha solution.
  • Only 2 ground pins. This honestly isn’t enough for an electronics project, but it suits the purpose of a UART/SWD bridge device perfectly well
  • No button for bootselect, but it is exposed in the pin header
  • Silkscreen Pinout is covered after assembly
  • I didnt put my name on it?
  • No TVS diodes. It just wasn’t a priority and I didn’t think about it until long after I ordered.
  • LEDS are functionally invisible because of form factor. If you have a neat solution to this, please let me know.

I’m sure I forgot something, this somehow worked on the first try but it required triple-quadruple checking. Total BOM cost was less than $15 per unit. Again, let me know what you think, and if you want to help me offset the cost of this by buying an overpriced RP2040 board. Thanks.
Jay


3 Likes

Nice work! Did you hand-solder that, or did you get JLC to assemble it for you?

I’m wondering what first bring up is like, as I’ve never build an RP2040 board from scratch before – so long as you use the 12MHz crystal, do you just ground boot and it will come up as USB mass storage? Or do you need to manually flash a bootloader onto it?

(My first RP2040 board is over here: Thinkpad keyboard mod (super early stages)! - #24 by C_Scott_Ananian but it hasn’t come back from the fab yet.)

1 Like

JLC handled the assembly of the passives and RP2040 very nicely, I don’t have a reflow oven setup to handle the ground pad of the RP2040. I hand soldered what I was comfortable with: drag soldering usb-c connections, the SOT-23 LDO, and the crystal which JLC didn’t have in stock.

Read Section 2.8 of the RP2040 datasheet, the TLDR there is read only memory containing the boot sequence which handles the USB mass storage. I haven’t read enough to know how the boot loader handles a crystal that is not 12MHz. edit: To be clear, the USB Mass Storage just plain works if nothing goes wrong.

Thank you for sharing your project, it’s a pretty neat idea to retrofit keyboards, I bet the result will be absolutely blursed

I found the 12MHz crystal hidden in JLC’s stock: X322512MSB4SI | YXC | Crystals | JLCPCB – their parts search engine is seriously lacking though. The # of hoops I had to jump through to find some of those parts is crazy. I’ve got a hot plate setup that usually works fine for SMT stuff, but the 0.3mm pitch FPC connector made me decide to let JLC handle the assembly this time.

Thanks for confirming that USB mass storage “just works”. That was indeed my understanding based on the datasheet and my experience with the pico etc, but it’s nice to have confirmation from someone who’s actually brought up a board from scratch.

1 Like

You’re wonderfully humble! This is somr amazing work!

Thank you :slight_smile:. I’m not shouting from the roof tops because I’m far from the first, but I’m very pleased with myself don’t worry.

2 Likes

Wrt to the right angle header: it seems like if you chose a PCB of the right thickness you could have the through-hole pins straddle the PCB? The “official” version of this is https://www.digikey.at/short/921mb553 and is made for a 1.8mm thick board, but it seems like an “ordinary” through hole header ought to be convinced to straddle a board if you ask nicely. This is probably at odds with the PCB thickness required for the USB-C interface at the other end, but a two layer PCB stack up on the header end might do the trick.

The other option might be to use a flex or semi-flex PCB and an ordinary right-angle SMT header, allowing the board to flex down and rely on the housing to put the front and back in their proper planes. I’d be tempted to try that just because I want an excuse to play with flex PCBs. :slight_smile:

Or you could do it your way, which also works fine!

First of all that is an absolute gem of a component, good job finding it. I’ve got a 0.8mm board so that indeed wouldn’t work, but I used the same parameters to find a female version as well for future reference. Unfortunately, entirely obsolete and only orderable because of military extended life. In the male pin category, I think SAMTEC has options but nobody cares about the receptacles I suppose.
Its a shame, because while I’m perfectly happy kludging it together, finding a cheap, available, and great looking solution would be enough for me to ship with a less all-purpose footprint.

The other option might be to use a flex or semi-flex PCB and an ordinary right-angle SMT header, allowing the board to flex down and rely on the housing to put the front and back in their proper planes. I’d be tempted to try that just because I want an excuse to play with flex PCBs.

With a few qualifications, I believe this pinout is achievable and possibly even remains recessed using standard SMD headers and no flex. It could, however, require 4 layers, double sided component placement/extreme miniaturization, and moving the screw mounting holes (which isn’t a huge ask but adds to the cognitive load). This is a failing of the RP2040 and a different MCU would make this much easier to pull off.
If semi-flex is cheaper than all of that and you need the perfect MCU board, I’d say that sounds interesting and good luck. I have no experience besides seeing a Marco Reps video about it some time ago.

I think the alternate solution to a right angle header that fits in the expansion card is just extending the PCB far outside the expansion card slot so that it can use vertical headers, the LEDs are exposed, and the silkscreen is visible. At that point even I would start to question if that is worth tinkering, because I could just buy an adafruit feather and a 2 way USB-C male for the same functionality.

For the pin headers, our reference Microcontroller Expansion Card uses these 8FM-78-0010-02-146 Preci-Dip | Connectors, Interconnects | DigiKey

They are the only headers we’ve found that will sit flush within the size constraints.

2 Likes

Very cool project. I had thought about designing a logic analyzer expansion card using the RP2040 but just haven’t had the time.

Nice one, but if it sticks out of the casing anyway, why not use a casing like Framework’s ethernet expansion card and expose 3x10 or even 4x10 pins?

If you manage to do that, I’d order one of those. :wink:

@ATi
I really like the idea of a GPIO pin brick that sticks out of your computer, but you won’t find me bearing the risk/cost of building out the new board. While it could be possible to route even more of the RP2040 on this size of board and keep it at two layers, in my personal opinion the cost of losing ruggedness and form negates the advantage of sticking in it the expansion slot. I’ll just quote myself:

I think the alternate solution to a right angle header that fits in the expansion card is just extending the PCB far outside the expansion card slot so that it can use vertical headers, the LEDs are exposed, and the silkscreen is visible. At that point even I would start to question if that is worth tinkering, because I could just buy an Adafruit Feather and a 2 way USB-C male dongle for the same functionality.

@Vizual_CMDR
I’ve seen that idea floating around the forum, but I don’t know anything else about it. Good luck.