USB-C_PCB_experiments - USB-C ports made from a flex PCB and an ATtiny84A

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.

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 board, 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.

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 is 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

TODO: migrate these files to KiCad 6, add to repo, and update this document

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!

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.

Similar Resources

Is this hardware solution the ultimate in switch bounce elimination? Simple PCB, cheap components = final solution!

Is this hardware solution the ultimate in switch bounce elimination? Simple PCB, cheap components = final solution!

#230 Ultimate Switch Bounce Eliminator Direct link to video: https://youtu.be/b2uUYiGrS5Y It's time to try a final, alternative approach to the ubiqui

Nov 7, 2022

Amiga 1200 keyboard MPU drop-in replacement pcb

Amiga 1200 keyboard MPU drop-in replacement pcb

A1200_keyb_MPU Amiga 1200 keyboard MPU drop-in replacement pcb As the 68HC05 (p/n 391508-01) used in the Amiga 1200 is getting to be very expensive, I

Nov 26, 2022

Open source PCB for arcade sticks using Raspberry Pi Pico.

Open source PCB for arcade sticks using Raspberry Pi Pico.

Pico Fighting Board Open source PCB for arcade sticks using Raspberry Pi Pico. Introduction They say imitation is the highest form of flattery. If tha

Nov 22, 2022

My own version of a PCB Christmas Tree, using an ATtiny85 / ATtiny13A.

My own version of a PCB Christmas Tree, using an ATtiny85 / ATtiny13A.

PCB_ChristmasTree My own version of a PCB Christmas tree, using an ATtiny85 / ATtiny13/13A. Some of the ideas are my own, others are borrowed from var

Nov 19, 2022

Large LED Heart PCB Pendant

Large LED Heart PCB Pendant

Large LED Heart PCB Pendant A large heart with 20 individually controllable LEDS using 4 pins on an ATtiny 45 with Charlieplexing This is an easy to s

Mar 18, 2022

Through hole PCB version of the HAGIWO 005 Generative Sequencer Eurorack module.

Through hole PCB version of the HAGIWO 005 Generative Sequencer Eurorack module.

HAGIWO 005 Eurorack Sequencer PCB and Code Through hole PCB version of the HAGIWO 005 Generative Sequencer Eurorack module. The module is a very simpl

Sep 28, 2022

Tiny and portable usb host and device stack for mcu with usb ip

Tiny and portable usb host and device stack for mcu with usb ip

Nov 29, 2022

ESP32 software USB host through general IO pins. We can connect up to 4 USB-LS HID (keyboard mouse joystick) devices simultaneously.

esp32_usb_soft_host esp32 USB-LS pure software host thru general IO pins. Up to 4 HID devices simultaneously. board ~$3 :https://www.aliexpress.com/pr

Nov 25, 2022

ESP8266 software USB host through general IO pins. We can connect up to 2 USB-LS HID (keyboard mouse joystick) devices simultaneously.

ESP8266 software USB host through general IO pins. We can connect up to 2 USB-LS HID (keyboard mouse joystick) devices simultaneously.

esp8266_usb_soft_host Test for esp8266 usb host . Works with ESP-IDF v3.4 80MHz and 160MHz. WorkInProgress Test run with mouse & combined mouse & keyb

Sep 1, 2022
A simple programming language using Bison and Flex in C++.

Yu Language - yulang A toy project for creating a simple programming language using Bison and Flex in C++. interface $ ./yulang Yu Language 0.0.1 (uns

Oct 27, 2021
Modernization of 1990's ZMODEM program, with ports to Atari ST and CP/M-80 2.2.

ZMRX/ZMTX This repository is a modernization of a mid 1990's implementation of the ZMODEM protocol called 'zmtx-zmrx'. The main goal is to have a vers

Sep 26, 2022
emPOWer your commits. Pointlessly flex on your coworkers with bespoke commit hashes, all with the convenience of a single command.
emPOWer your commits. Pointlessly flex on your coworkers with bespoke commit hashes, all with the convenience of a single command.

git-power emPOWer your commits. Pointlessly flex on your coworkers with bespoke commit hashes, all with the convenience of a single command.

Nov 9, 2022
Bluetooth helper tools for setting up serial ports for e.g. SSH

SSH Helper program so that you can SSH over bluetooth. This can be a useful second way in in case you have a raspberry pi with broken network or firewall config.

Nov 1, 2022
MFD Button Switches for Flight Simulators. Arduino *.ino and PCB Gerber files and a picture. Now with FalconBMS specific firmwares.
MFD Button Switches for Flight Simulators. Arduino  *.ino and PCB Gerber files and a picture. Now with FalconBMS specific firmwares.

MFD-Switches Use at your own risk. I am not accepting responsiblity for anything. Copyright Ron Lyttle 2021. I have to copyright because of some of th

Jul 10, 2022
Physical Tic-Tac-Toe smart board with PvP mode and two levels of AI. Built atop a custom PCB connected to an Arduino Mega 2560.

TicTacToe_SmartBoard The files in TicTacToe_SmartBoard are based on the files in https://wiki.illinois.edu/wiki/display/ECE110HLSF15/Tic-Tac-Toe+Smart

Jul 22, 2022
RP2040+PMW3360 PCB and code
RP2040+PMW3360 PCB and code

RP2040+PMW3360 This repository contains design files and code for a PCB carrying Raspberry Pi's RP2040 chip and the PixArt PMW3360 optical mouse senso

Nov 21, 2022
Sketch for the R2UppitySpinner PCB

R2 Uppity Spinner This is the sketch for the R2 Uppity Spinner. It depends on the Reeltwo library. You can download the latest release of the Reeltwo

Nov 20, 2022
PNPASSIST: A “SMART” BUILD PLATFORM FOR MANUAL PCB ASSEMBLY

PnPAssist Description The PnPAssist is an open source innovative CNC table that position the next SMT component with a proper orientation for you to m

Nov 18, 2022
A simple "no frills" drop-in replacement PCB for the KBDfans 67mkII / 67lite
 A simple

67mk_E A simple "no frills" drop-in replacement PCB for the KBDfans 67mkII / 67lite KiCAD PCB files Gerbers for PCB production JLCPCB BOM JLCPCB CPL V

Nov 2, 2022