Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does anyone have any advice (other than 'just do it, try it, learn as you go, pick a datasheet') for getting into higher-speed designs, in order to play with USBC/HDMI/Ethernet/SATA/etc.?

I enjoy Phil's Lab on YouTube which seems a pretty good resource, but I still think it would be naïve of me to jump in and expect to be able to design something that works.

E.g. I couldn't find a USB-C SATA adaptor that used PD to power the disk. Even the USB3 ones will do a 2.5" disk, but all of them, even if USBC, require a separate power cable for hungrier disks. I thought that was silly, and ought to be relatively easy to make.

Is there a good book for taking (digital) electronics beyond basics (i.e./and that isn't through a lens of Arduino or ESP or whatever) as a hobby? Protocols & design/layout for higher speeds is I suppose where I'm most lacking.

My background: EE but professionally only CS. (Even at university ended up choosing more CS-y/information-theoretic-y courses than electronics tbh.) Hobby electronics (off & on I suppose) since as long ago as I can remember, but haven't designed a PCB since high school. Most recently (a year or so ago) breadboarded a USB serial Ethernet bridge for my Prusa Mini.



Nope, that would be my advice. It's not as hard or as demanding as you think, even a naive design, with just a modicum of attention to ground loops and impedance matching, plus the advantages of modern layout tools, 4+ layer stackups, trace clearances, and high-performance integrated transceivers, will probably work fine.

Your first designs may or may not pass a radiated emissions test, and it may or may not work reliably if you want it to fly through the Van Allen belts or in an industrial panel full of VFDs, and you might want to aim for last year's implementation rather than the bleeding edge. While it can be made complicated if you want to truly and thoroughly understand it, just following basic rules of thumb can go a long, long way.


Just following basic rules of thumb (minimizing current loop area, length matching, impedance matching through trace width, series termination, etc.) may yield a working device, but how do you learn from that?

At some point you're already applying all those rules of thumb, but how do you then actually measure what works and what doesn't so that you can improve beyond that?

It seems it is difficult to find resources teaching that, and also the equipment needed becomes very specialized and expensive fast.


The answer, unfortunately, is you can't. Once you start talking about USB3 or HDMI, the testing equipment to test it 'properly' as you would professionally gets to be easily $10k, and can be upwards of $100k depending on the interface.


Those topics were the subject of the 3rd and 4th years of my EE degree (which was not cheap, and which involved some very specialized and expensive lab equipment).

But after 10 years in the field, I've sadly forgotten most of that and learned pragmatism instead.


My experience was that implementing/modifying an existing (basic) fpga ethernet stack is pretty doable, since you quickly get an indication that something works and there are very distinct layers.

The colorlight 5a-75b together with Litex is a great way to get started for cheap.

If you want something even more basic, https://github.com/kingyoPiyo/Pico-10BASE-T is very simple.

Layout for most consumer standards is pretty lax, almost anything will probably work.


You might be interested in some podcasts by Oxide Computer Co - they talk in depth about their challenges designing and building a high speed top of rack ethernet switch.

They go into problems of high speed circuit design in general, and the high end gear and insane debugging skills needed to do so!

See their Twitter, or Spotify (Oxide and Friends) - eg "tales from the bring up lab".


Interesting. Another approach could be to build a USB-C cable that has both a USB-C plug and a male barrel plug in a Y on one end. The USB-C plug is what you expect, but the barrel jack is fed USB-PD 12V/3A.

(Benson Leung is probably having a bad dream right now.)


My bridge between professional programming and hobby electronics was FPGAs.


I did some FPGA stuff at university, I'm more comfortable there for sure, but only on a dev board someone else has made - I'd have the same problem getting started with designing an FPGA board as I described for USB/HDMI/etc. above.


You don’t see that because it just isn’t supported by what people make. No laptops are going to provide PD power outputs at relevant voltages because they would need to have a huge amount of switching circuitry for a situation that is not strongly user demanded. Spotty support means products are never built to expect it to exist, and we continue with all the problems of USBC being borderline unusable for what you would expect to be simple tasks. PD is a bag of hurt at the best of times unfortunately.


> I couldn't find a USB-C SATA adaptor that used PD to power the disk

Would this even be possible? I assume some devices can do PD both ways (for charging and as a source). But if that’s even possible, I’d imagine it to be rare. I’d love to know the case from someone who knows more.


You might be misunderstanding the idea. "used PD to power the disk" means the adapter used PD to obtain electricity, and then used that electricity to power the disk drive via the drive's normal power terminal. The disk drive still wouldn't know anything about USB Power Delivery.


That sounds just like the simplest case of a PD-powered peripheral. Why would you even ask if it's possible?

The problem is that not many USB-C data ports do PD, and even when they do, they may not necessarily provide the voltage required by such disk.


I mainly think of PD ports in reference to charging, not data. I know dock PD ports do both, so I know data+PD is possible, but can my laptop's USB-C port support PD in both directions (charging and powering a peripheral)?. That's my main question -- most of my exposure to PD is with charging only... not powering peripherals. I know I can charge my phone with my laptop, but I've never looked to see how fast it is charging.

And more importantly, what do available chips support? How easy is it to get chips that support PD + data?

This isn't my area of expertise, so I was hoping someone would be able to say -- Yes, it's possible, I do this all the time. Or -- it's theoretically possible, but not widely supported, so no one does it.


> but can my laptop's USB-C port support PD in both directions (charging and powering a peripheral)?.

Two of the USB-C ports of my Dell XPS 13 9380 provide 5A/3A over PD, and the third one provides 5A/1.5A. All of them can negotiate both sink and source PD contracts.

If your laptop can be charged via USB-C port and you can attach peripherals to the same port, it's almost certain that it can negotiate a source PD contract as well. That doesn't automatically mean you'll get more than 5V though, so such PD port may still be useless for powering a disk drive enclosure without additional voltage regulation.


I'm assuming you mean 5V/3A and 5V/1.5A. If so, that is explicitly NOT PD. USB-C supports 3A and 1.5A purely by setting resistor values on the CC pins, and does not require the BMC PD negotiation protocol.

Many PD controllers support this for 'sourcing' (5V/1.5A or 5V/3A) natively, since it's a common use case for laptops.


No, this is 5V/3A and 5V/1.5A as communicated via PD 3.0. In this case you can achieve the same result without PD (well, almost - you still need it for role swap), but that's not what I was talking about.


What scenario would your laptop be providing power (being the source), while simultaneously being the receiver of data (data sink)? Not sure I see the use case for that, regardless of whether you can achieve 5V/3A over PD.


You need PD for power role swap, for example when (un)plugging a power supply to already connected USB-C hub. You also need PD for alt-mode negotiation. You can negotiate a 5V/3A contract to, let's say, power a DisplayPort/HDMI dongle - that won't work by simply signaling 1.5A or 3A with a resistor.


Understood you need PD for alt modes, that's a given. I never thought about the scenario where you have a powered USB hub and you switch from powering it via a brick to powering it via your laptop... interesting, and actually very reasonable scenario. I guess given you have PD already built-in, it's not too hard to integrate that functionality either.


Someone else brought that up, I don't really know, but my phone says it's 'charging rapidly' if I plug it into my laptop, so I just assumed it'd be possible.


Newer phones and laptops can do PD both ways. It's a weird feeling at first to charge a laptop from a mobile phone, but it works!


Wouldn't a powered USB hub do this?


TLDR: with higher speed designs, there is not much info in the hobbyist space, because the designs get more complicated in terms of pcb layout, signal integrity and so on, and a lot of the tools used for more advanced PCB design work are unfortunately closed source. That said it is possible to do successful high speed designs with some rules of thumb that 90% would work on the first board dev. And open source tools like KiCad are getting there in terms of feature parity with the closed source tools. Happy to talk, my contact info is in my profile.


Just FYI, your contact info isn't in your profile (email only visible to you!)




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

Search: