Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Hacking together a USB-C charger for a cheap Chromebook (filippo.io)
174 points by laktak on Oct 12, 2020 | hide | past | favorite | 67 comments


If you're looking for a bit more flexibility around the current and voltage setting as well as a more solid mounting option and safety features, take a look at fpx board [1]. fpx is open source.

Disclosure: I'm the author

[1]: https://fpx.oxplot.com/


I love the configuration method! I used something similar for a security token project I did.


Very interesting.

There are so many USB charging standards - I had been thinking that it should be possible to construct a universal USB power converter. (Even in the case where the charger can't supply the watts the device wants, you could accumulate some energy in a small battery large cap and charge intermittently). But I suspect the reason it hasn't been done so far is liability - there are bound to be a few devices that don't play ball and blow up.


I don't have a need for this right now, but I love your method for configuration. It seems really easy and user friendly :)


That's really cool. Will keep it in mind for future projects.


The idea of "hacking together" a charger sounds worrisome on the surface. Does anyone remember "Benson-approved" USB-C chargers? The first generation of USB-C chargers were so bad that a Google Engineer (Benson Leung) had a side-project to test every USB-C cable he could find off Amazon and determine if it correctly followed the USB-C spec.

The reason why he was doing this became clear when one of the cables he tested was so bad that it fried the USB port on his Chromebook Pixel 2015.[0]

[0] https://www.androidpolice.com/2016/02/02/google-engineer-ben...


The title is a bit of a misnomer. They hacked a laptop with a barrel adaptor power supply so they can use a USB-C charger with it. So the issues dealing with USB-C PD aren't really there. (Or exist in the reverse which I suspect is more tolerant?)


In order to carry the USB logo, chargers/cables/connectors/etc must pass a suite of compliance testing to get certification. Specifically for USB-C, you can find details of the USB Power Delivery 2.0/3.0 Compliance Plans at https://www.usb.org/usbc. This of course does not stop cheap knock-offs being made without proper compliance testing.

I think as long as these hacks stay in 'prototype' mode, and is clearly called out as such, then it is fine. Once it goes beyond that (ie for sale without proper testing, etc), then it gets worrisome.


Nintendo Switch has the official USB-C logo on the box and it's not compliant, in fact plugging in the "wrong"(but also USB-C compliant) charger can break the device.


The only chargers to break the switch were putting 9 volts on a low voltage data wire. Definitely not compliant.

The switch has a couple issues with how it requests power but they're minor and mostly on the dock rather than the actual console.


The way around it's done in TFA though (adding a USB-C port to a DC barrel) seems least risky thing you could do to me - assuming you're using a known-good standards-compliant supply, you're only relying on the 'PD trigger' board requesting the correct voltage. Could add OV protection or a regulator if you don't trust it.


> The reason why he was doing this became clear when one of the cables he tested was so bad that it fried the USB port on his Chromebook Pixel 2015.

Nnnnnnot really.

He was checking for cables that were misrepresenting themselves and might cause the wrong amount of current to be drawn.

He found one cable that had the power wires completely backwards. That means it was a very blatant mistake that could just as easily happen to any kind of cable.


I have a 12V camping fridge for use in a car, and when we don't need it, I have it in my office to keep a couple drinks cold for long meetings.

The wall to 12V brick I had was massive, and caused lots of noise on the mains (that could be heard in the speakers).

Eventually I found on Amazon a USB-C to cigarette lighter outlet cable, so now instead I'm using a compact GaN USB-C charger to power it, it works great!


Beware those camping fridges tend to use 10 amps @ 12 V without a thermostat (so not safe for meat long term), which will cost you about ~$150/year at typical electricity costs. That's much more than a full-size fridge...

It's also more amps than USB-C is rated for, so depending on the model of charger and fridge, this might not work reliably.


TBF any compact fridge will likely have higher running costs because part of what makes them compact is way less insulation, otherwise their internal volume would be way too small for most people to accept.


A big part of what makes a deep freeze efficient is that the opening is at the top.

There are refrigerated coolers out there, which have essentially the same structure in miniature.

You still have cheapo compressors, insufficient or bad foam (some foams embrittle when exposed to sealed car temperatures, I don't know if that affects the R value but I wouldn't be surprised), but at least you can fix the seal, and have a form factor people are still familiar with.


I don't run it continually, only for a couple hours on the days when I actually need it, so I'm not worried about power consumption. The small size is rather a plus since it cools down quickly when I need it. It only needs to hold a few bottles of seltzer or coke zero.

It's only rated at 2.8A (34W) so it's within USB-C spec. It can probably exceed the spec when the compressor starts, but it hasn't been a problem.

Mine does have a thermostat control, and it can keep things frozen well. Used it with a portable 220Wh Li-ion battery to keep ice frozen during a party, it kept it frozen solid on a hot day in direct sunlight for 5 hours


Fun to run the math sometimes.

As an engineering estimate the system wide COP of a peltier device is at most 0.05 vs pumped freon running around ten (to one sig fig). So with a solid state peltier device the 30 watt device sucks 1.5 watts of heat out of the fridge and dumps 31.5 watts into the heatsink (your room, eventually). A pumped freon unit like the one in your kitchen would suck 300 watts of heat out of the fridge and dump 330 watts into your room.

Anyway the definition of a BTU can't be more accurate than 1% for a bunch of boring thermodynamic reasons, but a good engineering estimate is one BTU is 1/3 of a watt-hour. So running your cooler will suck about 5 or so BTU out of the fridge every hour.

A BTU unit is very convenient as it changes the temp of one pound of water by one degree. And to one sig fig a 20 oz soda bottle is about a pound. So one bottle in an otherwise empty cooler should drop about 5 degrees per hour in your cooler. Figure a "few" bottles means they'll drop about one degree per hour. Yeah its gonna take "a couple hours" as you state to cool it down.

A pumped freon fridge could cool your soda close to 200 times faster than your cooler. That seems "about right" as a case of beer takes a couple hours to be drinkable.

I'm not sure if there are any residential "convection fridges" on the market. I'm sure the moving parts fan would increase future sales figures. Another interesting idea would be something like "NEST" thermostat to control the cooler temp while using as little power as possible. Might make some interesting startup ideas.


Yeah these things aren't designed to cool things down, they're designed to take something that's already chilled, but in an inconvenient location (such as in your kitchen, past a sleeping infant), and keep it cool in a more convenient location (your home office).

Anyway if you want to check your math, I did a quick experiment. My fridge cooled a 1.5 liter bottle of room temperature (25.6 C) tap water to 18.4 C in one hour, and 11.9 C in 2.


Where'd you get .05? With a 30C difference from side to side your COP should be >.5 if you're running at a reasonable current. When actively cooling something down with around 20C or less difference you might even beat 1!


Take care that you don't fry that outlet cable and the power bank if that fridge is compressor powered. Peltier ones will only leech the battery dry in minutes, but compressors have huge inrush currents when turning on, and many powerbanks and converters aren't exactly built to tolerate overcurrent conditions.


Nice! I like little soldering projects like these. More people should be "brave" enough to start tinkering around with their home electronics.


But maybe not start with power supplies :-) or Valves (Tubes)


Okay, I'm with you on that. :-D


You can now buy ready-made USB-C to <barrel-jack of your choosing here> on Taobao for like a few dollars. It's designed and sold as a complete product and just looks like any other dongle/adaptor cable.


Can confirm they work very well, used one to extend the battery life of a PartyBox 100 (see https://www.reddit.com/r/JBL/comments/ivdkrg/jbl_partybox_10...).

The new USB Power Delivery 3.0 PPS (Programmable Power Supply) standard even supports requesting arbitrary voltages, but I haven't yet found an adapter that is programmable and supports this.



I didn't mean an AC charger, but a PD trigger that I can program to request any voltage I want. Currently only fixed voltages (5V/12V/20V) are available.


I think that's because PD spec is only those voltages (5,9,15 and 20 volts). You'll have to use a regulator or buck converter to get other voltages.


PPS extension allows for arbitrary voltages


Interesting, those PartyBox 100's have very good reviews and I've been considering getting one. How much play time do you get with that power bank?


With the power bank plus the internal battery, it plays for at least 10 hours on full volume, probably 12.

Also the sound is better with the external power bank, as the DSP limits volume and bass response when running on internal power. The PB100 is good value for the money, but don’t expect hifi quality. Its currently the best off-the-shelf solution for something you can still stuff in a backpack, unless you spend the big bucks and go with a Soundboks.

They really half-assed it tho:

- the LED lights are erratic and don't look that great

- the BT range is crap

- no built-in connector to connect external DC power like in the PB300

- internal battery life is not great, just 2400mAh, also not swappable

- no second set of tweeters like in the PB300

- takes a long time to boot (~20secs)

- no app to adjust the DSP or disable the startup sound


I just imported a bunch of them to launch on ebay/amazon/etc. Should be similarly inexpensive.


A showstopper here: some of them use PPS, and some use fixed 20V code.

Very, very few USB PD power supplies support PPS 20V at full 5A.


And even fewer power banks. Until recently not a single one existed that could put out 100W over the whole battery charge, they all switched to 50-60W for the last 50%, which also means they couldn't fully charge laptops like the larger Macbook Pros. But now there is the Zendure SuperTank Pro:

https://www.kickstarter.com/projects/zendure/supertank-pro-t...


And a lot of 65W rated tagged cables tend to melt under full load, and one of which was bundled by one quite major hardware brand whose name starts with "A."

This is why a lot of charger makers went for "workarounds" for 5A cables rather than risk being blamed for setting mismarked cables on fire.

Their cable marked "65W" did not actually work on 5A 15V, but on 3A 20V where it is not the issue, but will melt when used by actual 5A 15V.


Oh that is good to know! I measured 20V/3,?A on my barrel jack adaptor, now wondering if it can actually do 5A as advertised. Is there a way to query the cable for what it will actually report as supported voltages / current?


Easiest way is to get a PD tester. The hard way: page 363 https://usb.org/sites/default/files/USB%20Type-C%20Spec%20R2...


Did some more research. I don't have a linux system with usb-c rn, but one can maybe query the emarker VDO in sysfs: https://people.kernel.org/bleung/

On windows there are the MUTT tools, but looks cumbersome: https://docs.microsoft.com/en-us/windows-hardware/drivers/us...



The 5A modules / cables are advertised as having an e-marker chip, at least in China.


I no longer buy anything without a USB-C port. I hit a snag with my beard trimmer and my first-gen OnePlus bluetooth earbuds, which can only be charged with a USB-A-to-USB-C cable. But other than that, I'm good to go.

I understand the many, many articles that claim it's a mess. And although that may be true, I'm very happy with USB-C.


A USB C to USB C cable should still work. Anker even sell some charge-only ones (or at least, they're only USB 2 inside)


As far as I know, a USB-C charger should never have a hot V+/V- and that is what my beard trimmer requires. EDIT: alias_neo corrected me, and pointed out that it's D+/D- I'm thinking about.

On the other hand, this is expected behavior for a USB-A charger, and thus for a USB-A-to-C cable.


Your beard trimmer is likely missing the 5.1k resistors to GND on the CC pins, which enables the USB-C charger to output 5V. I had several devices (mostly flashlights with integrated battery chargers) that would only charge using A-C cables. After adding the resistors, C-C cables also work.


Probably, yes. I could do some soldering on the beard trimmer, but the electronics in the earbuds are positively microscopic.


Perhaps you mean D+/D-? You won't get very far if V+/V- aren't supplying any current.


Actually, V+ (the correct name is Vbus) not supplying any current is the correct initial state for a USB-C socket. It instead provides a small current on each of the two CC pins (usually through a pull-up resistor on each pin), and only after it detects that the other side is drawing that current (usually through a 5.1kΩ resistor to GND on each pin) will it supply power on Vbus.


Yeah I think you're right! Updated my comment.


The USB-C Madness never seems to stop.


Wait... How does it charge if it does not supply voltage?


Another poster on this same level provided the info! I made an error.


Although power delivery does have complications, I think the real mess will be software.

Sort of like the cat and mouse of lighting cables.


Guessing I have the same beard trimmer as you, with a micro-USB port. It's great for travel but sucks to have to carry around an extra cable now.

I'm thinking of trying to convert it to USB-C, similar to what this guy did: https://youtu.be/V-vFtiDYiIw?t=538


Just a quick heads-up, all the images in this article are stretched.


Fixed, thanks!


When I read "hacking together a charger" I already had visions of people following this blog post poorly and burning down their houses. But fortunately it's just a low-voltage adapter, not a complete charger...


I have the same Chromebook, and have had good results charging it from USB-A via a 5V-12V boost converter with a barrel plug on the 12V end. The one I use [1] was $8 on Amazon back in 2019, and I wouldn't trust it with a high-current load, or leave it unattended while charging - it gets pretty warm charging the Chromebook, enough so that I'm glad I only got it for occasional emergency use with the big 26Ah USB pack that lives on the side of my backpack.

I fully expect it to let the smoke out some day, but with a supply voltage less than half what it's delivering, I don't think it can fail in a way that'll hurt the Chromebook, and until it does I'm happy to have it as an option. And I bet those dinky little un-heat-sinked boost converters from the article likewise get pretty warm, too.

(Also, passive USB-C to USB-A female converters are trivially inexpensive, enough so that I just got a big bag of them so I don't have to care if they disappear on account of being tiny. For a new-build project, it makes sense to go straight to the connector, but for back compat purposes I can definitely recommend having a good supply of them on hand - USB-C cables seem in general to be either expensive or unreliable still, so being able to adapt old cables to new sockets saves a lot of headache. Especially when the old cables are permanently mounted to devices!)

[1] https://www.amazon.com/gp/product/B01ID90K4A - no longer available, but plenty of similar ones are. Don't trust any of 'em, would be my advice


> my awfully cheap ($190 for 4GB of RAM) Samsung Chromebook 3

Wait, for $190 you can buy a better used i3/i5 laptop? At least in pre-codvid times, not sure about today.


> in pre-codvid times, not sure about today

Covid really ramped up prices. The "big" webcams we use in our conference rooms just got 30% more expensive since the start of the whole Covid situation. Prices also seem to stay up high. Also delivery takes 8 weeks or more now instead of one week.

Supply and demand I guess...


I would love a general solution to this problem.

I have a little array of SBCs powered off of a USB charging station, except for the switch, and one SBC that demands a 12V barrel connector.

USB-C to barrel connectors as packaged goods would have been useful. As far as I'm aware USB is the only standard charging connector that allows for negotiating voltage and amperage. We should use it more (or perhaps have another standard that can also handle USB charging).


Here's a nice project built on top of ChibiOS with open sourced hardware / firmware (0)

Comparable to ChromeOS's USB-PD Sniffer Twinkie [1]

[0]: https://hackaday.io/project/20424-pd-buddy-sink

[1]: https://www.chromium.org/chromium-os/twinkie


While looking for the usb charger board i found a lot of charging cable "fakers" for just about any brand of notebook, so no soldering needed..

They are around 5 dollar.


I remember filippo.io from the days of the heartbleed vulnerability! Had a great heartbleed checker that I used several times.


Why not go the extra mile and try to integrate it inside the case? It would make it much more easy to carry around.

I wonder if some adapters couldn't be designed to replace a USB-A port? It would be nice to solder them in place, and pull two extra cables to the charging circuit.


I found the reason why you have a cheap Chromebook more interesting.


What ghost theme is this?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: