Close
0%
0%

RP2040 M.2 Pico

A RPI Pico RP2040 board in a M.2 AE key form factor.

Similar projects worth following
A RPi Pico RP2040 microcontroller board in m.2 3024 size form factor with A and E key. To the m.2 interface it has USB, UART, I2C and status/control connectivity. Voltage levels for the m.2 specification are obeyed as some of the interfaces run on 1.8 V. Externally, +3.3 V, GND, the SWD interface and 16 IOs are accessible on castellated pins. A footprint for a QWIIC connector is on the top side of the board, not populated to have the board as low profile as possible. Power rail LEDs and a user controlled LED is on board, as well as a solder bridge for configuration options. Bottom side has a micro-SD card slot for data storage.

Full list of features:
- M.2 2230-D5-AE card (22 mm x 30 mm; D5 = 1.5mm on top and bottom side violated by the QWIIC connector and the bottom SD card holder; A and E key)
- Used interfaces on the M.2: USB, UART, I2C, ALERT, WAKE, DISABLE1/2, LED 1/2, VENDOR_DEFINED
- 1.8V regulator for level-shifters
- Power LEDs for 3.3 V and 1.1 V
- RP2040 peripherals: 2 MB Flash, SWD debug acccess, RESET and BOOTSEL button, QWIIC connector, 1 LED, 1 solder bridge for config, 9 GPIOs on castellated pins
- castellated pins on 25.4 mm/0.1" raster (almost with a 22 mm board)
- optional uSD card holder on the bottom side

SCH P42-Pico_Mdot2_r1_REFERENCE_ONLY!.pdf

Do not use as is! Too many bodge wires required to make everything work.

Adobe Portable Document Format - 695.02 kB - 11/15/2024 at 01:01

Preview

  • 1 × RP2040 RaspberryPi Pico MCU
  • 1 × W25Q16 16Mbit QSPI Flash
  • 1 × Molex 104031-0811 MicroSD card holder

  • Micro SD card shenanigans

    MagicWolfi12/01/2024 at 02:42 0 comments

    As mentioned earlier, the SPI interface signals of the uSD card slot are connected backwards.

    SCK <-> CSn

    MOSI <-> MISO

    This means 4 cut traces and 4 wires. In the end nobody will know because the wires will be hidden under the SD card holder. Just a few pictures to document the process:

    Cut trances and wires already attached. I used 38 gauge magnet wire, which is perfect for this kind of re-work as the insulation melts away. No wire stripping required.

    Then the wires got nicely covered with Polyimide for protection

    And the uSD card holder soldered to the board.

    Next, a trip into software land and trying to talk to the uSD card. I am going to try the Arduino SD library and [Greiman]'s SdFat library. I learned already that the maximum size for FAT32 file-system is 32GB, everything larger needs to run with exFAT. I will find out soon.

  • Poor-mans version of the castellated pins

    MagicWolfi11/16/2024 at 03:07 0 comments

    Since a long time I had the idea to simulate castellated pins on a board edge to get around the pricey options to do it as intended by your PCB house of least suspicion. My idea was to have the PCB outline indented by half circles and add a curved pad on top and bottom connected through one or more vias. Wires or pin headers could be soldered to either pad. To solder the board on a prepared carrier footprint ( ESP32 module style) would probably need some extra wires, but that was not the intend of this board anyways. 

    Here is an image how the 2 pad styles look in KiCAD (please ignore the silkscreen, this layout was far from finished). I probably could have moved the half pad closer to the board edge.

     After receiving the boards, I tried to solder pin headers to the pads and ran into several problems. The board was only 0.8mm thick, so there was not much support. With the plastic body on one side, I did solder only the opposite pad to the pin which did not give enough strength. I tried to use hot glue to fix the connector to the board but still managed to rip off pads very easily. Some more pictures of the whole mess.

    Overall it was more pain than useful. I would give this idea a -1 out of 11, would not recommend. 

  • Current state of Integration

    MagicWolfi11/07/2024 at 02:39 0 comments

    As it happens too often, this revision 1 board has its issues. With my RadXA ROCK 3A SBC not arrived yet, I was going for the fly-wire test approach.

    USB and power through an external 3.3 V regulator are working flawlessly. Power LEDs are on and the user LED is blinking away. Nice! UART on the m.2 and on GPIOs are doing simple loopback and the USB/UART is running a simple command line already.

    Things that did not work out of the box: I2C (of course). I should pay more attention to the pin mapping. I cannot use I2C1 at the same time on the m.2 and the QWIIC connector. Also pin4 on the QWIIC is SCL, not SDA. Nothing a few cuts and wires cannot fix. Now I have a loop-back from the m.2 end to the QWIIC connector. One port is master, one is slave. Mint.
    More wires will be required to test the uSD card, the SPI signals are connected up-sidedown to the SPI port on the RP2040. Pin mapping again! I blame this one on the schematic symbol, not showing all pin functions. 

    And the castellated holes will get their own log. Some cheap ideas are also bad.

