<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ahmed Taysir</title>
    <description>The latest articles on DEV Community by Ahmed Taysir (@ahmed_taysir_848a05e2b9cd).</description>
    <link>https://dev.to/ahmed_taysir_848a05e2b9cd</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4064298%2Fd94273f5-6b37-4492-8ab7-7a9cbd27bbc3.jpg</url>
      <title>DEV Community: Ahmed Taysir</title>
      <link>https://dev.to/ahmed_taysir_848a05e2b9cd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmed_taysir_848a05e2b9cd"/>
    <language>en</language>
    <item>
      <title>Why a 65W Charger Rarely Delivers 65W (and a tiny npm library that tells you why)</title>
      <dc:creator>Ahmed Taysir</dc:creator>
      <pubDate>Wed, 05 Aug 2026 13:16:33 +0000</pubDate>
      <link>https://dev.to/ahmed_taysir_848a05e2b9cd/why-a-65w-charger-rarely-delivers-65w-and-a-tiny-npm-library-that-tells-you-why-on6</link>
      <guid>https://dev.to/ahmed_taysir_848a05e2b9cd/why-a-65w-charger-rarely-delivers-65w-and-a-tiny-npm-library-that-tells-you-why-on6</guid>
      <description>&lt;p&gt;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?&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three limits
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. The source profile set.&lt;/strong&gt; Under &lt;a href="https://en.wikipedia.org/wiki/USB_hardware" rel="noopener noreferrer"&gt;USB Power Delivery&lt;/a&gt;, 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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The cable e-marker.&lt;/strong&gt; 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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The shared budget.&lt;/strong&gt; 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  The library
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install usb-pd-profiles

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

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

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

splitBudget(65, [65, 20]);
// =&amp;gt; [65, 0]   // highest demand claims first
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why chargers shrank
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Gallium_nitride" rel="noopener noreferrer"&gt;Gallium nitride&lt;/a&gt; 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data source
&lt;/h2&gt;

&lt;p&gt;Per-model wattage ratings and port-split tables I used to sanity-check the calculations came from CairoVolt's published &lt;a href="https://cairovolt.com/en/anker/wall-chargers" rel="noopener noreferrer"&gt;Anker wall charger specifications&lt;/a&gt;, which list per-port behaviour rather than just the headline number.&lt;/p&gt;

&lt;p&gt;Source: &lt;a href="https://github.com/taysirco/usb-pd-profiles" rel="noopener noreferrer"&gt;github.com/taysirco/usb-pd-profiles&lt;/a&gt; - MIT. Issues and corrections welcome.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>hardware</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
