Hacker News new | past | comments | ask | show | jobs | submit login
M.2 for Hackers – Connectors (hackaday.com)
235 points by rcarmo on Nov 8, 2022 | hide | past | favorite | 52 comments



However, of course, it can cause confusion of the “it fits, but doesn’t work” kind. For instance, a B+M key SATA SSD will not work in some NVMe-only M-key sockets, and some proprietary standards like CNVi throw a wrench into the “any M.2 WiFi card will work with your laptop” concept.

This is what I hate about M.2. If I plug something into a SATA port or USB port I know it's going to work. Why the hell would you bother making a keyed standard where matched-key products don't have to be compatible with one another?


I've been having mechanical problems with M.2. Not only does it specify very thin PCBs for no good reason, but variable length, width, and different fasteners make M.2 a rather annoying form factor for me personally. In addition to problems caused by thermal characteristics or vertical depth used up by heatsinks. It's not always possible to locate a fastener that will work in a given board, or even remove it from the top side without completely disassembling a machine. Not all boards are x86 PCs or servers either, M.2 is now used in embedded devices and some assumptions can't be taken for granted there.

If you look at PCI or PCI Express there is a mechanical component to the case and socket which holds on to the card so that it's not just floating there. However M.2 capable boards seem to have a wide variety of fasteners, and that's the only thing holding it in. There is no standard part for this, and good luck if you need a replacement or it wasn't included in the stock machine.

I've also watched an employee of a computer store install an M.2 card in a bent position because the included fasteners were not even capable of correctly holding the card. Why is it so easy to mis-install in the first place?


Until some bright spark had the idea to make Thunderbolt 3 share a connector with USB-C. And then Apple (inter alia) released laptops that were either USB-C+Thunderbolt 3 -or- purely USB-C (12" MacBook), making life complicated for folks doing IT support in mixed environments.

It Just Works, Unless It Doesn't™


Ah, you too enjoy the dongle lifestyle.

Apple seems to be moving things forward, where others still keep some seriously legacy options, but neither option is pain free.


hasn't this always happened with internal connectors? SATA rev 1 (1.5Gbps, 2003) used the same connector as SATA rev2 (3Gbps, 2004) & SATA rev 3 (6Gbps, 2009) so drives and motherboards plugged together and operated but at the slowest common speed between them.

is USB-C somehow different that people expect Thunderbolt 3 (Dec 2015) using a connector introduced in Aug 2014 on a 12" Macbook announced in March 2015?


No, this was always an issue, even in times when you enjoyed yourself with incompatibilities between different RS-232 implementation, VGA cables, DVI digital/analogue mess, FireWire burning out ports and more.

The world where a plug was enough to identify underlying protocol in 100% of never fail cases never existed.

However, nostalgia deletes enough memory for us to whine about times that never existed ;)


I think the designers of M.2 weren't powerful enough to force use of a specific signalling standard. Some people wanted a connector for sata, others wanted PCIE, some wanted USB... Nobody wanted to design new protocols or have to use new chips. So we ended up with a standard where both sides can support one, two or three of those...


Sure, but that's what the keys are supposed to be for.


I'm a guilty party for reusing a connector because it already existed -- we wanted to make a HyperTransport slot standard (HTX), so we used 2 PCIe standard connectors. We placed them at an unusual depth from the edge so it was unlikely that anyone would accidentally plug an actual PCIe card into them. But I'm sure someone was confused by it at some point.


Not only might it not work... Some combinations that physically fit actually blow up the host...


I call bullshit. What's your source?


Blow up might not be exactly right, but I could imagine smoking a chip or some other method of frying some electronic component. If you send 12v by mistake down a line connected to a component only expecting 3.3v or 5v, then it could easily fry it. I'm guessing most components at this stage of the board have been assumed a good voltage and might not have anything inline between the M.2 connector and the component to spill any extra volts.


If you google "m.2 pinout", you'll find that none of the variants use 12V and 5V on the same pins. It's almost like the people who design these things know what they're doing.


But some use 3.3 volts or gnd on pins that others use as data output pins. That will blow up the output driver MOSFETs.


Doesn't mean someone buying a connector like this to DIY their own thing know what they are doing


That's a truism. You could say that about any connector.


Right, but you called bullshit. I was just providing how/why it might not necessarily be bullshit. When it comes to DIY which this product is aiming, anything is possible.


I've personally toasted 2 x M.2 NVME Boards confusing them with M.2 SATA. The key was close enough that I didn't realize the expensive error.


You mean you forced an M-key drive to go upside down into a B-key slot despite the misalignment of the key?

I think I've only ever found B-key slots in adapter cards that have one M-key slot for an NVMe drive and one B-key slot for a SATA drive, but it would be hard to miss the distinction when they're right next to each other like that.



Thanks, TIL!


This is my issue with USB-C. Love the connector otherwise.


You haven’t lived until you have bought a cable, had it work, then bought another with the same specs from the same vendor with the same packaging, and had it not work.

IT support for a fleet of USB-C monitors is actually awful.


The solution to this is to only buy thunderbolt+pd cables. If not everyone wants to deal with the chunkiness, also maybe deploy some "base" thunderbolt cables where power delivery beyond the base 20W spec isn't required. This is what I do.

Thunderbolt can't and won't function unless the cable meets the specifications, and thunderbolt cables have every conductor populated. This means that USB, DisplayPort, and USB-C Alt modes work over them as well.

Long version:

On any given USB-C cable you have either zero or four high-speed lanes at 5, 10, or 20 Gbps max signalling. Zero pairs is USB 2.0 only and is typically bundled with smartphones (grumble) or USB-C chargers. No USB 2.0 pair probably also exists somewhere but I've not encountered one yet.

The "PD" wattage of a cable is whatever the current rating of the VBUS wire is times 20. All power delivery is is running the VBUS wire at 20V instead of 5V and the sideband protocol to agree on boosting the voltage and finding out what the max voltage and current of the source is.

Thunderbolt requires the fastest of the differential lane configurations and if you get thunderbolt + PD, you know the max VBUS current of the cable.


Yes, but for people thinking of going down this path, the cables are $120 and pretty thick so it’s not without trade offs


Not really. $120 for the Apple branded two meter cable for sure, but the third party ones run about $30/meter.

I bought a handful of the one meter "Cable Matters Thunderbolt 4 40 Gbps" cables off Amazon for $30 each. I run one from a Dell XPS 15 laptop pulling up to 100W to a dock. They are quite chunky though.

Beware anything longer than 2 meters that isn't an active cable though. The differential lanes will probably drop to 10 Gbps. Fine for USB 3, 3.1, and 3.2x2 but you'll lose half the USB4 bandwidth.

---

I'm not sure if Thunderbolt allows for lane speed degradation. You see some "thunderbolt 3 20gbps" cables but I don't know if that's two pairs at 10 Gbps or one pair at 20 Gbps.

Now you've got this whole USB4 mess - USB 4 and Thunderbolt 4 are the exact same protocol and physical layer, same controllers and everything. The difference is whether the device or host adheres to the performance specification and paid for certification.


My information is out of date then thanks for the heads up. Yes the last TB cable I bought was the apple one, but prior to that I purchased Belkin and Startech cables for the same price and couldn't find cheaper ones


Thirty dollars for a three foot cable still sounds like highway robbery to me.


We're not just talking about a random wire through a cable at this point. Transmitting multi-gigahertz signals through a copper conductor is complicated.

These types of signals are extremely vulnerable to the impedance of the cable, capacitive losses, etc. Producing a cable that stays in spec over some large arbitrary length while taking the abuse of being wiggled around all the time is expensive.


Not really, this is just what happens when you use copper for 40gbps. Consider that 1 meter QSFP DACs are also $30.

$/m gets a lot cheaper with longer fiber cables. They're more flexible too


> $/m gets a lot cheaper with longer fiber cables. They're more flexible too

Pretty much. The cost of the optics amortizes at a certain length. You also don't have to worry about breaking something super expensive if you accidentally damage the fiber (for shorter runs).

Consider some of the DAC cables for the new 800 GbE standard cost $1300 for a 2 meter cable.


Don't forget devices that have a C port but only charge through a micro USB port, or my favorite, charge through the C port at 400mA and only charge at a full 2 amps through the charging dock pogo pins.


