M.2 Makes An Unusual Microcontroller Form Factor

When we think of an m.2 slot in our laptop or similar, it’s usually in the context of its PCI connectivity for high-speed applications such as solid state disks. It’s a connector that offers much more than that interface though, making it suitable for some unexpected add-ons. As an example [MagicWolfi] has produced an m.2 card which contains the equivalent of a Raspberry Pi Pico.

The board itself has the familiar m.2 edge connector at the bottom, and the RP2040 GPIO lines as postage-stamp indentations round the edges. On the m.2 front is uses the USB interface as well as a UART and the I2C lines, as well as some of the interfaces we’re less familiar with such as ALERT, WAKE, DISABLE1/2, LED 1/2, and VENDOR_DEFINED.

On one level this provides a handy internal microcontroller card with which you can do all the things you’d expect from a Pi Pico, but on another it provides the fascinating possibility of the Pico performing a watchdog or other function for the host device. We would be genuinely interested to hear more about the use of the m.2 slot in this way.

If you’d like to know more about m.2, we’ve taken a look at it in more depth.

PC-9800 Boot Sounds For Modern Computers!

There have been many computers that played a little jingle to greet you upon booting. The NEC PC-9800 is a famous example, though almost all the Macintosh computers played either the soothing “booting” chord or sometimes the Sad Mac “error” chord. And of course, consoles have long played music on startup, with the original PlayStation boot music heralding a whole new era of video games. But modern machines don’t do anything, except maybe a single beep if you’re lucky. So why not pop in this M.2 card (JP) and bring some quirky flair to your PC?

While this particular card is aimed at the Japanese market and specifically evokes the PC-9800, we hope to see some hackers creating projects bringing other custom boot sounds to laptops and PCs around the rest of the world! A simple microcontroller, DAC, speaker and flash storage for the waveform would be all that’s required. It could even be capacitively coupled into the system’s sound output for some extra nerd points. You could pull the ultimate prank and have your friend’s laptop play the opening notes to “Never Gonna Give You Up” upon boot. Or you could have your favourite hacker movie quote play – “I can trace her physical location by looking at the binary!”. Brilliant!

In the meantime, if you want one of these cards, you’ll likely have to use a Japanese mail forwarding service as the cards are only available from Japanese retailer Kadenken — though for only ¥2880, or just under $20 USD, which is a great deal.

[via Techspot]

What Else Is An M.2 WiFi Slot Good For?

Many mainboards and laptops these days come with a range of M.2 slots, with only a subset capable of NVME SSDs, and often a stubby one keyed for ‘WiFi’ cards. Or that’s what those are generally intended to be used for, but as [Peter Brockie] found out when pilfering sites like AliExpress, is that you can get a lot of alternate expansion cards for those slots that have nothing to do with WiFi.

Why this should be no surprise to anyone who knows about the M.2 interface is because each ‘key’ type specifies one or more electrical interfaces that are available on that particular M.2 slot. For slots intended to be used with NVME SSDs, you see M-keying, that makes 4 lanes of PCIe available. The so-called ‘WiFi slots’ on many mainboards are keyed usually for A/E, which means two lanes of PCIe, USB 2.0, I2C and a few other, rather low-level interfaces. What this means is that you can hook up any PCIe or or USB (2.0) peripheral to these slots, as long as the bandwidth is sufficient.

What [Peter] found includes adapter cards that add Ethernet (1 Gb, 2.5 Gb), USB 2.0 ports, SIM card (wireless adapter?), an SFP fiber-based networking adapter, multiple M.2 to 2+ SATA port adapters, tensor accelerator chips (NPUs) and even a full-blown M.2 to x16 PCIe slot adapter. The nice thing about this is that if you do not care about using WiFi with a system, but you do have one of those ports lounging about uselessly, you could put it to work for Ethernet, SFP, SATA or other purposes, or just for hooking up internal USB devices.

Clearly this isn’t a market that has gone unexploited for very long, with a bright outlook for one’s self-designed M.2 cards. Who doesn’t want an FPGA device snuggled in a PCIe x2 slot to tinker with?

Continue reading “What Else Is An M.2 WiFi Slot Good For?”

Four M.2 cards of different sizes on a desk surface

M.2 For Hackers – Cards

Last time, I’ve explained everything you could want to know if you wanted to put an M.2 socket onto your board. Today, let’s build M.2 cards! There’s a myriad of M.2 sockets out there that are just asking for a special card to be inserted into it, and perhaps, it’s going to be your creation that fits.

Why Build Cards?

Laptops and other x86 mainboards often come with M.2 slots. Do you have a free B-key slot? You can put a RP2040 and bunch of sensors on a B-key PCB as an experimental platform carried safely inside your laptop. Would you like to do some more advanced FPGA experiments? Here’s a miniscule FPGA board that fits inside your laptop and lets you play with PCIe on this same laptop – the entire setup having a super low footprint. Are you looking for an extra PCIe link because you’re reusing your laptop as a home server? Again, your WiFi slot will provide you with that. Want to get some PCIe out of a SteamDeck? Building a M-key 2230 card seems to be your only hope! Continue reading “M.2 For Hackers – Cards”

M.2 For Hackers – Connectors

In the first M.2 article, I’ve described real-world types and usecases of M.2 devices, so that you don’t get confused when dealing with various cards and ports available out there. I’ve also designed quite a few M.2 cards and card-accepting adapters myself. And today, I’d like to tell you everything you need to know in order to build M.2 tech on your own.

There’s two sides to building with M.2 – adding M.2 sockets onto your PCBs, and building the PCBs that are M.2 cards. I’ll cover both of these, starting with the former, and knowing how to deal with M.2 sockets might be the only thing you ever need. Apart from what I’ll be describing, there’s some decent guides you can learn bits and pieces from, like the Sparkfun MicroMod design guide, most of which is MicroMod-specific but includes quite a few M.2 tips and tricks too.

First, Let’s Talk About The Y-Key

What could you do with a M.2 socket on your PCB? For a start, many tasty hobbyist-friendly SoMs and CPUs now have a PCIe interface accessible, and if you’re building a development board or a simple breakout, an M.2 socket will let you connect an NVMe SSD for all your high-speed low-power storage needs – many Raspberry Pi Compute Module mainboards have M.2 M-key sockets specifically for that, and there’s NVMe support in the RPi firmware to boot. Plus, you can always plug a full-sized PCIe adapter or an extender into such a socket and connect a PCIe network card or other much-needed device – even perhaps, an external GPU! However, as much as PCIe-equipped SoMs are tasty, they’re far from the only reason to use M.2 sockets.

Continue reading “M.2 For Hackers – Connectors”

M.2 For Hackers – Expand Your Laptop

You’ve seen M.2 cards in modern laptops already. If you’re buying an SSD today, it’s most likely an M.2 one. Many of our laptops contain M.2 WiFi cards, the consumer-oriented WWAN cards now come in M.2, and every now and then we see M.2 cards that defy our expectations. Nowadays, using M.2 is one of the most viable ways for adding new features to your laptop. I have found that the M.2 standard is quite accessible and also very hackable, and I would like to demonstrate that to you.

If you ever searched the Web trying to understand what makes M.2 tick, you might’ve found one of the many confusing articles which just transcribe stuff out of the M.2 specification PDF, and make things look more complicated than they actually are. Let’s instead look at M.2 real-world use. Today, I’ll show you the M.2 devices you will encounter in the wild, and teach you what you need to know to make use of them. In part 2, I will show you how to build your own M.2 cards and card-accepting devices, too!

Well Thought-Out, Mostly

You can genuinely appreciate the M.2 standard once you start looking into it, especially if you have worked with mPCIe devices for some amount of time. mPCIe is what we’ve been using for all these years, and it gradually became a mish-mash of hardly-compatible pinouts. As manufacturers thought up all kinds of devices they could embed, you’d find hacks like mSATA and WWAN coexistence extensions, and the lack of standardization is noticeable in things like mPCIe WWAN modems as soon as you need something like UART or PCM. The M.2 specification, thankfully, accounted for all of these lessons.

Continue reading “M.2 For Hackers – Expand Your Laptop”

On the left, the Thunderbolt chip as mounted on the motherboard originally. On the right, the shim installed in place of a Thunderbolt BGA chip, with the IPEX connector soldered on

Macbook Gets NVMe SSD With Help Of A BGA-Imitating PCB

Recently, we stumbled upon a video by [iBoff], adding an M.2 NVMe port to a 2011-2013 MacBook. Apple laptops never came with proper M.2 ports, especially the A1278 – so what’s up? The trick is – desoldering a PCIe-connected Thunderbolt controller, then soldering a BGA-like interposer PCB in place of where the chip was, and pulling a cable assembly from there to the drive bay, where a custom adapter PCB awaits. That adapter even lets you expose the PCIe link as a full-sized PCIe 4x slot, in case you want to connect an external GPU instead of the NVMe SSD!

The process is well-documented in the video, serving as an instruction manual for anyone attempting to install this specific mod, but also a collection of insights and ideas for anyone interested in imitating it. The interposer board ships with solder balls reballed onto it, so that it can be installed in the same way that a BGA chip would be – but the cable assembly connector isn’t installed onto the interposer, since it has to be soldered onto the mainboard with hot air, which would then melt the connector. The PCB that replaces the optical drive makes no compromises, either, tapping into the SATA connector pins and letting you add an extra 2.5mm SATA SSD.

Adding an NVMe drive is an underappreciated way to speed up your old laptop, and since they’re all PCIe under the hood, you can really get creative with the specific way you add it. You aren’t even limited to substituting obscure parts like Thunderbolt controllers – given a laptop with a discrete GPU and a CPU-integrated one, you could get rid of the discrete GPU and replace it with an adapter for one, or maybe even two NVMe drives, and all you need is a PCB that has the same footprint as your GPU. Sadly, the PCB files for this adapter don’t seem to be open-source, but developing a replacement for your own needs would be best started from scratch, either way.

We’ve seen such an adapter made for a Raspberry Pi 4 before, solderable in place of a QFN USB 3.0 controller chip and exposing the PCIe signals onto the USB 3 connector pins. However, this one takes it up a notch! Typically, without such an adapter, we have to carefully solder a properly shielded cable if we want to get a PCIe link from a board that never intended to expose one. What’s up with PCIe and why is it cool? We’ve talked about that in depth!

Continue reading “Macbook Gets NVMe SSD With Help Of A BGA-Imitating PCB”