USB-C in Embedded Designs: Practical Overview

Michael Frai
7 min readJun 14, 2020

--

USB-C is an amazing standard that can bring value to a variety of embedded design. This is a short overview of USB-C technology and an introductory guide on how to implement it in your projects. I will cover the basics of the USB-C standard and PCB design considerations such as pinout, footprint, power delivery and functional considerations.

TS-100 soldering iron USB-PD mod improves heat up time and usability.

Standard Summary

USB-C is the newest addition to the USB connector family designed to integrate USB, Power, Display, High-Speed Data Transfer into one footprint. It is a reversible, 24-pin connector that can be implemented in both master and slave devices (same connector on both sides of the cable). To achieve its über-connector status, it can support a variety of protocols including USB4, USB Power Delivery (USB-PD), but also Alternate Mode (HDMI, Display Port, VirtualLink, and Thunderbolt). In short, USB-C can do it all.

Direct Replacement for Older USB Sockets

Let’s focus on the simplest implementation first. Replacing a USB micro/mini socket with USB-C. The added functionality of USB-C comes at a price. The price of complexity. Instead of 5 pins in one configuration, we now have to deal with 24 pins in a reversible configuration and a number of unique protocols.

Micro USB connector (left) has 5 pins and can be plugged in one orientation. USB-C connector (right) has a two-sided, symmetric pinout, which makes the design reversible but each pin is doubled. Note the D+/-, VBUS, and GND in both connectors.

Data Transfer and Power

The majority of USB-C sockets are available in 16 and 24 pin packages. I tend to use the 16 pin variant because it’s slightly easier to work with than 24 pins and only sacrifices the Alternate Mode pins. My go to part is the
USB4105-GF-A (or C167321 on LCSC). Since, the connector is reversible we essentially have to work with 2 connectors in one package. The A and B sides are the symmetric, 12 pin pairs (8 pin pairs in a 16 pin socket). To make this connector work as a traditional USB replacement, we have to short DP1 with DP2 and DN1 with DN2. All VBUS connectors should be connected together, same with GND. As a general rule, do not short CC1 and CC2 or SBU1 and SBU2 together. If you plan on connecting the USB-C socket to a traditional USB-A port on a computer or charger you don’t have to connect them. However, if you’d like to take advantage of USB-C to USB-C connections, CC1 and CC2 should be connected to ground through a resistor (5.1k for 5V@1.5A) to trigger the host to start powering your device.

USB4105-GF-A pad layout and pin description (left). Eagle CAD trace layout example (right).

This is definitely not rocket science but can be confusing if this is your first contact with USB-C.

Cheating The System — Power Only

USB-C connectors come in specialized packages for power delivery systems. Some of those packages short the symmetric pairs inside of the connector and expose only the basic pins (like VBUS and ground). If you’re looking for the simplest solution to power your system, check out this 6 pin, UJC-HP-3-SMT-TR socket from CUI Devices (or TYPE-C-31-M-17 on LCSC if that’s more your speed). This connector type is specifically designed for power delivery applications and has no USB DP/DN pins. Instead we get CC1 and CC2, which are USB-PD specific pins used to negotiate a power scheme between PD compatible devices. We will go over Power Delivery protocol next.

Recommended PCB layout for the UJC-HP-3-SMT-TR. Note this socket doesn’t exposed any data transmission lines. Only VBUS, CC1, and CC2. This would be an ideal socket for a power bank or charger.

Power Delivery

USB-PD is a new addition to the USB-C paradigm but practically it is a separate standard that focuses strictly on power supply applications. Power Delivery drastically increases the power available from a USB port as well as provides flexible power profiles for devices such as laptop, phones, monitors, or HID peripherals. The maximum power specified for USB-PD is 100W (20V @ 5A). This is enough to power a beefy laptop or fast-charge your mobile phone in minutes instead of hours! Flexibility of USB-PD allows the user to request specific voltages and currents (5–20V in 20mV increments and 0–5A in 50mA increments). However, the ability to deliver these voltages depends on the design of the Source device, so just because you’re requesting 9.820V doesn’t necessarily mean you’ll be able to get it. Nevertheless, the PD protocols implements error handling to ensure safety of both the Sinking and Sourcing devices. As an example, most USB-PD devices will monitor the VBUS rail, if VBUS fails to maintain the correct level, USB-PD will be disabled and VBUS will return to 5V. Here are default profiles for the PD standard.

Unfortunately, implementing USB-PD is not that easy. In fact, it is complicated enough that IC manufacturers started developing dedicated ICs to handle power scheme negotiation. Even though, some manufacturers like ST have started advertising specialized lines of microcontrollers with built-in PD drivers (STM32G0), the easiest approach still seems to be an external IC.

Source or Sink?

As you may remember, USB-C can act as a host or device connector. This means you can use the same connector on your laptop charger, phone, headphones, and laptop. However, each one of these devices will have different power requirements and will perform different functions depending on which two devices are connected. For example, when you connect your laptop charger to your laptop the charger starts charging the laptop, but if you connect your phone to your laptop, the laptop will start charging the phone.

This is where the idea of Sourcing and Sinking comes in. Some USB-PD devices only Source (deliver) or Sink (accept) power, others can do both. You will have to select an appropriate IC for your application. I will briefly highlight Sinking devices because they apply to a wide variety of designs. Sourcing devices can have a much more complicate power scheme and are more dependent on the specific IC used.

Unlimited Power

By default USB-PD will provide a standard 5V power rail. To enable full functionality, we have to communicate with the Source through the CC1 and CC2 pins and request a specific voltage. Again, the easiest way to do this is with a dedicated IC capable of interfacing with your microcontroller like the STUSB4500, which is capable of full PD negotiation and is extremely easy to implement. It even has dedicated Arduino libraries for quick prototypes.

The STUSB4500 provides your embedded design with USB-PD capability. Unfortunately, it increases the BOM of the end product significantly. Area required to implement this architecture is approximately 140mm².

No Microcontroller

What if we want to create a ‘dumb’ device without a microcontroller but still take advantage of Power Deliver? This is possible thanks to USB-PD ‘trigger’ modules like the IP2721 (or STUSB4500 in standalone mode). These modules can be set to the desired power scheme (5, 12, and 20V for the IP2721) through hardware configuration. On power up, the module will send a PD request to the Source device. In general, PD triggers offer limited functionality and safety but can be useful in migrating old proprietary power supply socket designs to USB-C.

STUSB4500 (top) in standalone mode compared to IP2721 (bottom). The IP2721 offers a compact design and very simple operation. PD scheme is selected by connecting the SEL pin to GND, Logic High (高电平), or leaving it floating (浮空).

Conclusion

Almost all of my embedded projects include a micro USB socket. I use them for firmware updates, debugging, serial logging, and even custom protocols. They are a convenient way to add host connectivity for simple embedded projects. Recently, I started converting all of my projects to USB-C. To be honest, I even started converting some of my old electronic tools from traditional USB to USB-C. If you’re interested here’s a guide on how to do this for the TS100 soldering iron. The same principle can be applied to a wide variety of devices. Why? The simple answer is convenience. Instead of having a box of cables for USB-A, USB-B, USB mini, USB micro, and a second box for my laptop with only USB-C ports, I can use a single USB-C to USB-C cable. Programming a prototype board? Check. Powering soldering iron from laptop charger? Check. Charging electronic screwdriver from desktop monitor? Check. Connecting headphones to a phone charger to confuse your friends? Check and Check.

USB-C is much more than a new version of a USB connector. The new standard integrates power, data, and display into a single connector. Despite the added complexity, USB-C is still relatively easy to implement as either a substitute for traditional USB sockets or a way to add new functionality to embedded designs. One of these new functions, USB-PD, is a convenient way of replacing auxiliary power supply sockets with USB-C in an effort to unify embedded design connectors. While useful, USB-PD requires specialized ICs to be utilized properly. Nevertheless, simple PD trigger modules can be used in standalone systems to provide USB-PD functionality.

Photo by Jeroen den Otter on Unsplash

--

--

No responses yet