USB-C PCB Experiments

This is part of an ongoing series of projects involving creative interpretations of the USB mechanical standards. You’ve probably seen 2.0mm thick PCBs that fit in USB ports, and maybe you’ve seen 0.6mm thick PCBs that fit in USB-Micro cables. So what about USB-C? T​he plastic tab inside a USB-C port is about 0.7mm thick. I think bobricius has had success using 0.8mm thick PCBs; 0.6mm thick PCBs are way too loose. I haven’t found a fab that will do 0.7mm (or 28 mil) PCBs unless you special-order an entire panel.​

So, what other ways are there to reach 0.7mm thickness? My original plan was to join an 0.1mm flex PCB and an 0.6mm FR4 PCB, but then I realized: you know what else is 0.6mm thick? The ATtiny84A BGA package. Granted, there are only contacts on one side of the PCB, but that shouldn’t matter with the symmetric USB-C pinout, right? …Right? (foreshadowing)

A close-up of the ATtiny84A in BGA package, next to a USB-C-shaped flex PCB

The BGA IC soldered onto the flex PCB, being measured by calipers that show 0.0275 inches (0.70 mm)

The 3mm-square ATtiny acts as a stiffener for the flex PCB, and it comes out to 0.7mm on the dot! I only have an imperial set of calipers as seen above. The dial shows 0.0275 inches, which is 0.6985 millimeters. So this is looking pretty promising. After my initial tests, I am leaning toward a circuit sandwiched between two PCBs. The result is about 0.85mm thick with OSH Park flex PCBs, so I may need to locate another vendor.

What would you do with an ATtiny that lives inside your USB-C cable? I have a few ideas for demonstrations at the moment.

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

Schematic of revision 1 of the RGB LED USB-C PCB

Top-down view of the assembled revision 1 PCB

Top-down view of the other side of the assembled revision 1 PCB

Top-down view of the other side of the assembled revision 1 PCB

There are two revisions of this design; the schematics are in the repo as rgb_no_bootloader.kicad_sch and rgb_no_bootloader_r2.kicad_sch. Revision 1 is the one that I have assembled and ready to work with, it’s also the one I would like some code help with! My current code is in the in the code folder as demo_1_revision_1; it is saved as an Arduino .ino file but it should work fine with AVR-GCC without any changes.

This demo is as simple as possible: the microcontroller controlls an RGB LED that juuuust barely pokes out of the USB-C cable plug. It has to be programmed using that 8-pin FFC connector, and then the FFC connector has to be snipped off in order to use the dang thing. Right now I have one fully-soldered version of revision 1, but I haven’t cut the FFC connector yet because I would like some help improving the code.

Demo 1 Revision 2 is necessary because, on revision 1, the RGB LED is not connected to the Fast-PWM-enabled pins on the microcontroller. As a result I have to use binary code modulation to achieve any sort of brightness control. It’s working alright, as shown here, but I’m not confident enough with the code to chop off the programming connector yet.

When I finally removed the connector, I documented it in this Twitter thread. I got excited and tried putting it in a powered USB cable while the top side was exposed. Unsurprisingly, this caused some shorts and some damage! I soldered in a new RGB LED and applied conformal coating. The conformal coating helped for a little while, but got scraped away pretty quickly. This suggests to me that any future designs will need to be sandwiched between two PCBs.

As you can see, there is a large tab sticking out so I can grab and remove the PCB from the cable. However, out of spite for, uh, myself, I have labelled it the “cowards’ tab.” Past me was encouraging present me to remove that tab and make the board impossible to remove, thereby turning a useful cable into a cute little art piece for all eternity.

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 first revision because I wanted to keep the board as uncluttered and simple as possible. It will result in a denser board that may need more careful soldering, but it should be possible! Well, mostly possible. I didn’t find a way to route red green and blue at the same time, so I’ve omitted red from the design.

Schematic of the programmable RGB LED USB-C PCB

KiCad 3D render of the programmable RGB LED USB-C PCB

As I understand it, I need to add at least 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, however. 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 but smaller

Schematic of the miniature Digispark PCB

KiCad 3D render of the miniature Digispark PCB

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”

Schematic of the USB-C PCB using BGA 555 timers instead of a microcontroller

KiCad 3D render of the USB-C PCB using BGA 555 timers instead of a microcontroller

On the Hackaday websites, “Coulda used a 555” is shorthand for grumpy commenters who criticize designs that they consider inelegant, for example, using a microcontroller where a 555 would suffice. In the past I’ve poked fun at this notion 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.


View Github