RP2040 Development Board
Published 2024/06/28
I decided to build my own RP2040 development board for fun (and as something physical for me to show as a simple example). This is how it went.
At a minimum I decided the board needed to:
- Have pins spaced appropriately for attaching to a standard breadboard with 2.54 mm pitch.
- Be programmed and controlled over an integrated USB - preferably USB type C.
- Expose SPI, I2C, and ADC capable pins.
From these requirements, I designed a schematic in KiCAD largely based upon the design notes provided by Raspberry Pi. I selected specific parts primarily with respect to availablility on JLCPCB’s supplier LCSC, as I intended to have the boards assembled through JLCPCB. I preferred having the boards manufactured for me as the RP2040 (and my selected flash IC) have pads that would be difficult - if not impossible - to solder with the soldering equipment that I own.
For the PCB I decided that four layers would be sufficient for my purposes, especially since routing is simple on a development board where pins may be essentially arbitrarily connected to the external connectors. I used the top layer for routing signals, the bottom layer for power, and the two interal layers for 0 V. Using the two internal layers for 0 V should provide a good reference and return path for the digital signals on the top layer, and high inter-plane capacitance for the power planes poured on the bottom layer.
Small improvements could have been made with respect to the position of the termination resistors on the USB data lines and the distance of the crystal with respect to the microcontroller. In both cases reducing the distance of both would have improved signal integrity, but I traded this off against ensuring closely placed decoupling capacitors to reduce loop length and thus parasitic inductance in the supply to the microcontroller.
Once manufactured, I tested the development board by plugging it in to the USB port on my computer and was delighted to see that the power supply LEDs immediately lit up and the RP2040 presented itself as a USB mass storage device for programming. Finally, after programming the board, I was able to make a connected LED blink on and off - the “Hello World!” of the embedded systems world.
The board was a success! However, there are some issues:
- The board is awkward to use on a breadboard with only one column of breadboard pins available on one side.
- I failed to include any on-board user-controllable LEDs.
- The I/O - whilst fulfilling my original requirements - is quite limited in number and an improved layout could have increased the number of available pins.
- I failed to expose the ARM SWD programming interface.
Another revision could easily solve those issues, but I have no need for a number of new RP2040 boards at the moment. However, these issues will be good for me to keep in mind for future designs.