View all 3 project logs

Enjoy this project?

Share

Discussions

Pranav Nayak wrote 11/13/2024 at 07:48 point

If I may ask, what is the inspiration behind building this configuration of the Pico

  Are you sure? yes | no

MagicWolfi wrote 11/17/2024 at 03:33 point

I wanted to design a Pico board in a new form factor, not just square with castellated edges. Initially I was looking at a M.2 PicoW as a lot of laptops use m.2 E-key Wifi cards, but the certification overhead to be able to sell it legally, kept me from doing it. So I did a regular RP2040 board.

There still might be a PicoW 2 in the future if they decide to upgrade the Wifi module.

  Are you sure? yes | no

Loguicx wrote 11/05/2024 at 23:14 point

I'm the kind of person who's bothered by the thought of an empty and unused E-Key socket on their motherboard 😆and, while I haven't yet found a solid reason for using such a board, this is a great design.
The interfaces present in the a E-Key pinout are, apart from PCIe, the ones featured in most microcontrollers so the RP2040 seems the right choice.
SPI is mentioned in the description of this project but, as far as I know, there is no SPI on an A- or E-Key M.2 socket 🤔 
Would the RP2040 be able to sniff the traffic on the I2C/SMB bus? There doesn't seem to be much information at all about what's exchanged on such bus (it doesn't seem to be standardised among manufacturers) and it could be that there are many separated segments of I2C in the same motherboard.
PS: M.2 sockets for Wi-Fi/BT on desktop motherboard are (often?) E-Key. I wonder if there could have been any use for the I2S/PCM interface present on the pins which are where the A-Key notch is.

  Are you sure? yes | no

MagicWolfi wrote 11/07/2024 at 01:40 point

Thanks. Oh, you are correct, there is no SPI going to the m.2 interface. Looks like I mixed the SD-card interface together with another (undocumented) project that is going to be a m.2 carrier board connecting the SDIO from the E-key spec to a uC. I was hoping to make the SPI port talk SDIO.
The RP2040 should be able to sniff I2C traffic. Making those pins simple inputs and having a clever edge detect logic might do the trick. You could have a look at the BusPirate 5 firmware. Rev5.3+ does include a sniffer, but only up to 100 Kbaud.
Adding more than one key notch is always a compromise.

  Are you sure? yes | no

Loguicx wrote 11/20/2024 at 00:32 point

Thanks.
When I think of the intended use of a board in M.2 form factor I think of something internal to a PC (laptop or desktop) with the option to reach the outside via (a limited number of) cables. In the case of the RP2040 M.2 Pico I would prioritise tasks which rely on the interfaces in the A+E key as the real estate for connectors is extremely limited.
If I understood your intent, the castellation seem to point towards the installation of the board in an environment different from the M.2 slot, as a module mounted on a carrier board. It seems that supporting both environment is very very hard to pull off successfully.
Apologies for coming and debating your extraordinary work, but have you thought of a different arrangement in which there are no castellations, all components <1.5mm are on the side towards the motherboard (bottom side) and on the top you have the tactile pushbuttons, LEDs (?), the SMD uSD receptacle and the footprint od SMD headers, with a relatively small pitch like 2mm or smaller? The pins of the RP2040 would be exposed on those headers (which obviously would violate the 1.5mm constraint).

  Are you sure? yes | no

arturo182 wrote 11/04/2024 at 19:28 point

You might have some notes to exchange with @timonsku :D https://twitter.com/timonsku/status/1376209933381816324

  Are you sure? yes | no

MagicWolfi wrote 11/07/2024 at 01:25 point

Yes, I know about this board. Very similar concept but why a B-key?
I was going to add more information to the project, but HaD was too quick making an article out of my basic write-up.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates