Tiny ’90s Laptop Gets Modern Power

The laptop to have here in the 2020s varies depending on who you ask, perhaps a Framework, or maybe a ThinkPad. Back in the 1990s the answer might have included a now-forgotten contender, because in that decade Toshiba made a range of legendarily tough chunky grey machines. Of these the smallest was the Libretto, a paperback book sized clamshell design which was an object of desire. It’s one of these that [Robert’s Retro] has upgraded to use USB-C power instead of the original power brick.

The full video is below the break, and while it first deals with replacing a defective screen, the power part starts just before 22 minutes in. As you’d expect it involves a USP-C PD trigger board, this time at 15 volts. It’s mounted in a small 3D printed adapter to fill the space of the original jack, and requires a tiny notch be removed from the corner of its PCB to fit round the motherboard. The rest of the video deals with reassembling the machine and tending to mishaps with the ageing plastic, but the result is a Libretto with a modern charging port.

Naturally a machine with a Pentium CPU and 32 megabytes of RAM is in of limited use in modern terms, but these Librettos remain very well-designed tiny PCs to this day. It’s great to see them still being modified and upgraded, even if perhaps there’s a limit to how far you can push their computing power. We’ve encountered the Libretto before a few times, such as when one was used to retrieve data from an old Flash card.

Continue reading “Tiny ’90s Laptop Gets Modern Power”

A devboard with the CH32V003, with a few resistors and bodges, with a USB-C cable plugged into it, and a programmer plus an extra probe attached.

USB PD On CH32V003 Teaches You Everything

How do you talk USB Power Delivery (PD)? Grab a PHY? Use a MCU with one built-in? Well, if you’re hardcore enough, you can do it with just a few resistors and GPIOs. [eeucalyptus] shows you their implementation of USB-PD on a CH32V003, which has no PD peripheral. This includes building a PD trigger, completely open source, and walking you through the entire low-level PD basics, too!

It helps that CH32V003 is a 32-bit MCU with a good few resources and peripherals, for instance, an internal comparator. Other than that, you don’t need much in terms of hardware resources, but you do need a steady hand — parts of the firmware had to be written in assembly to keep up with PD timing. Want to tinker with the fruit of this research, perhaps, further build upon the code? There’s an example board on GitHub, too!

Want to try your own luck with this method? There’s a schematic, and logic analyzer captures, and a board to refer to. Again, more than enough information on every single low-level detail! Otherwise, grab an MCU pre-programmed to talk PD, maybe a trigger board chip, or maybe even a PD PHY and implement PD communications with it directly – it’s pretty easy!

We thank [Julianna] for sharing this with us!

The splitter with a 3D-printed case and three yellow cables coming out of it, powering two phones and one powerbank at the same time

Split A USB-C PD Port Into Three Port-ions

There’s no shortage of USB-C chargers in all sorts of configurations, but sometimes, you simply need a few more charging ports on the go, and you got a single one. Well then, check out [bluepylons]’s USB-C splitter, which takes a single USB-C 5V/3A port and splits it into three 5V/1A plugs, wonderful for charging a good few devices on the go!

This adapter does things right – it actually checks that 3A is provided, with just a comparator, and uses that to switch power to the three outputs, correctly signalling to the consumer devices that they may consume about 1A from the plugs. This hack’s documentation is super considerate – you get detailed instructions on how to reproduce it, every nuance you might want to keep in mind, and even different case options depending on whether you want to pot the case or instead use a thermal pad for a specific component which might have to dissipate some heat during operation!

This hack has been documented with notable care for whoever might want to walk the journey of building one for themselves, so if you ever need a splitter, this one is a wonderful weekend project you are sure to complete. Wonder what kind of project would be a polar opposite, but in all the best ways? Why, this 2kW USB-PD PSU, most certainly.

Design Review: USB-C PD Input For Yaesu FRG7700

Today is another board from a friend, [treble], who wants to convert a Yaesu FRG7700 radio to USB-C PD power. It’s yet another review that I’ve done privately, and then realized I’ve made more than enough changes to it, to the point that others could learn from this review quite a bit. With our hacker’s consent, I’m now sharing these things with you all, so that we can improve our boards further and further.

This board’s idea is thought-out and executed well – it replaces a bespoke barrel jack assembly, and is mechanically designed to fit the screw holes and the free space inside the chassis. For USB-PD, it uses a CH32V003 coupled with FUSB302 – I definitely did help pick the latter! For mechanical reasons, this board is split into two parts – one has the USB-C port, whereas the other has the MCU and the PD PHY.

In short, this board is a PD trigger. Unlike the usual PD triggers, however, this one is fully configurable, since it has a 32-bit MCU with good software support, plus, the PD PHY is also well known and easily controllable. So, if you want special behavior like charger-power-dependent profile selection for powering a static resistance load, you can implement it easily – or, say, you can do PPS for variable voltage or even lithium ion battery charging! With a bit of extra code, you could even do EPR (28 V = 140 W power) with this board, instantly making it into a pretty advanced PD trigger, beyond the ones available on the market.

Also, the board has some PCB art, and a very handy filter to get some of the USB-C charger noise out. Let’s take a look at all of these!

Current Flow Improvements

Continue reading “Design Review: USB-C PD Input For Yaesu FRG7700”

A Basic USB-C Primer

Over the last five years or so there has been a quiet take-over of the ports on laptops, phones, and other devices, as a variety of older ports as well as the familiar USB A and micro USB sockets have been replaced by the now-ubiquitous USB-C port. It’s a connector which can do so many things, so many in fact that it bears a handy explanation. The Electromagnetic Field 2022 hacker camp has been quietly uploading videos of its talks, and a recent one has [Tyler Ward] explaining the intricacies of the interface.

Many of you will be familiar with XKCD number 927 which makes a joke about proliferating connector standards, and it’s evident that USB-C is a rare case of a connector which bucks the trend of simply making another standard, and has instead created something with which it makes sense to replace what went before. We learn about the intricacies of inter-device communications and USB-PD, and the multiple high-speed connection  lanes shoehorned into it. That one small connector can plug into a laptop and provide power, USB peripherals including network, and display, is nothing short of amazing. Take a look at the video below the break, and if you’re interested in diving deeper, have a look at our colleague [Arya Voronova]’s USB-C for hackers series.

Continue reading “A Basic USB-C Primer”

USB-C For Hackers: Program Your Own PSU

Last time, I showed off a few ways you can convert an existing PSU to USB-C duty, and zoomed in on a particular way you can use to convert one of the ever-abundant 18 V – 20 V laptop PSUs to USB-C. All we have left is to write software for it, and I’ll explain how it works. There’s also that one cool USB-C secret I’ve found out, but you’ll have to read on to find out more.

From the last article, we have a board that has an RP2040 and FUSB302 combo on it, which takes a 20 V DC PSU input from a laptop brick, and can switch either 5 V, 20 V or 0 V to its USB-C socket using FETs. The USB-C communication firmware is simple enough, but there’s caveats, especially regarding safety. Let’s go through those!

The Code Logic

VBUS has to be non-powered by default – we only supply 5 V when the FUSB302 detects a 5.1 kΩ pulldown on one of the CC lines. After supplying 5 V, we send out PSU capability advertisements, of the kind that we’ve learned to parse in the Replying PD article – and whenever we get a Request, we have to switch to the requested profile, connecting the voltage rail requested to the FET. I opt to not do any current consumption control in this design, assuming a well-behaved device, but you theoretically should do that. It wouldn’t be hard to add a high-side current sensor, say, something from Analog Devices – I just don’t want to do that now, especially given that I’m already using two of the exposed ADC pins to do Lenovo/HP PSU capability detection instead, one is used up for VBUS measurement, and the fourth is used for VIN (20 V rail) measurement – that’s four ADCs, which is as much as the RP2040 has got. However, if I ever need more ADCs, I can add an analog mux like 4051 in the next version! Continue reading “USB-C For Hackers: Program Your Own PSU”

USB-C For Hackers: Build Your Own PSU

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.

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 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”