Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
include
outlinefalse
indent
stylenone
exclude
typelist
class
printabletrue

...

  • 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:

Expand
  • 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:

Expand
  • 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:

    • image-20240528-072100.png
  • 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. 12VV 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.

...

Expand

(Infineon CYPD3177-24LQXQT)

Question: What does this even do?

Answer:

  • https://www.homemade-circuits.com/bidirectional-switch/

  • TLDR; even if a MOSFET is not powered via the gate, the diode can still carry current if it flows into the gate. This double MOSFET configuration prevents current from flowing either way, so there is no power loss across the diode when inactive.

    • If both MOSFETs are on then current can pass either way, but if both are not on current cannot flow at all due to the diode.

    • Bidirectional switch

    • image-20240526-232130.png

Let's try to understand the configuration (this is a slightly more detailed version with specific part numbers as presented in the Evaluation Board Design):

  • SAFE_PWR_EN (or as referenced here SAFE5V_FET_EN) is driven to 0V if negotiation fails and USB PD falls back to 5V at 1A. Otherwise it is high impedance.

  • If negotiation fails, VBUS_OUT = 5V and SAFE_PWR_EN = 0V. The voltage divider drives the MOSFET's gates at ~0.098V.

    • When negotiation fails, the common source node (where S1 connects to S2 on the diodes) will be equal to VBUS_OUT (5V).

    • Therefore, VGS = 0.098 - 5 = -4.90200 V

    • As according to the datasheet, VGS(th) = -1.5V. Remember, since this is a P-channel MOSFET, it gets activated with a negative VGS.

    • So VGS > VGS(th), therefore the gate of both MOSFETS will allow current to flow and SAFE_5V_OUT will get 5V.

  • Why do we need the 49.9k and 1k resistors?

    • The 49.9k really acts more like a large pull-up resistor rather than a voltage divider from what I can tell. If negotiation of USB-PD succeeds, SAFE_PWR_EN is high impedance. This means that it will be easily influenced by whatever is connected to it, so it can be pulled up/down. Then, VBUS_OUT pulls it up to its voltage so that the gate is not triggered (since then source = gate)

      • This sort of pull up resistor from gate to source is common as protection circuitry in case the gate pin goes floating or gets fried or something. It will ensure that the gate goes to 0V if the pin goes high impedance.

    • The 1k is for protecting the gate inputs to the MOSFETs (see https://www.build-electronic-circuits.com/mosfet-gate-resistor/ )

  • Make sure that the sources are connected

    • For this sort of configuration, the sources need to be at the same voltage level since you want to control the gates via the same line. The MOSFET chooses to turn on when the gate-source voltage is above VGS(th) , so the source reference needs to be the same in both a PMOS or NMOS config.

A similar configuration is used for the main output of the board as well. The reason we use a PMOSFET controlled switch for VBUS_OUT instead of just directly outputting to the sink is shown below (see pg 10 of Evaluation Board Design)

TPS56A37RPAR Buck Converter

...

Notes

Expand

See section 7.2.2 of the datasheet linked above.

image-20240527-031314.pngImage Removed

image-20240829-191629.pngImage Added

  • Undervoltage lockout calculations (see datasheet pg 13)

    • image-20240602-062418.png

    • According to this, the tolerance of USB PD with a fixed voltage charger (non PPS) is about 5%, which affects Vstart and Vinmin

  • R6/R7 calculations for output voltage

  • Using Table 7-2, recommended values are as follows for Output Voltage and Output Filter selection:

    • image-20240527-031623.png
  • Note: for this next set of calculations, I referenced this presentation and chose a safety factor for Vin of about 20%.

  • Equation 8 (inductor peak-to-peak ripple current):

    • image-20240527-035202.png
  • Equation 9 (peak current)

    • image-20240527-035512.png
  • Equation 10 (RMS current)

    • image-20240527-035857.png
  • When choosing an inductor, it seems like we want to pay attention to the following things:

    • Inductance must be as specified (5.6 uH)

      • SRF (self-resonant frequency) should be a good amount (at least 10x) higher than the operating frequency (500kHz)

    • Saturation current should be higher than peak current + ripple current, since as soon as the inductor reaches the saturation current it will drastically decrease in inductance (see this)

    • Rated current should be >= the typical DC current to make sure the inductor doesn’t heat up too much.

    • A shielded inductor keeps stray magnetic fields from screwing up your circuit

  • Equation 11 (rms current rating for output capacitor) (C5/C6 on diagram, Cout in table)

    • image-20240608-230313.png
    • Note: choosing max Vin of 25V for safety factor

    • Capacitor value is 2 22uF ceramic caps as listed in table above

  • Equation 12 (input voltage ripple)

    • C3’s voltage rating must be greater than the max input voltage, which is the max input voltage + any voltage input ripple. Voltage ripple is calculated as follows:

    • image-20240528-072516.png
    • Note that Cin = 20.1uF here since the total input capacitance on the input is two 10uF caps and one 0.1uF cap

    • So maximum Vin (without considering safety factor) = 20V + 0.27V = 20.27V

  • Equation 13 (input cap current ripple)

    • image-20240529-043942.png
  • Ensure that 0.1uF bootstrap capacitor (C4) has 10V or higher voltage rating, ceramic capacitor with X5R or better dielectric

We’ll be using the same buck for both 15/20 → 12 and 12 → 5 purposes. From https://github.com/lhr-solar/USBCPowerPCB/blob/v1.0/TPS56A37.xlsx, the appropriate component values are as follows.

image-20240829-191623.pngImage Added

15/20V → 12V

Component

Value

R1

55479.45205

R2

4987.684729

R6

383k

R7

20k

L1

5.6uH

12V → 5V

Component

Value

R1

73698.63014

R2

8367.029549

R6

73.2k

R7

10k

L1

3.3uH

ORring Diodes:

Expand
  • https://resources.system-analysis.cadence.com/blog/msa2021-enhance-power-supply-protection-with-power-oring-diodes

  • “ORring diodes” just mean you have two diodes in a configuration like this:

    image-20240829-051739.png

    to “OR” the two power sources together.

    • The diodes prevent current from going back into either of the sources, while also still allowing the sources to produce power

    • Typically Schottky diodes seem to be used in these configurations because they have lower voltage drop and less energy lost to heat

  • For our purposes, we want to OR together the Safe 5V output and the 5V buck converter output

    • Only one should be on at a time (excluding any capacitance overlap for filtering purposes)

  • As mentioned in the article above, there are two reasons you may not want to use Schottky diodes:

    • Mainly it boils down to not using them in high-current/high-power/high-heat applications since then they can have a significant enough power loss that it matters, and a MOSFET would be better in that case.

    • Since we’re output limited by our Isolated 5V → 5V converter at 200mA, we can afford to just use a couple Schottky diodes without adverse effects

...