[WIP] 2024 - 2026 USB-C PD Dongle Design Document

Warning: this document is purely my notes from my own research. Don’t take everything in it for granted especially since I’m a beginner to this sort of stuff, and double check everything, especially if using it for design purposes. I am not purporting to be good at this or to get everything right or to know everything, since this is my first board for Solar.

If you have any corrections for this document, please feel free to comment with a correction. Try to keep the original material for a bit so that it is clear a correction is made/so that we preserve some history in case the correction is incorrect. - Ishan

Design Notes

Objective:

The purpose of this board is to be able to use a USB Type-C laptop charger to run one LV system (such as BPS or Controls). The dongle will act as a breakout; negotiating the power delivery at a fixed voltage with the laptop charger and delivering as much current as needed at a stable voltage of 12V/5V.

The dongle will (hopefully) also be able to supply the maximum amount of current necessary for any of our systems. @Lakshay Gupta wants to be able to handle the current spike that BPS has when the HV+, HV-, and HVARR contactors flip, so the design should potentially accommodate for that.

Block Diagram & Requirements:

  • Simultaneous 12V and 5V output

  • 12 for LeaderSOM, 5 for small sensor power or CANbus power

  • 5V needs to be isolated from 12V for CANbus power

  • Status LEDs

  • On/off toggle switch

  • Overcurrent/voltage and undervoltage protection

Preliminary Research Notes:

  • USBPD devices can either act as the source (charger) or sink (device) or DRP (both). For our purposes we probably want a sink-only chip since we'll be plugging a charger into this board and the output will be a 12V/GND line. We don't need this to act as a source from a wall outlet.

  • Compatibility with USBPD 2.0 and USBPD 3.0 would be nice to allow us to use a wider array of laptop chargers.

    • USBPD 2.0 allows for fixed voltage outputs of 5, 9, 12, 15, and 20V

      • USBPD 3.0 allows for incremental voltage outputs anywhere from 3.3V to 21V in increments of 20mV. This is called PPS (programmable power supply). We don't really need this since we only need to provide fixed 12V and 5V.

  • Perhaps considerations should be made for USBPD 3.1 as well, as that would allow for a higher power delivery of 240W and possibly support driving contactors.

    • 3.1 is backwards compatible so designing a 3.1 sink should allow for interfacing with 3.1/3.0/2.0 source

    • Since we want to max out current I think 3.1 makes the most sense as USBPD 3.1 EPR (Extended Power Rating) cables have the capability of providing up to 240W @ 48V

      • This may have to wait as there are not many 3.1 sink chips available

      • According to this reddit post, USBPD3.1 @ 240W probably isn't possible since the sink functionality of it is not well supported. I took a look at a few chips such as ST-ONEHP and TPS25730USB.

USBPD Controller Chip Evaluations:

  • Mouser USBPD Search

  • USB Type-C PD 3.0 Specification, Charging and Design

  • Guide to USB-C Pinout and Features

  • USB Type-C and USB power delivery power path design considerations

  • Phil's Lab video

  • Designing a USB PD (Power Delivery) Trigger Board For My Devices

  • Infineon CYPD3177-24LQXQT

    • Used in this Phil's Lab video

    • In stock on Mouser as of 5/22/24

    • Price: $2.20

    • Operates on USB-PD 3.0 Standard

    • Capable of 100W (20V @ 5A)

    • Evaluation Kit Guide

    • Pretty simple to set VBUS Min/Max and Current Min/Max; just use voltage dividers on four config pins as shown above

    • Offers a fault indicator

    • Falls back to 5V in case negotiation fails

    • QFN package (more difficult to solder, but still manageable at Pickle esp. with someone with experience)

  • INJONIC IP2721

    • Used in this isaac879 video

    • Available for order on JLCPCB or AliBaba

    • In-stock at JLC and Alibaba as of 5/8/24

    • Price: $0.69

    • Capable of 20V

    • Connecting high to SEL pin will make it output 20V, which makes configuration easy

    • The downside of this (as according to this Hackaday post) is that even though USB-PD supports current negotiation (sink asking source what current it supports), the IP2721 doesn't. So if a charger is plugged in that doesn't support 5A, which we are ultimately going to request, then we still may not get the current we want and perhaps trigger some overcurrent condition on the source if we go over that amount.

    • TSSOP package, so easier to solder

  • Texas Instruments TPS25730

    • Price: $2.69

    • On backorder in Mouser as of 5/8/24

    • In TI's product selector for USBPD chips, this seems like the newest sink-only chip

    • It supports PD 3.1 in that you can do PPS (which we don't actually need anyways)

    • Capable of 100W (20V @ 5A)

    • It looks like an external microcontroller can be attached to I2C for configuration purposes, but doesn't have to be

    • Min/max voltage and operating current/max current configured through ADC1 through ADC4, can just hook up voltage divider

    • TPS25730D has an internal HV path, whereas S has a gate driver for an external HV path

    • QFN package; harder to solder as mentioned before

  • STMicroelectronics STUSB4500

    • In-stock as of 5/8/24

    • Price: $2.71

    • Reference schematic

    • Capable of 100W (20V @ 5A)

    • Configurable through programming non-volatile memory (NVM) through I2C

      • Would make initial configuration of anything above 5V a bit more difficult, but would only need to be done once at the beginning with a programmer of some sort (Nucleo?)

    • QFN package

Buck Converter Research:

  • I suppose we'll need a high-efficiency buck converter to step down from max 20V@5A to 12V@8.333A after the whole USB PD negotiation is complete.

  • Another design consideration was made in this area about the buck converter pipeline. The two possible options were 20V → 12V → 5V (e.g. having chained buck converters) or 20V → 12V AND 20V → 5V (independent buck converters)

    • Chaining buck converters means that we can use the same 12V → 5V buck converter we typically use, muRata MYLSM00502ERPL. However, this means that if 12V or above is not in a source’s capabilities, then 5V will also fail. Basically 5V is entirely dependent on the 12V working, which limits the set of USB Type-C chargers we can use with this board.

    • Independent buck converters means that 5V can function without 12V, so if a PD charger WITHOUT 12-20V support is used, we can still test a low voltage device. This seems better but also makes our job as circuit designers more difficult in terms of validation, cost, or efficiency.

  • Matthew Yu’s notes on LDO vs Buck Converters:

  • Tips on Layout from Phil's Lab

  • Buck Converter Explained

    • Another one: Buck Converter 2: Electric Boogaloo 

    • Other typical forms of voltage step-down (Linear Voltage Regulator (LDO), Voltage Divider) dissipate power as heat to step down voltage. We lose power in some capacity as heat.

    •  Buck converters will decrease voltage AND increase current to maintain power (typically higher efficiency but less stability when compared to an LDO)

      • When the switch is closed, the inductor charges up

      • When the switch is opened, the inductor releases charge through the load resistor RL. The current flows through the diode and back into the inductor

      • We switch the switch (MOSFET) at a certain frequency and duty cycle in order to keep the average current relatively stable over one period

      • The capacitor is assumed to have a steady voltage over one period, so it just keeps the voltage drop across RL the same

      • Watch the Buck Converter 2 video for more explanation and the derivation for the following equation:

        • Vout = Duty Cycle x Vin (typically)

        • Datasheet will have more specific calculations for things such as voltage dividers which will ultimately set the duty cycle

      • A synchronous buck converter replaces the diode with another MOSFET so that there is less power loss since the MOSFET will have lower power loss while current is flowing thru it

  • Luckily for us, these buck converters come in convenient little ICs that will do all this switching for us

    • We need two of these, one for 12V and one for 5V

    • WEBENCH Power Designer

    • Integrated FET packages (the mosfet comes inside the IC)

      • Mouser Filter Link

      • TI Filter Link

      • Analog Devices Filter Link

        • Nothing on here that can do more than 6V output

      • TI TPS56A37

        • $2.87 on Mouser

        • 4.5V to 28V input

        • 0.6 to 13V output

        • Supports 10A continuous output current

        • Seems most appropriate for our 20V->12V use-case especially since other ICs can't supply as much current

        • QFN package

      • TI TPS62933ODRLR

        • $0.99 on Mouser

        • 3.8 - 30V input

        • 5V output

        • 3A

        • 12 uA quiescent current

        • @Champers Fu approved!

        • This one is really good, perhaps we should use it for more designs

    • External FET Buck Controller packages also exist and were looked into briefly (mosfet is outside the IC, might be more cost-effective and able to provide enough current)

Input Voltage Range

  • Originally the decision was made to have two buck converters both bucking from the source voltage of 5-20V. The reason this decision was made early on was because a heavy emphasis was being placed on this board working with a wide range of USB PD chargers for a larger applicability.

    • If your source charger doesn’t support anything from 12-20V, and only supports something 9V or lower, you could still originally operate on the 5V output.

  • However, this decision needs some reconsideration. First, an argument could be made for not supporting anything other than 20V.

    • 12V isn’t typical on these laptop chargers and is usually considered an “optional” voltage

    • While it would be cool to run on 5V/9V chargers, perhaps the design considerations necessary for them (such as a 5V buck bypass mosfet in case the voltage input is 5V to prevent voltage dropout, or a similar design on the 12V buck for an input 12V) isn’t worth it.

    • Most common is the 65W USB-C laptop charger, which usually is 20V at 3.25A (bucks down to approx. 12V at 5.41666667A).

    • We could even buy a few of these Anker 100W USB PD chargers for people to use with the device.

    • Also, we don’t need that much current for the 5V bus since it’s mainly for CAN, so we can safely fail negotiation and then just use SAFE_5V from the USB-PD chip

  • Additionally, supporting a wider range of voltage inputs is making development slightly more difficult for not all that much gain.

    • Supporting 5V and 12V requires us to have a bypass MOSFET around the buck converter in order to not lose a lot of power (12V into the 12V buck converter will not output 12V, and similarly with 5V) because if you put Vout into Vin of a buck converter there will be a voltage drop.

  • All in all, a larger variety of chargers supported may just make our lives harder. Thus, let’s decide to make it only operate if the USB-PD charger supports 15 or 20V.

  • This is easily modified during testing via placement of different resistors.

Buck Converter Pipeline

  • 15/20V → 12V → 5V, a series configuration, means we only have one unknown voltage input from the USB-PD chip, which is better than having an unknown voltage go into both the 12V and 5V converter.

 

Power Path & Flowchart:

A few notes on this:

  • The 5V output needs to be isolated from the 12V output for CANbus, since our CAN chip requires an isolated bus-side power

  • If the source does not support 15/20V, a safe 5V will be generated by the USB-PD chip that will then be input into an ORring diode configuration in order to output it to the same 5V port.

  • The triangles are ORring diodes.

  • A major benefit to this scheme would be to allow negotiating for 12V and either using a buck/boost converter that supports 12V input and 12V output; or bypassing the buck entirely.

    • In his review, Matthew Yu suggested having a buck-boost TPS55289 that cost $6 more than the previously selected TPS56A37. Additionally, using a buck-boost only to then input the same voltage that you are outputting does not make much sense.

    • One may think that a buck-boost converter would allow for 12V at even lower negotiated VBUS, such as 5V or 9V, but this may complicate the power path. If the negotiated voltage is 5V, then we boost to 12V and then buck again to 5V it’s not super optimal. Instead, keeping the “allowed' voltages to 12, 15, and 20 allows us to use the SAFE 5V output for 9V and 5V inputs, which is probably enough current for most purposes (900mA).

  • Maybe bypassing the 12V buck is an option. Here’s a TI forum post of someone attempting to do this exact thing.

    • On the post they recommend using their buck’s built-in 100% duty cycle mode. The TPS56A37 on the other hand only supports up to 98% duty cycle, probably with some efficiency losses.

      • Maybe 98% isn’t too bad? We can swap out the resistor once the board is ordered to see the voltage drop.

    • Most of these forum posts seem to suggest that it will require more development time to figure out switching circuitry for a bypass, and recommend simply purchasing a buck or buck-boost with a built in bypass or 100% duty cycle.

  • A third option is to just negotiate for 12V and allow the voltage drop over the buck converter.

    • This could be optimal. Our SOMs have an UVLO point of 10.4V. Assuming the voltage drop is not greater than a volt, this may be worth it.

    • The downside is that it may be bad for our spec if a power supply that says it outputs 12V doesn’t output highly regulated 12V. Plus, voltage droop from high current draws may drag it below the UVLO point.

PMOS Power Switch Configuration:

TPS56A37RPAR Buck Converter Notes (15-20V → 12V)

TPS562231DRLR Buck Converter Calculations (12V → 5V):

TPS2116DRL Power Mux

5V → Isolated 5V converter:

Development

GITHUB LINK

Version 1 Pull Request

Misc. Tips and Design Notes:

  • Originally I was using the downloaded symbols for the MOSFETs when creating the schematic, but then I realized KiCad has a large base of existing symbols for common device configurations. For example, Device:Q_Dual_NMOS_S1G1S2G2D2D2D1D1 models an NMOS FET similar to the 12V Output N-Channel MOSFET.

    • Additionally, the MOSFET symbols you might download for one of these things will just look like a rectangle:

    • vs the KiCAD dual mosfet symbol (far clearer in what it actually is):

    • So using the symbols from the Device library for a MOSFET, and then linking it later to the downloaded footprint for the desired FET, will make the schematic clearer.

  • This website is pretty good for resistor values: https://jansson.us/resistors.html

    • Choose E24 for most commonly available values

  • Originally I calculated inductors for max input of 20V, but in order to overspec it (as a safety measure) I’m going to redo the calculations for 25V and pick new inductors & ensure that the buck converters will still work as intended

  • According to this presentation, the voltage tolerance on USB PD is +-5%. The undervoltage lockout points have been set at exactly these values so that we can ensure proper operation.

  • Use wolfram alpha for conversions and calculations, it works pretty well.

  • Murata (and many other manufacturers) caps may not provide the DC bias curves for a capacitor on the datasheet directly, but have external design tools linked on the Mouser or Digikey page that will have the specific curve for the selected cap.

    • Digikey will often have more resources than Mouser, so make sure to check there.

    • See this reddit comment:

      That's just an example graph to show that ferroelectric dielectrics are shit. You need to look at the curves for the specific part number capacitor, which is not always available.

      For specific capacitor Vbias curves, I tend to look on the Digikey product page, where it will often be linked.

      For Samsung caps, look for "Datasheets: LONG-MFG-PART-NO Characteristics". Example digikey page. Example characteristics datasheet.

      For TDK, look for "Datasheets: Character Sheet". Example.

      For Murata, look for "Design Resources: SimSurfing Design Tool". Example.

      For KEMET, look for "Design Resources: K-SIM Simulation". Example. There's a drop-down menu on the upper left to select "Capacitance vs. Vbias" plot.

      I'm pretty sure AVX has something similar, but not seeing an easy example, so no link. I guess they have crap coverage.

      I've never found a good link for Taiyo Yuden, though I haven't searched much.

      Wurth has a link that looks suspiciously like simulation results, but require you to signup and login, so fuck them. I'm not making an account to learn about your commodity passives.

      So the data is out there for like 25-50% of the ceramic caps on digikey. I just assume the rest are garbage and ignore them, but then again I don't have BOM price pressure forcing me to look for cheaper passives. It really should be a column on digikey's parametric sort: delta C @ 75% WV. But I think they have the same problem with data availability that we do.

    • Adding onto this, Taiyo Yuden has a product searcher that will give you similar characteristic sheets. Given that these are on the cheaper end of caps, having this sort of data on caps we use often is valuable.

  • If you figure out certain specs for a component but you don’t know others, sometimes it is useful for me to just sort by price and pick the cheapest thing, then see if there’s anything that would bar it from working with your application.

  • Capacitor selection

    • Higher capacitor voltage ratings typically exhibit less effective capacitance losses

  • https://dubiouscreations.com/2021/04/06/designing-with-usb-c-lessons-learned/

  • ESD Layout Guide

  •  

Archive:

These are sections that I’ve archived after some review/redesign step. They are preserved here to view along with an explanation of the design decision(s).

  1. Current monitoring with a 7seg display and MCU was cut because:
    - after PSOM transitioned to 12V and 5V became only an isolated supply for CAN testing, there was really no need to monitor current on both 12V and 5V (only 12V)
    - felt the need to make development faster and easier
    - not really super useful if you have a multimeter and some header pins, more just for the cool factor
    I suppose one thing I try to keep in mind is to not be too married to a specific idea, and also that something that works and is streamlined in application is often better than the more complicated option.

Current Monitoring

Microcontroller

  1. Using TPS562231DRLR buck converter (from the PSOM) w/out power protections; since we need to add a separate power protection chip for the isolated 5V anyways. Plus it’s far easier to use and is cheaper.

TPS62933PDRLR Buck Converter Calculations (12V → 5V):

  1. Originally planned to use ORring diodes for the 5V and Safe 5V combo wombo but decided to use TPS2116DRL instead.

ORring Diodes:

  1. TPS56A37RPAR was the original selection for a buck converter; but did not support 9V and 12V voltages. Matthew suggested that TPS55289 may be the way to go for a buck-boosts that would fit this usecase. However, after learning that it uses I2C for voltage configuration (🤮) I decided to revert back to the TPS56A37, since I did not want to add a microcontroller to the board, nor did I want to have to configure every manufactured power supply.

TPS55289 Buck-Boost Converter Notes (9-20V → 12V)

  1. These power protections were added initially but deemed as overkill in review, especially since the nice 12V buck handles a lot of this. Replaced by far simpler output protections like a PTC resettable fuse and a diode.

Power Protections: