All About USB-C: Introduction For Hackers

We’ve now had at least five years of USB-C ports in our devices. It’s a standard that many manufacturers and hackers can get behind. Initially, there was plenty of confusion about what we’d actually encounter out there, and manufacturer-induced aberrations have put some people off. However, USB-C is here to stay, and I’d like to show you how USB-C actually gets used out there, what you can expect out of it as a power user, and what you can get out of it as a hobbyist.

Modern devices have a set of common needs – they need a power input, or a power output, sometimes both, typically a USB2 connection, and often some higher-speed connectivity like a display output/input or USB 3. USB-C is an interface that aims to be able to take care of all of those. Everything aforementioned is optional, which is a blessing and a curse, but you can quickly learn to distinguish what to expect out of a device based on how it looks; if ever in doubt, I’d like to show you how to check.

Continue reading “All About USB-C: Introduction For Hackers”

Throwback: USB Hotplate Used 30 Whole Ports

Once upon a time, USB was still hip, cool, and easy to understand. You could get up to 500 mA out of a port, which wasn’t much, but some companies produced USB cup warmers anyway which were a bit of a joke. However, one enterprising hacker took things further back in 2004, whipping up a potent USB hot plate powered by a cavalcade of ports.

Delicious.

The project was spawned after a USB cup warmer sadly failed to cook a decent fried egg. To rectify this, a souped-up version was built. The cup warmer was stripped of its original hardware, and fitted with six 2-ohm resistors instead. At 5 volts, each would draw 2.5 amps and the total power draw would be on the order of 75 watts. Each resistor would thus need five USB ports to power it to stay under the 500 mA limit, for a total of 30 USB ports in total. Six PCI-to-USB cards were installed in a motherboard for this purpose, providing the requisite ports.  A 500 watt power supply meant the computer had plenty of juice to run the hot plate.

Cooking proved successful, generating a decent amount of heat to brown up some beef. Served with some white rice, it proved an adequate meal, though apparently with a noted taste of electronic components.

This wouldn’t be such a challenge today. USB-C is capable of delivering 100 watts through a single port at 20 volts and 5 amps. However, there’s something joyous and charming about cooking on a ridiculous hotplate running off 30 USB 1.1 ports. The ingenuity is to be applauded, and it is truly a project of its time.

It’s Super Easy To Build Yourself A USB-C Variable Power Supply These Days

Once upon a time, building yourself a power supply required sourcing all manner of components, from transformers to transistors, knobs, and indicators. These days, everything’s a bit more integrated which helps if you’re trying to whip something up in a hurry. This build from [Ricardo] shows just how straightforward building a power supply can be.

The build is a simple mashup, starting with a ZY12PDN USB Power Delivery board. This board talks to a USB-C supply that is compatible with the Power Delivery standard, and tells it to deliver a certain voltage and current output. This is then used to supply power to a pre-built power supply module that handles current limiting, variable voltage output, and all that fancy stuff. It even comes with a screen built-in! Simply slap the two together in a 3D printed case with a couple of banana plugs, and you’re almost done.

All you need then is a USB-C power supply – [Ricardo] uses a portable power bank which allows him to use the power supply on the go. It’s a great alternative to a traditional heavy bench supply, and more than enough for a lot of hobby uses.

We’ve seen a lot of interest in USB Power Delivery recently, and its likely hackers will continue to enjoy the standard for some time to come. If you’ve got your own USB PD hack, be sure to let us know!

Easy USB‑C Power For All Your Devices

[Mansour Behabadi] wanted to harness the high power capability of USB-C using as simple a hardware design as possible. After some research and experimental prototyping, he designed the fpx — an easy to use USB‑C power delivery board. The fpx is an improved follow up to his earlier USB PD project fabpide2 which we featured some time back. However, practical implementation of the USB PD protocol can be a bed of thorns. Negotiating power delivery usually requires a dedicated PD controller coupled with a micro-controller for user control.

With USB PD, a USB-C port can be configured as either a source, a sink, or both and allows connected devices to negotiate up to 100 W (20 V, 5 A) of power. The fpx is based around the popular STUSB4500 PD controller, which does most of the PD heavy lifting. To program the STUSB4500, he used an ATtiny 816 micro-controller, whose UPDI programming and debugging interface consumes lower board real estate.

However, what’s a little bit different is the way the fpx is programmed — by sending binary black and white flashes from any device that can display a web page. Using light isn’t a particularly new way of programming. We’ve seen it used almost a decade back by WayneAndLayne for their Blinky PoV projects, and later by the Electric Imp’s BlinkUp app. The fpx uses a similar method to read flashes of light from a screen which are picked up by a photo-transistor connected to the ATtiny. The ATtiny then communicates with the STUSB4500 over I2C. This eliminates the requirement for special software or an IDE for programming and doesn’t need any physical cable connection. Check out [Mansour]’s blog post where he walks us through the details of how he managed to wrangle the optical programming challenge.

Many of the commercially available USB PD decoy/detector/trigger boards use either solder jumpers or a switch with an RGB LED to adjust Power Delivery Output (PDO). [Mansour]’s method may be a little more robust and reliable. The STUSB4500 can store two separate PDO values and can negotiate with a source according to its capability. If the source cannot offer either of these options, the fpx can either request for a minimal 5 V / 100 mA setting, or disable the output. The fpx is an open source project, accessible on Github. Check out the video after the break for an overview of the fpx.

Continue reading “Easy USB‑C Power For All Your Devices”