Live data from Hacker News

Automating everything in a USB cable tester PCB design

jitx.com

11–20 of 43 posts

Re: Automating everything in a USB cable tester PCB design

#12
post #10
post #7

Earlier quoted context omitted.

If LEDs share a resistor then they dim as more LEDs are turned on.

I meant to say why does each LED require a different resistor value?

Because different colors usually mean different semiconductor material and thus different forward voltage of the junction which in practical terms leads to different brightness if the same resistor value is used.

Re: Automating everything in a USB cable tester PCB design

#13
I always wanted parts of PCB/schematic designs to be automated, like ability to say "here is LC filter, pick LC values to match 5kHz with this accuracy using E24 parts, with L being below X uH in value value", or plain "autoroute those less important paths after I did the important one" but I'm not sure how I feel about making it entirely in code.

Re: Automating everything in a USB cable tester PCB design

#14
post #10
post #7

Earlier quoted context omitted.

If LEDs share a resistor then they dim as more LEDs are turned on.

I meant to say why does each LED require a different resistor value?

Different color have different forward voltage and luminosity per mA.

Or if it is connected to some live signal the signal itself might be with different voltage range

Re: Automating everything in a USB cable tester PCB design

#17
post #3

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…

I wanted to do a custom keyboard, at one point I tried to write some PHP code to parse a JSON definition of the layout, and generate a disposable Python script to feed into the KiCAD console to position the switches and diodes to order. (Mostly because I far comfier with PHP tooling) It sort of fell apart because I couldn't quite get the diodes to lay out where I wanted them.

There is extremely lazy way to do it.

Pick a switch footprint and add diode footprint to it, save as new footprint.

Re: Automating everything in a USB cable tester PCB design

#18

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.

Right, if it was a part of an existing design tools, but this appears to be entirely separate thing ?

In most cases the "fiddly things humans" do appear more in more complex design. Keyboards and LEDs matricses like this are kinda edge case, in most if you have that many parts you have to be careful, especially if it is mixed analog/digital design.

Re: Automating everything in a USB cable tester PCB design

#19
post #16
post #6

Why the board is photographed only from one side?

I assume because routing on the other looks ugly xD

If the PCB was connecting two connectors together with testpoints in the middle that might have been the case.

But it is much simpler than that. Right above photo there is a gif showing that all the pins for one connector are connected to battery, while other connector connects to LEDS and afterwards ground.

Re: Automating everything in a USB cable tester PCB design

#20
post #17
post #3

Earlier quoted context omitted.

I wanted to do a custom keyboard, at one point I tried to write some PHP code to parse a JSON definition of the layout, and generate a disposable Python script to feed into the KiCAD console to position the switches and diodes to order. (Mostly because I far comfier with PHP tooling) It sort of fell apart because I couldn't quite get the diodes to lay out where I wanted them.

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 trivial macropad, but it quickly falls apart on a full-size keyboard.

Post reply on HN