AIFeed

Winning Comma AI's PCB Golf Contest, Defending the Crown

Original text(via HN AI)

"I'll complete The Negotiator II, then go enjoy my vacation" I said, but alas, Comma AI released a competition that was just so enticing, I could not stop thinking about it and coming up with ideas. The premise is simple:

  • Make it small, smallest wins
  • Copper layers add massive penalties, don't submit an 8-layer board!
  • Vias are pretty expensive too

I was preparing to attend PCB West 2026 and was finishing up my business card, so I did not really have time to work on it. It was a curse, it was a blessing. Once I was back and recovered enough from the jetlag, only 3 days remained to competition close and the top score was... wait, 16,960? Oh... oh no!

If I wanted to win, I had to go with a tiny single layer design, no way around it. Better scores will come, so let's shoot for the moon. Enter (what I'm now retconning to) project 9999, which ended up winning at a score of 10,345. szykula won second place with an extremely impressive TINY two layer design (I'd love to see how it was done!), and quickly overtook my score with an entry scoring 8,886. I was already working on making my entry better and smaller, seeing that score kickstarted project 7999. Here's how I did it all.

Winning PCB Golf: The good, bad, and the ugly of project 9999

Having just under 3 days for the entire design, I had to work backwards - and fast. I know the score I want, and as each copper layer is 5,000 points, that leaves me with just 4,999 mm3 to work with. So, how thin can I get it all?

Chapter 1: The DIY barrel jack

I knew my enemy, it was the barrel jack. It was confirmed that we could change the USB C connectors (to right angle, maybe mid-mount), they just need appropriate clearance and accessibility. I know of barrel jacks made for thin devices like laptops, so I went hunting.

Different types of smaller-than-usual barrel jacks, from cutaway ones that are thickness optimized, to open frame ones. Credit: KKG and same sky.

During my search I discovered the fully open type. That got me thinking: what really is a barrel jack? If the plug doesn't factor into the score in depth, then it shouldn't factor in assembly thickness either when removed, and all that space above the pin is wasted.

There are four major "categories" of barrel jack/plug systems, the more common one is seen above, and more is seen in the photos below.

  • Jacks with a solid post (pin), and a spring. The spring wipes and contacts the plug's outer sleeve while also forcing the plug's inner sleeve into a post
  • Jacks with a split center pin and a solid outer sleeve, where the outer contact is an interference fit
  • Jacks with a solid post and a solid sleeve, relying fully on interference fit contact
  • Plugs that use inner fork contacts instead of an inner sleeve

Dual interference cable mount barrel jack, fork contact plug. Credit: SparkFun Electronics and adafruit.

A simple 2.0 mm pin can be used as a post, but finding the spring was harder as it needs to cope with sideways wiping forces. I was able to get the total thickness of the barrel jack to 3 mm, same as a USB C port. Parts used are Keystone 1455-2 and OGSC-756030, meant to be compressed to about 2 mm when plugged to minimize contact resistance. In retrospect, 1.6 mm of compression would have been a better compromise.

Chapter 2: How do I fit this all in?

At this point, I finally got the thickness down enough. Next, the width was set by the four main USB C connectors as they need a minimum gap between them (mentioned as a requirement), and thus followed the length. I had just 51.4 x 24.2 mm (1,244 mm2) to work with, while the original components alone took up about 2,260 mm2... That is with zero area allotted to gaps or traces and with the USB C connectors vertically mounted. Some things had to change, some things had to go.

Here, one rule was extremely helpful: We don't need to stick to any of the original components, and firmware modifications are allowed, so let's work smart. What mattered is that the same external connections can be made, and the same function can be achieved. The following figures summarize some of the biggest wins.

Other than circuit simplifications, every package was made as small as possible. For instance, the upstream USB C port is an ultra-short (somewhat cursed) part. This board would not have worked without it.

By reducing components and traces as much as possible, it became possible to pack everything in this board, but multiple layers of components are still needed, and thankfully it was ruled that multiple single layer boards were considered just one layer. But how do we move the signals around?

Chapter 3: Routing my very first single layer board

Multiple simple tricks were used here. Untangling some of the signals was a hard task, for that, I used resistors as jumpers, and used a board-to-flex connector that had staggered pins. This meant that I could move some signals around so they reach the flex board better organized. Using a vertical non-ZIF (zero insertion force) connector saved the most volume and allowed the signals to take two branches onto the flex board. This was not enough to get the board over the finish line, and that is where it got ugly. Here are some of the somewhat unusual ways that I simplified the routing.

Chapter 4: The bad and the ugly

Let's start with the bad. These boards are an EMI disaster. They say "USB 2.0 FS can run on a coat hanger", the unsaid part of the saying is that the FCC might come knocking, even on the opposite side of the globe. These boards have signals running extremely far away from their returns with tons of other signals in between. Signals are bundled up at extremely tight trace widths and spaces (JLC's minimums of 0.1/0.1 mm - 4/4 mil) which does not produce the right impedance for signals like USB and CAN. Signal integrity on my first submission is highly questionable (Comma AI said they would give the benefit of the doubt on any similar issue), but EMI will be bad.

