Fwd: [New post] USB-C For Hackers: Build Your Own PSU

From: Fred G. Finster <fred_at_thegalacticzoo.com>
Date: Thu, 19 Oct 2023 05:29:15 UTC


-------- Forwarded Message --------
Subject: 	[New post] USB-C For Hackers: Build Your Own PSU
Date: 	Thu, 12 Oct 2023 17:02:00 +0000
From: 	Hackaday <donotreply@wordpress.com>
To: 	fred@thegalacticzoo.com



Site logo image 	Arya Voronova posted: "What if you wanted to build your 
own USB-C PSU? Good news - it's easy enough! If you ever wanted to 
retrofit a decent DC PSU of yours to the USB-C standard, say, you got a 
Lenovo/HP/Dell 19V-20V charger brick and you've ever wished it were 
USB-C, today is" Hackaday <https://hackaday.com>	


   USB-C For Hackers: Build Your Own PSU
 
<https://public-api.wordpress.com/bar/?stat=groovemails-events&bin=wpcom_email_click&redirect_to=https%3A%2F%2Fhackaday.com%2F2023%2F10%2F12%2Fusb-c-for-hackers-build-your-own-psu%2F&sr=0&signature=acec5ca693c4ac4968ecfd285310a562&blog_id=156670177&user=4f46242fae7d7d506276201ba3b91b8b&_e=eyJlcnJvciI6bnVsbCwiYmxvZ19pZCI6MTU2NjcwMTc3LCJibG9nX2xhbmciOiJlbiIsInNpdGVfaWRfbGFiZWwiOiJqZXRwYWNrIiwiaGFzX2ZlYXR1cmVkX2ltYWdlIjoiMCIsInN1YnNjcmliZXJfaWQiOiI1NjM4MjkzOTEiLCJfdWkiOiI0ZjQ2MjQyZmFlN2Q3ZDUwNjI3NjIwMWJhM2I5MWI4YiIsIl91dCI6ImFub24iLCJlbWFpbF9kb21haW4iOiJ0aGVnYWxhY3RpY3pvby5jb20iLCJwb3N0X2lkIjo2MjQ0MzQsInVzZXJfZW1haWwiOiJmcmVkQHRoZWdhbGFjdGljem9vLmNvbSIsImRhdGVfc2VudCI6IjIwMjMtMTAtMTIiLCJlbWFpbF9pZCI6ImFkNGQ3ZDA1YmQ5MTU5NGJiMWZhZTQ5ODEyMWEyMjA3IiwiZW1haWxfbmFtZSI6Im5ldy1wb3N0IiwidGVtcGxhdGUiOiJuZXctcG9zdCIsImxpbmtfZGVzYyI6InBvc3QtdXJsIiwiYW5jaG9yX3RleHQiOiJVU0ItQyBGb3IgSGFja2VyczogQnVpbGQgWW91ciBPd25cdTAwYTBQU1UiLCJfZHIiOm51bGwsIl9kbCI6IlwveG1scnBjLnBocD9zeW5jPTEmY29kZWM9ZGVmbGF0ZS1qc29uLWFycmF5JnRpbWVzdGFtcD0xNjk3MTMwMDUyLjcxODYmcXVldWU9c3luYyZjZD0wLjAwMjUmcGQ9MC4wMDUyJnF1ZXVlX3NpemU9MyZidWZmZXJfaWQ9NjUyODI2NDRhZGEzMzMuOTI5NDY4OTEmc3luY19mbG93X3R5cGU9ZGVkaWNhdGVkJnN0b3JhZ2VfdHlwZT1vcHRpb25zJnRpbWVvdXQ9MjAmaG9tZT1odHRwcyUzQSUyRiUyRmhhY2thZGF5LmNvbSZzaXRldXJsPWh0dHBzJTNBJTJGJTJGaGFja2FkYXkuY29tJmlkYz0xJmZvcj1qZXRwYWNrJndwY29tX2Jsb2dfaWQ9MTU2NjcwMTc3IiwiX2VuIjoid3Bjb21fZW1haWxfY2xpY2siLCJfdHMiOjE2OTcxMzAxMjA4NjMsImJyb3dzZXJfdHlwZSI6InBocC1hZ2VudCIsIl9hdWEiOiJ3cGNvbS10cmFja3MtY2xpZW50LXYwLjMiLCJfdWwiOm51bGwsImJsb2dfdHoiOiItNyIsInVzZXJfbGFuZyI6bnVsbH0&_z=z>


Arya Voronova

Oct 12

What if you wanted to build your own USB-C PSU? Good news - it's easy 
enough! If you ever wanted to retrofit a decent DC PSU of yours to the 
USB-C standard, say, you got a Lenovo/HP/Dell 19V-20V charger brick and 
you've ever wished it were USB-C, today is the day when we do exactly 
that. To be fair, we will cheat a bit - but only a tiny bit, we won't be 
deviating too much from the specification! And, to begin with, I'll show 
you some exceptionally easy ways that you can turn your DC PSU into a 
USB-C compatible one, with a simple module or a few.

<https://hackaday.com/wp-content/uploads/2023/09/hadoc_building_psu_7.jpg>Turning 
a 20 V PSU into a USB-C PSU feels natural if you want to charge a laptop 
- those tend to request 20 V from a USB-C PSU anyway, so what's the big 
deal? However, you can't just put 20 V onto a USB-C connector - you have 
to add a fair bit of extra logic to make your newly christened USB-C PSU 
safe to use with 5 V devices, and this logic also requires you go 
through a few extra steps before 20 V appears on VBUS. Any USB-C PSU has 
to output 5 V first and foremost whenever a device is connected, up 
until a higher voltage is negotiated digitally, and the PSU may only 
switch to a higher voltage output when it's requested to do so.

Now, for that, a PSU offers a list of profiles, and we looked into those 
profiles in the Replying PD 
<https://hackaday.com/2023/02/22/all-about-usb-c-replying-low-level-pd/> 
article - each profile is four bytes that contain information about the 
profile voltage, maximum current that the device may draw at that 
voltage, and a few other details. For a PSU to be USB-C compliant, the 
USB-C specification says that, in addition to 5 V, you may also offer 9 
V, 15 V, and 20 V.

Also, the specification says that if a PSU supports certain in-spec 
voltage like 15 V, it's also required by the spec to offer all of the 
spec-defined voltages below the maximum one - for 15 V, that also 
requires supporting 9 V. Both of these are UX requirements, as opposed 
to technical requirements - it's easier for device and PSU manufacturers 
to work with a small set of pre-defined voltages that majority of the 
chargers will support, but in reality, you can actually offer any 
voltage you want in the PSU advertisement; at worst, a device is going 
to refuse and contend with slowly charging from the 5 V output that 
you're required to produce.

I'd like to walk you through how off-the-shelf USB-C PSUs work, all of 
the options you can use to to create one, and then, let's build our own 
USB-C PSU from scratch!

Continue reading USB-C For Hackers: Build Your Own PSU 
<https://hackaday.com/2023/10/12/usb-c-for-hackers-build-your-own-psu/#more-624434>

Comment 
<https://public-api.wordpress.com/bar/?stat=groovemails-events&bin=wpcom_email_click&redirect_to=https%3A%2F%2Fhackaday.com%2F2023%2F10%2F12%2Fusb-c-for-hackers-build-your-own-psu%2F%23respond&sr=0&signature=aaa70e4be11860624aef569be1181666&blog_id=156670177&user=4f46242fae7d7d506276201ba3b91b8b&_e=eyJlcnJvciI6bnVsbCwiYmxvZ19pZCI6MTU2NjcwMTc3LCJibG9nX2xhbmciOiJ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joicGhwLWFnZW50IiwiX2F1YSI6IndwY29tLXRyYWNrcy1jbGllbnQtdjAuMyIsIl91bCI6bnVsbCwiYmxvZ190eiI6Ii03IiwidXNlcl9sYW5nIjpudWxsfQ=&_z=z> 


	

------------------------------------------------------------------------

Unsubscribe 
<https://public-api.wordpress.com/bar/?stat=groovemails-events&bin=wpcom_email_click&redirect_to=https%3A%2F%2Fsubscribe.wordpress.com%2F%3Fkey%3Df87ce1ab1b591e6d2c5b429d34202ca8%26email%3Dfred%2540thegalacticzoo.com%26b%3DsbTiXwgHD1d_qKLs_h-PA2Qh8AXsgBzDOyLTgDyRCJUqLvz7FHr20OmvTnbwSqLH_Gb0EmKl_63Biid60_bLN2ATb3RRjqJCiXaeUrPgYKGOfp0qVp-w3uCjoiBTpvjPSz0cQai5twXDXp6MQBJpf6iuX8VBpVLJqg%253D%253D&sr=1&signature=2d379dcf622db6c4d59395632d3fbdae&user=4f46242fae7d7d506276201ba3b91b8b&_e=eyJlcnJvciI6bnVsbCwiYmxvZ19pZCI6MTU2NjcwMTc3LCJibG9nX2xhbmciOiJlbiIsInNpdGVfaWRfbGFiZWwiOiJqZXRwYWNrIiwiaGFzX2ZlYXR1cmVkX2ltYWdlIjoiMCIsInN1YnNjcmliZXJfaWQiOiI1NjM4MjkzOTEiLCJfdWkiOiI0ZjQ2MjQyZmFlN2Q3ZDUwNjI3NjIwMWJhM2I5MWI4YiIsIl91dCI6ImFub24iLCJlbWFpbF9kb21haW4iOiJ0aGVnYWxhY3RpY3pvby5jb20iLCJwb3N0X2lkIjo2MjQ0MzQsInVzZXJfZW1haWwiOiJmcmVkQHRoZWdhbGFjdGljem9vLmNvbSIsImRhdGVfc2VudCI6IjIwMjMtMTAtMTIiLCJlbWFpbF9pZCI6ImFkNGQ3ZDA1YmQ5MTU5NGJiMWZhZTQ5ODEyMWEyMjA3IiwiZW1haWxfbmFtZSI6Im5ldy1wb3N0IiwidGVtcGxhdGUiOiJuZXctcG9zdCIsImxpbmtfZGVzYyI6InJlbW92ZS1zdWJzY3JpcHRpb24iLCJhbmNob3JfdGV4dCI6IlVuc3Vic2NyaWJlIiwiX2RyIjpudWxsLCJfZGwiOiJcL3htbHJwYy5waHA/c3luYz0xJmNvZGVjPWRlZmxhdGUtanNvbi1hcnJheSZ0aW1lc3RhbXA9MTY5NzEzMDA1Mi43MTg2JnF1ZXVlPXN5bmMmY2Q9MC4wMDI1JnBkPTAuMDA1MiZxdWV1ZV9zaXplPTMmYnVmZmVyX2lkPTY1MjgyNjQ0YWRhMzMzLjkyOTQ2ODkxJnN5bmNfZmxvd190eXBlPWRlZGljYXRlZCZzdG9yYWdlX3R5cGU9b3B0aW9ucyZ0aW1lb3V0PTIwJmhvbWU9aHR0cHMlM0ElMkYlMkZoYWNrYWRheS5jb20mc2l0ZXVybD1odHRwcyUzQSUyRiUyRmhhY2thZGF5LmNvbSZpZGM9MSZmb3I9amV0cGFjayZ3cGNvbV9ibG9nX2lkPTE1NjY3MDE3NyIsIl9lbiI6IndwY29tX2VtYWlsX2NsaWNrIiwiX3RzIjoxNjk3MTMwMTIwODYzLCJicm93c2VyX3R5cGUiOiJwaHAtYWdlbnQiLCJfYXVhIjoid3Bjb20tdHJhY2tzLWNsaWVudC12MC4zIiwiX3VsIjpudWxsLCJibG9nX3R6IjoiLTciLCJ1c2VyX2xhbmciOm51bGx9&_z=z> 
to no longer receive posts from Hackaday.
Change your email settings at manage subscriptions. 
<https://public-api.wordpress.com/bar/?stat=groovemails-events&bin=wpcom_email_click&redirect_to=https%3A%2F%2Fsubscribe.wordpress.com%2F%3Fkey%3Df87ce1ab1b591e6d2c5b429d34202ca8%26email%3Dfred%2540thegalacticzoo.com%26option%3Dsettings&sr=1&signature=d56fb795f0ef3611b4bec48ff5618acc&user=4f46242fae7d7d506276201ba3b91b8b&_e=eyJlcnJvciI6bnVsbCwiYmxvZ19pZCI6MTU2NjcwMTc3LCJibG9nX2xhbmciOiJlbiIsInNpdGVfaWRfbGFiZWwiOiJqZXRwY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6InBocC1hZ2VudCIsIl9hdWEiOiJ3cGNvbS10cmFja3MtY2xpZW50LXYwLjMiLCJfdWwiOm51bGwsImJsb2dfdHoiOiItNyIsInVzZXJfbGFuZyI6bnVsbH0&_z=z> 


Trouble clicking? Copy and paste this URL into your browser:
https://hackaday.com/2023/10/12/usb-c-for-hackers-build-your-own-psu/

WordPress.com and Jetpack Logos

