Close

Why the Output MOSFET Is Important

A project log for PD Buddy Sink

Smart power jack for USB Power Delivery

clara-hobbsClara Hobbs 04/23/2017 at 01:300 Comments

Or: Why the USB-C Easy Bake Oven Is Dangerous

This is just a quick little post to explain why the PD Buddy Sink has a MOSFET to switch its output. There are several reasons, but they all boil down to the same thing: without it, a device like the USB-C Easy Bake Oven would be dangerous.

The PD Buddy Sink has a MOSFET controlling its output. It turns on when the Sink establishes an Explicit Contract for the power configured, and remains off if the power supply cannot provide the power you wanted. One obvious consequence of this is that your project only gets the voltage you configured the Sink to request, preventing any possible undervoltage from occurring.

More importantly though, this MOSFET is essential to the safe operation of any device utilizing the PD Buddy Sink. Take for example the USB-C Easy Bake Oven made by Jason Cerundolo. It's a modified Easy Bake Oven that gets its power from USB Power Delivery, made using an Arduino and a breakout for the FUSB302B (the same USB PD PHY used in the PD Buddy Sink). Jason modified the resistive heating element to dissipate 80 W at 20 V, producing enough heat to bake cookies.

Time for some analysis. His heating element is a (20 V)² / 80 W = 5 Ω resistor. In his system there's no circuitry to switch it on and off, so it's always connecting VBUS to GND. Before any negotiations are done, it draws 1 A at 5 V. For a USB PD supply like the one he used, it's entirely likely that nothing bad is happening yet: it probably advertises a Type-C Current of 3 A, so it's safe to draw up to that much current at 5 V without doing any PD negotiations (Edit: it actually advertises a Type-C Current of 1.5 A). I'm not sure if Jason's firmware checks this however, and even if it did, it would have no way to stay within the limits of the advertised current.

However, the oven has a USB port, and so it could be plugged in to absolutely any USB power source. Consider for instance a non-powered USB 2.0 hub. The maximum current for a single device is 100 mA, but the oven will draw ten times that! Hopefully the hub has good over-current protection, or something could easily get damaged. In fact, any normal USB 2.0 or 3.0 port would find itself in an over-current scenario from the Type-C Easy Bake Oven, since their maximum current is 500 mA and 900 mA, respectively.

There's another matter with regards to Power Delivery. According to USB PD rev. 2.0 v1.3 section 7.2.3,

The Sink Shall transition to Sink Standby before a positive or negative voltage transition of VBUS. During Sink Standby the Sink Shall reduce its power draw to pSnkStdby [2.5 W].

Since the easy bake oven draws more power than that at 5 V, clearly it draws even more while the voltage transitions from 5 V to 20 V, making a violation of the standard. From any power supply, even one that can provide enough power to run the oven, too much current will be drawn at some point. Seems dangerous, no?

Further, Jason's firmware simply requests the most power the supply can give at 20 V, telling the supply that there is a capability mismatch if less than 100 W is available. Not only is this incorrect behavior (it should request the 80 W it actually uses, not more), but again this is dangerous. If the oven were plugged in to a 45 W power supply for example, it would request 2.25 A at 20 V, then draw 4 A and possibly damage the power supply. Or, if a 3 A cable were connected to the 87 W power supply he used, his oven would request 3 A at 20 V, then draw 4 A. Instead of baking cookies, you'll get a baked USB cable!

Thus, it is obvious why the PD Buddy Sink has a MOSFET to control its output. In any case where sufficient power is unavailable, the PD Buddy Sink simply does not provide any power to its output connector, and stays within acceptable power limits for even the lowliest of unpowered USB hubs. During voltage transitions, the output is turned off. If the cable can't carry enough current for the device, it isn't forced to. Nothing is damaged, and everyone is safe and happy.

Discussions