I said earlier how starting so late was a blessing, I would not have aimed for this score otherwise. But the curse of not having enough time to finish it right still haunts me. Trying to go fast in the last couple of hours, I painted myself into a corner and had to ask Claude to bail me out. We had already prepared plan Z: jumper wires. In about 4 minutes, it turned my board from incomplete to a tragedy. The rules didn't reward or penalize this, and I was completely out of time to do anything about it.

Project 7999 - better in every single way, open source, too!

Render of Project 7999: folded flex circuit boards stacked around two USB-C ports, parts on top, and a PROJECT 7999 anasmalas.com/7999 label on the side
Render of Project 7999: folded flex circuit boards stacked around two USB-C ports, parts on top, and a PROJECT 7999 anasmalas.com/7999 label on the side
Render of Project 7999 from the other side, its USB-C ports labeled P1, P2 and UPSTREAM P3
Render of Project 7999 from the other side, its USB-C ports labeled P1, P2 and UPSTREAM P3

Here it is, in all its glory. The idea is simple: Let's simplify and separate the signals right at the port itself, then we can have ribbons that run in sequence between the ports. All placement and routing was done by me, while AI handled the folding with some guidance. This also went much more aggressively on sizing components down, but at the same time this aimed to do things better.

Still missing is the close ground reference for most signals, but a lot of signals got shorter, so signal integrity has a better chance here. EMI will still be a disaster, but the big power ribbon wrapping around the tower might provide some degree of shielding.

Bigger yet is the current handling. Comma AI did not say what the typical current consumption is, and they did say that touching the board is not a requirement. As in: as long as nothing melts or breaks, it is fine. The eFuses were set to 3 A each on the original design, so we must take the worst case assumption of 12 A. The original submission sent all 9 A for three of the ports through 0.9-1.5 mm wide traces - not great! While project 7999 does have some short necks in the power path down to 1 mm, it sends 9 A through pours that are mostly between 3-5 mm wide.

图表:The tower iterations, from the first test to final.

The journey to 7999

The port is a significant part of getting this so small. Project 9999 was v1, Project 7999 was v3. In the middle, there was a v2 which aimed to separate out the signals to bundle them up nicely to remove all crossings, eliminate all wire jumpers, and improve power delivery. It involved one more PCB, called "mid flex", which would interface with all the ports, arrange the signals without crossings, and send them to the main board organized. Trying to get everything to fit on v2 led me to the active port PCB (where the MCU and eFuse moved onto the port PCB), which eventually sparked the folded port tower idea that became Project 7999.

A closer look

While AI sped up the bending process, it needed quite some prodding to reach a feasible state. Still, it dramatically sped up bridging 3D bends and 2D flat pattern tradeoffs - that's what made this fun enough to spend time on, it is something I would not like to do by hand. Here's what the final flat patterns look like.

Project 7999 is open source

Visit Project 7999 on GitHub, and let me know your thoughts on the accompanying post on X or LinkedIn.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