Live data from Hacker News

Automating everything in a USB cable tester PCB design

jitx.com

21–30 of 43 posts

Re: Automating everything in a USB cable tester PCB design

#21

Earlier quoted context omitted.

A very simple thus unconvincing demonstration. Real world board designs usually have critical placement, mechanical, EMI, test, assembly, anti-RE, supply-chain or other business-level constraints. Without evolving the fundamental requirements definition to a language that holistically allows the parametric expression of these factors, generated designs are unlikely to meet real world needs in most real world (non-tri…

Yeah, but it's a good starting point for an MVP that reduces a lot of the tedious bullshit (like calculating LED resistor values). You can always re-route paths and replace components when you're going from MVP to product based on your constraints.

I am not convinced that it is actually faster, though.

The tricky part of PCB design is getting the right data: pre-made footprints are wrong more often than not, and automatically retrieving things like a LED's forward voltage or current are just a pipe dream.

Doing the actual calculation takes you all of 10 seconds, and you only have to do it a few times for basically any board. Writing the shown code would probably take me longer.

Re: Automating everything in a USB cable tester PCB design

#22

When I started designing PCBs a few years ago (after some years of electronics prototyping and software engineering) I was somewhat shocked by the manual, repetitive tasks I kept doing. So, I tried to automate as many of these small tasks as possible in the simplest design I could think of - a USB cable tester PCB. Please share your thoughts, ideas, criticism - I'm looking forward to hearing any feedback from the HN…

Your website on my phone cuts the text on the left with Firefox. Even zooming in/out doesn't allow me to see it, only desktop mode.

Re: Automating everything in a USB cable tester PCB design

#23
PCB design is a complex process with many factors to consider, such as routing and placement for mechanical, EMI, and thermal performance. As a hobbyist, I was initially drawn to the library and auto router features of PCB design software. However, as I gained experience, I came to realize that it is often better to do things manually. This allows for more control and ensures that there are no unwanted changes due to automation. Additionally, manual design is often more efficient in the long run, as it can prevent the need for recomputation.

In my experience, the paradigm of programmatically generating PCBs is not always practical. Even as a hobbyist, I eventually switched to manual design after experiencing issues with automated tooling. If you are serious about PCB design, you need to do things manually. There are other teams depending on the information and it needs to be guaranteed to be correct.

Re: Automating everything in a USB cable tester PCB design

#24
post #23

PCB design is a complex process with many factors to consider, such as routing and placement for mechanical, EMI, and thermal performance. As a hobbyist, I was initially drawn to the library and auto router features of PCB design software. However, as I gained experience, I came to realize that it is often better to do things manually. This allows for more control and ensures that there are no unwanted changes due to…

> If you are serious about PCB design, you need to do things manually.

this will not always be the case, you know.

I hate that this blog post is effectively an HTML commercial for the product they are selling, but I have to admit that they are headed in the right direction.

Prior to tools like KiCad, "serious" users did tapeout by hand. Prior to the transistor, "serious" electronic engineers used vacuum tubes.

Re: Automating everything in a USB cable tester PCB design

#25
post #20
post #17

Earlier quoted context omitted.

There is extremely lazy way to do it. Pick a switch footprint and add diode footprint to it, save as new footprint.

The problem is that this often isn't physically possible. Keyboards are rarely fully grid-like, so you have to take into account that there is a row/column shift. Modern keyboards have features like per-key RGB and hotswap sockets, which eat up a lot of valuable space. And then you also have to fit half a dozen traces in between two switches for the key matrix connectivity. An approach like that might work for a triv…

Keyswitches are like 20x20mm...there's an abundance of room for a little ~2x1mm diode within the footprint.

Re: Automating everything in a USB cable tester PCB design

#26
post #5

When I started designing PCBs a few years ago (after some years of electronics prototyping and software engineering) I was somewhat shocked by the manual, repetitive tasks I kept doing. So, I tried to automate as many of these small tasks as possible in the simplest design I could think of - a USB cable tester PCB. Please share your thoughts, ideas, criticism - I'm looking forward to hearing any feedback from the HN…

Nice project. I'm interested in the cable tester itself. Why does each line require a different resistor? Also, in the gif at the top of the page, it looks like some of your cables only light up 5 LEDs. Are some cables out there really that bad?

If an LED fries out, then the current will change across the other ones. If they're all going through a single current limiting resistor, then the current across the other LEDs will change, potentially frying them all out due to overcurrent scenarios. This is the case for many different areas of PCB design.

Further, all LEDs have different responses to current (as LEDs are non-linear components and thus ohm's law doesn't apply) and thus usually require different current limiting resistors to achieve similar brightness or in some cases color.

Also, switching LEDs on an off will affect the cathode net and anything connected to it, so it'd also affect the other LEDs in parallel depending on which are on and off at any given point.

Re: Automating everything in a USB cable tester PCB design

#27

When I started designing PCBs a few years ago (after some years of electronics prototyping and software engineering) I was somewhat shocked by the manual, repetitive tasks I kept doing. So, I tried to automate as many of these small tasks as possible in the simplest design I could think of - a USB cable tester PCB. Please share your thoughts, ideas, criticism - I'm looking forward to hearing any feedback from the HN…

Shame it's using a proprietary SaaS. An electronics version of openSCAD sounded interesting.

Re: Automating everything in a USB cable tester PCB design

#28
post #20
post #17

Earlier quoted context omitted.

There is extremely lazy way to do it. Pick a switch footprint and add diode footprint to it, save as new footprint.

The problem is that this often isn't physically possible. Keyboards are rarely fully grid-like, so you have to take into account that there is a row/column shift. Modern keyboards have features like per-key RGB and hotswap sockets, which eat up a lot of valuable space. And then you also have to fit half a dozen traces in between two switches for the key matrix connectivity. An approach like that might work for a triv…

Right. We're talking about someone making a one off that's simple enough to mostly auto place with a script.

> And then you also have to fit half a dozen traces in between two switches for the key matrix connectivity.

...I guess you never designed a PCB? there is loads of space on keyboard sized design.

Re: Automating everything in a USB cable tester PCB design

#29
post #6

Why the board is photographed only from one side?

I think it is either a single layer board or the back side is empty anyways.

The complexity certainly does not require a board with two or more layers. Here is how it is made up:

Positive pole goes to the pins of the connector on the left-hand side, negative pole to the ground fill (look closely to the right connection at the battery and you will see how it connects to the area with the lighter shade of green on the board - this is a copper area shining through the green solder mask).

On the right hand side, the different pins of the connector are wired to the test points, resistors and diodes which at the other end connect to the ground fill. Now if a cable is plugged in both sockets and if there is a connection on a particular pin of that cable, the circuit for the respective LED is closed and it lights up.

Re: Automating everything in a USB cable tester PCB design

#30

When I started designing PCBs a few years ago (after some years of electronics prototyping and software engineering) I was somewhat shocked by the manual, repetitive tasks I kept doing. So, I tried to automate as many of these small tasks as possible in the simplest design I could think of - a USB cable tester PCB. Please share your thoughts, ideas, criticism - I'm looking forward to hearing any feedback from the HN…

this is something I could use with my box of cables, I like the idea of the battery onboard and just leakage current when off

can the script bundle the LEDs together to make it easier to visually grok the results? e.g. this bundle of LEDs lit up means it's a usb3 compliant cable, this bundle lit up means the cc resistors are proper, etc

the brightness may be a good thing, if you add a faceplate to diffuse the LEDs (and add proper labels/branding). I've been meaning to find a good application for a PCB faceplate... https://hackaday.com/2022/08/17/circuit-less-pcb-featured-as...

Post reply on HN