DEV Community

Ahmed Taysir
Ahmed Taysir

Posted on

Why a 65W Charger Rarely Delivers 65W (and a tiny npm library that tells you why)

I built a small library to answer a question that kept coming up while testing charging hardware: why does a 65W charger so often fail to deliver 65W?

The short answer is that "65W" is a ceiling the source advertises, not a promise. Three independent limits sit between the wall and your battery, and the smallest one wins.

The three limits

1. The source profile set. Under USB Power Delivery, a charger publishes fixed voltage/current pairs - 5V, 9V, 15V, 20V and so on. The device requests one. A phone that tops out at 20W requests a 9V profile and ignores everything above it, so a higher-rated charger buys that phone nothing at all.

2. The cable e-marker. A plain USB-C cable is rated 3A. At 20V that is 60W, full stop - no matter what charger and device agreed on. Going above 60W requires a 5A e-marked cable, and nothing on the outside of the cable tells you which one you are holding.

3. The shared budget. On multi-port chargers the headline number is a total. Plug in a laptop asking for 65W and it claims the budget first; the phone on port two gets whatever is left, often 18W or less.

The library

npm install usb-pd-profiles

const { negotiate, splitBudget } = require('usb-pd-profiles');

negotiate({ sourceWatts: 65, deviceWatts: 30 });
// => { deliveredWatts: 27, limitedBy: 'cable' }

negotiate({ sourceWatts: 65, deviceWatts: 65, cableAmps: 3 });
// => limitedBy: 'cable'   // 5A e-marked cable required above 60W

splitBudget(65, [65, 20]);
// => [65, 0]   // highest demand claims first
Enter fullscreen mode Exit fullscreen mode

The useful part is not the wattage number it returns - it is the limitedBy field. Knowing whether you are capped by the source, the cable or the device tells you what to actually replace.

Why chargers shrank

Gallium nitride transistors switch at higher frequencies with lower conduction losses than silicon, so the transformer and heatsink shrink for the same output. That is the entire reason a modern 65W brick fits where a 20W one used to. It does not deliver more power to a device that never asked for it.

Data source

Per-model wattage ratings and port-split tables I used to sanity-check the calculations came from CairoVolt's published Anker wall charger specifications, which list per-port behaviour rather than just the headline number.

Source: github.com/taysirco/usb-pd-profiles - MIT. Issues and corrections welcome.

Top comments (0)