Get the Jetpack app to use Reader anywhere, anytime

Follow your favorite sites, save posts to read later, and get real-time 
notifications for likes and comments.

Download Jetpack on Google Play 
<https://play.google.com/store/apps/details?id=com.jetpack.android&referrer=utm_source%3D%notification%26utm_medium%3Demail%26utm_campaign%243Dnew-post> 
	Download Jetpack from the App Store 
<https://apps.apple.com/app/apple-store/id1565481562?pt=299112&ct=new-post&mt=8> 


WordPress.com on Twitter <https://twitter.com/wordpressdotcom> 
WordPress.com on Facebook <https://www.facebook.com/WordPresscom> 
WordPress.com on Instagram <https://www.instagram.com/wordpressdotcom/> 
WordPress.com on YouTube <https://www.youtube.com/c/WordPressdotcom>

WordPress.com Logo and Wordmark title= 
<https://public-api.wordpress.com/bar/?stat=groovemails-events&bin=wpcom_email_click&redirect_to=https%3A%2F%2Fwordpress.com&sr=1&signature=7e34f99b8a8f60a2979293df01c62e5d&user=4f46242fae7d7d506276201ba3b91b8b&_e=eyJlcnJvciI6bnVsbCwiYmxvZ19pZCI6MTU2NjcwMTc3LCJibG9nX2xhbmciOiJlbiIsInNpdGVfaWRfbGFiZWwiOiJqZXRwYWNrIiwiaGFzX2ZlYXR1cmVkX2ltYWdlIjoiMCIsInN1YnNjcmliZXJfaWQiOiI1NjM4MjkzOTEiLCJfdWkiOiI0ZjQ2MjQyZmFlN2Q3ZDUwNjI3NjIwMWJhM2I5MWI4YiIsIl91dCI6ImFub24iLCJlbWFpbF9kb21haW4iOiJ0aGVnYWxhY3RpY3pvby5jb20iLCJwb3N0X2lkIjo2MjQ0MzQsInVzZXJfZW1haWwiOiJmcmVkQHRoZWdhbGFjdGljem9vLmNvbSIsImRhdGVfc2VudCI6IjIwMjMtMTAtMTIiLCJlbWFpbF9pZCI6ImFkNGQ3ZDA1YmQ5MTU5NGJiMWZhZTQ5ODEyMWEyMjA3IiwiZW1haWxfbmFtZSI6Im5ldy1wb3N0IiwidGVtcGxhdGUiOiJuZXctcG9zdCIsImxpbmtfZGVzYyI6Im1hbmFnZS1zdWJzY3JpcHRpb25zIiwiYW5jaG9yX3RleHQiOiIiLCJfZHIiOm51bGwsIl9kbCI6IlwveG1scnBjLnBocD9zeW5jPTEmY29kZWM9ZGVmbGF0ZS1qc29uLWFycmF5JnRpbWVzdGFtcD0xNjk3MTMwMDUyLjcxODYmcXVldWU9c3luYyZjZD0wLjAwMjUmcGQ9MC4wMDUyJnF1ZXVlX3NpemU9MyZidWZmZXJfaWQ9NjUyODI2NDRhZGEzMzMuOTI5NDY4OTEmc3luY19mbG93X3R5cGU9ZGVkaWNhdGVkJnN0b3JhZ2VfdHlwZT1vcHRpb25zJnRpbWVvdXQ9MjAmaG9tZT1odHRwcyUzQSUyRiUyRmhhY2thZGF5LmNvbSZzaXRldXJsPWh0dHBzJTNBJTJGJTJGaGFja2FkYXkuY29tJmlkYz0xJmZvcj1qZXRwYWNrJndwY29tX2Jsb2dfaWQ9MTU2NjcwMTc3IiwiX2VuIjoid3Bjb21fZW1haWxfY2xpY2siLCJfdHMiOjE2OTcxMzAxMjA4NjMsImJyb3dzZXJfdHlwZSI6InBocC1hZ2VudCIsIl9hdWEiOiJ3cGNvbS10cmFja3MtY2xpZW50LXYwLjMiLCJfdWwiOm51bGwsImJsb2dfdHoiOiItNyIsInVzZXJfbGFuZyI6bnVsbH0&_z=z> 


Automattic, Inc. - 60 29th St. #343, San Francisco, CA 94110


-- 
Fred Finster
GhostBSD-Arm64.blogspot.com
t.me/ghostbsd  Telegram Channel
GhostBSD.org  website