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”

Developing Your Own Digital Film

In the olden days, you would have a roll of film that you could take to your local drug store and have them develop it. But a serious photographer would likely develop their own photos to maintain complete creative control. While photo editing software has largely replaced the darkroom of old, the images are still held on physical media, and that means there’s room for improvement and customization. In an article for photofocus, [Joseph Nuzzo] shows how you can make your own CFexpress card — the latest and greatest in the world of digital camera storage tech — for less than $100 USD.

The idea here is pretty simple, as CFexpress uses PCIe with a different connector. Essentially all you have to do is get a M.2 2230 NVMe drive and put it into an adapter. In this case [Joseph] is using a turn-key model from Sintech, but we’ve shown in the past how you can roll your own.

Now you might not give it much thought normally, but NVMe devices get pretty hot. This usually isn’t problem inside a large computer case, where they often have large amounts of air blowing over them. But inside a camera you need to dissipate that heat, so thermal compound is a must. With everything screwed together, you have your own card that’s faster and cheaper than commercial offerings.

It’s no secret that there’s a lot of love for NVMe. It’s easy, fast, and adaptable. Since the M.2 slot format includes SATA and PCIe, there’s a likely chance there is a PCIe bus in many cameras. The PCIe bus on the Pi has been convenient for hacking, and we wonder what sort of hacks are out there for cameras.

Pi Compute Module Is Love-child Of Raspberry And Arduino

The Raspberry Pi compute module is a powerful piece of hardware, especially for the price. With it, you get more IO than a normal Pi, plus the ability to design hardware around it that’s specifically tailored to your needs rather than simply to general-purpose consumers. However, this comes at the cost of needing a way to interface with it since the compute module doesn’t have the normal IO pins or ports, but [Timon] has come up with a handy development board for this module called the Piunora which solves a lot of these prototyping issues.

The development board expands the compute module to the familiar Arduino-like form factor, complete with IO headers, USB ports, and HDMI output. It doesn’t stop there, though. It has an M.2 connector, some built-in LEDs, a camera connector, and a few other features. It also opens up some other possibilities that would be difficult or impossible with a standard Pi 4, such as the ability to run the Pi as a USB gadget rather than as a host device which simplifies certain types of development, which is [Timon]’s intended function.

As a development board, this project has a lot of potential for the niche uses of the compute module when compared to the standard Raspberry Pi. For embedded applications it’s much easier to deploy, with the increased development costs as a tradeoff. If you’re still unsure what to do with the compute module 4, we have some reading for you. And Timon’s previous project is a great springboard.