The single-sided boards that I tried (and don't plan to pursue further)

A project log for A USB-C connector on a flex PCB

Let's use an ATtiny84A as a structural element!

sam-ettingerSam Ettinger 02/06/2022 at 05:430 Comments

I realize now that a lot of the content I'd put in the "Project Details" section gets rapidly obsoleted, so I should be putting it in project logs instead. For example, the four demonstration projects that I described are no longer the ones I care about—I got one of them to 67% functionality and learned enough in the process that it wasn't worth pursuing the other designs. Here is some info about those designs, which originally was in the "Project Details" section.

Demo 1: RGB LED that can't be programmed over USB

When initially assembled, that 8-row FFC connector serves as a handy way to program the microcontroller. Once programmed, the connector can be sliced off; the remaining part fits snugly inside a USB-C cable. An RGB LED pokes out of the end, along with a tab that lets you pull the PCB back out again. Out of spite for, uh, myself, I have labelled that the "cowards' tab," encouraging myself to remove the tab and make the board impossible to extract. This would reduce a useful cable into little more than a soothing blinking light for all eternity.

In a twitter thread, I documented the process of assembling this board. It was very fun! I learned that a layer of conformal coating was not sufficient to cover the components—the contacts in the USB-C cable quickly scraped away the coating and consequently led to shorts and burnt-out LEDs. I also learned that gently pulsing green and blue (as opposed to red green and blue) looked extremely soothing, so I felt less bad about abandoning the red channel in future designs.

Even if the conformal coating had worked, the layout created its own issues. I should have controlled the RGB LEDs using the OCR0A/OCR0B/OCR1A/OCR1B pins for easy PWM adjustment. Instead, I had to resort to binary code modulation to achieve any sort of brightness control. It's working alright, as shown here (and further down that thread). And honestly it's a good excuse to play with binary code modulation, it's fun!

Demo 2: RGB LED that can be programmed over USB

It would be nice to use the USB data lines to program the microcontroller! I didn't attempt this for the Demo 1 because I wanted to keep the board as uncluttered and simple as possible. When I started routing this, I didn't find a way to connect all three LED channels, so I've elected to give it green-and-blue LED control only.

All that's required are five extra components: a pullup for the D- line, small resistors on the D- and D+ lines, and zener diodes as level shifters. This is the low-complexity approach used on the Digispark and its derivatives. I have not attempted to make this board yet. Also, look at the 3d render above; doesn't it look like an owl? I love it.

There is an interesting issue with the USB communication. In the USB-C standard, the D+/D- lines are only connected on one side of the plug! It assumes that the USB-C port has D+/D- connectors on both sides, so the plug orientation should not matter. But our USB-C port only has D+/D- connectors on one side. We've reintroduced the classic USB behavior of having to flip the device over 3 times before it works!

Demo 3: Basically a Digispark

In this version, the FFC portion is meant to stay attached! And all the components are 0402-sized with generous spacing so I can worry less when soldering. As a result it can be used in a slightly more "normal" fashion—still operable by sticking it inside a USB-C cable, but now there's a breakout of sorts.

Demo 4: "Coulda used a 555"


In the past I've poked fun at the "coulda used a 555" refrain by, among other things, using three microcontrollers where a 555 would suffice, and using a 555 Schmitt Trigger where a single SPST button would suffice. As luck would have it, there is a BGA 555 IC that is just shy of 0.6mm tall! I've had to pair it with a 10μF capacitor that is a bit taller, but it's a fun idea to explore later.