I hate USB-C connectors. They are too fragile, supported by solder instead of the device housing, has a massive cantilever sticking out, is susceptible to vibrations, and is all-around bad design. I break about 1 USB-C cable a week, on average.

I really wish they made them something like a miniature IEC C13/C14 power plug (the standard power plugs on most desktop computers), where a rubbery plug fits snugly into a rubbery housing. You can drop bricks on connectors, and the worst that can happen is they unplug themselves. Both connector and socket are virtually impossible to break.


LMAO I was with you until "I break about 1 USB-C cable a week, on average". This must be the hardware equivalent of a thread from yesterday:

> the share dialog takes forever to load

> I have a mid-range Pixel 4a running CalyxOS and it works without hiccups. Not sure why yours is so slow.

>I am using an absolutely ancient phone (2016 iphone SE) that's perpetually in low power mode, so it's possible that this isn't a big problem for other iOS users.

>I love HN threads where the complainer is knowingly using an old device on power mode, while complaining about performance… all while the responder is using a custom de-googled niche ROM and claiming somehow it works flawlessly. I always wonder how non-HNers use such software, if even the dedicated people are struggling."


> 2016 iphone SE) that's perpetually in low power mode

What is up with that? Mine's constantly in low power mode too. Such a great phone, except for the battery binge that started last Spring.


I have one as well, got the battery replaced in Spring 2022. It's been great since then, so you probably just need a battery swap.


Ok, maybe I'll do that. I had bought one based on usable life, then checked the battery performance UI, which said it was fine, so I didn't replace it. I've already replaced it once a couple years ago.


The rectangular Lenovo charge connector will always be my favorite. Excellent retention and you don't squash it flat if you happen to step on it.


I got this NVMe wifi card that uses some key that basically only exists for motherboards and laptops with special NVMe wifi card slots. I couldn’t use it or find an adapter.


Ahh, connectors. The single practical area of electronics where there are always five further, unseen levels of enlightenment to obtain. Just when you think you have it figured out, another revelation. Truly an interesting area of study, especially if you have heterogeneous electromechanical design requirements, a budget, and both supply chain and assembly process are in scope.


The article is so well-written I spent a few minutes confused and thinking I’d witnessed a new level of effort brought to marketing specific old-ish connectors to makers. But this person just loves doing this.


I laughed at "old-ish" but then I had to look it up. Intel introduced NGFF / M.2 in 2012 - ten years ago!

I've been tinkering with PCs for >30 years and thanks to subjective time dilation, if I'd had to guess, I would've said M.2 was no more than 5 years old...


I still default to thinking "SATA" when I think drive connector; took me decades to forget what PATA looked like!


SCSI with jumpers to set the SCSI ID and termination on internal drives.

Cable select on primary/secondary drives in PATA that eliminated the need to set them via jumper.

Why does someone else discussing old tech force us each to relive the badol'/goodol' days?


Because there was real discovery. Just like playing old games and finding a secret room all by yourself without a walk through or the internet.

SCSI was fun, much closer to USB in many ways.


hackaday has tons wonderfully written content going back many years, their podcast is also good fun


I haven’t listened to the podcast but have been reading hackaday for years. I like a lot of it but the level of polish in this piece just caught me for some reason.




M.2 and PCIE style connectors are great for board-to-board connections. We use them all of the time in industrial applications. Super cheap and super reliable if you follow the rules. Very common to see all sorts of commodity connectors (M.2, USB, Ethernet etc) get used for non-standard uses.

Don't be afraid to use these edge connectors for hobby work - just make sure to get the board thickness correct and don't stress too much about the gold finger plating. If you aren't inserting too often, then a basic 2U should be fine (you don't need super-expensive 32U etc)

Of course when you're dealing with a user-facing connector, follow the rules and don't cheap out or be lazy.


https://github.com/CRImier/MyKiCad/tree/master/Laptop%20mods... is great.

Now I wish A+E to M key converters were easily available and cheap , ideally on a single board (without FPC) to replace WIFI by an extra M2 2230 NVMe


Fun fact: you can wire a GPU via m.2




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: