summaryrefslogtreecommitdiff
path: root/posts
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.org>2025-08-03 13:21:54 -0400
committerJakob L. Kreuze <zerodaysfordays@sdf.org>2025-08-03 13:21:54 -0400
commit9df8cb9cfa56f694ae10cfc0b9e9fd4427cc3c72 (patch)
tree1a35e9c8390f62ed1acad5f03c8a5ea1c5c82ff7 /posts
parent41482084ad227de1a82b4ee1fbc523ad57a7e8b9 (diff)
[posts] USB-PD is Pretty Cool: First draft
Diffstat (limited to 'posts')
-rw-r--r--posts/usb-pd-is-pretty-cool.org173
1 files changed, 173 insertions, 0 deletions
diff --git a/posts/usb-pd-is-pretty-cool.org b/posts/usb-pd-is-pretty-cool.org
new file mode 100644
index 0000000..e5ffb2f
--- /dev/null
+++ b/posts/usb-pd-is-pretty-cool.org
@@ -0,0 +1,173 @@
+#+TITLE: USB-PD is Pretty Cool
+#+DATE:
+#+TAGS: writeup hardware diy 3d-printing
+#+META-TAGS: (("twitter:card" . "summary") ("twitter:site" . "@0daysfordays") ("twitter:creator" . "@0daysfordays") ("og:description" . "An attempt to document my experiences and rationale for wanting to use a PinePhone, as well as my thoughts on mobile Linux in general.") ("og:image" . "https://jakob.space/static/image/pinephone-1.jpg"))
+
+Alternatively, "Putting Too Much Thought Into Lunch," or "Often, High School Physics is All You Need." This is a device I built for warming a meal away from home. A relatively simple solution to the problem of needing to feed yourself
+
+just pack a sandwich or something that doesn't need to be warmed up, but especially during the cold winters of D&C, sometimes you just want a whole bowl of soup.
+
+If I'm going to be away from home during a mealtime, I'll bring my food with me so I can avoid having to buy awful takeout or an overpriced restaurant experience. The problem is that, unless you're bringing something like a sandwich that's meant to be consumed cold, you need some way to warm the food you've taken along with you. During a typical workday, this is no problem, since there's a microwave in the breakroom. Anywhere else, though, and I'm probably out of luck. Or, I was, until I built my own solution, which I'd like to share with you today.
+
+
+
+Coming of age during the COVID- 19 pandemic meant that I was accustomed or comfortable with the idea of not doing any traveling in the foreseeable future. Unfortunately, with my new job, the reality is that I have to travel a lot. So may as well come up with a solution.
+
+As you should do, or as any good engineer should do, you need to compare existing solutions to see whether or not they solve your problem. Because sometimes it makes more sense to buy than to build. See, not invented here syndrome. As you can probably predict from the length of this article, I decided not to, or I did not find any of the existing solutions to be suitable. I'll go through each one that I considered and explain why they did not suit my need, because that is what drives the requirements for this project.
+
+One thing with the heating pad is that you have to consider the thermal conductivity of your dish. I started with Pyrex Glass, which has a okay thermal conductivity, but compared to something like stainless steel, it's actually more of an insulator, so it takes longer for your food to warm up, but when it is warmed, you eat all stay warm. The stainless steel, it warms up much faster, however, when you take the dish out of the bag, it tends to cool off. Fortunately, this is something that you can work around with, work around fairly easily, by just not taking the dish out of the bag and instead eating it out of the bag
+Another consideration relative to thermal conductivity is the thermal conductivity of your food. Something that is homogenous like a soup is going to warm very well, but if you have a dish that's got rice, some refried beans, some vegetables, some chicken in it. It's actually going to, and you just put it on the heating element, it's not going to warm up that well. However, this is another thing that's relatively easy to work around, is you can add a little bit of water to the bottom of the dish, and that water is going to turn into steam, which will warm the food.
+
+I didn't have any electronics experience, but I basically knew what I needed to do. I wanted something that generated heat, so a heating element, and I needed some way to power it. I started by finding a suitable thermal element or heating element. I started by looking at PTC or positive thermal coefficient here, but ended up with a standard resistive heater. Why, you might ask? I don't know. It just seemed to make sense. I'm going off of vibes here because I don't have a background electronic design. Once you have the heating element, all you gotta do is run some power through it. Power is made up of voltage and current, so I looked at the specs for the heating element I just bought. 12 volts. Okay, 20 watts. Okay, so I need to run about 1.7 amps through this. At 12 volts. And I know that I want to be able to power this off of USB-C because I can get battery banks that have USB-C out. So, I'll use a USB-C power delivery trigger module as my power source. And I'll run that through the heating element. Okay, simple enough, except if I want 100 watts, which I do because I'm going to have four of these heating elements. Then I need 20 volts power delivery module because that's just how the standard works. But I know that I can convert 20 volts to 12 volts using a buck converter. In retrospect, a different, a regulated component to do look up what the name of that is.
+The buck converter is going to give me pretty good efficiency though, so the drop in voltage is going to result in an increase in current that I can use. I'm going to wire all of the heating elements in parallel, because for my understanding of parallel circuits, the current is equally distributed across all the elements that are in parallel. So if I drive 80 watts, I should be driving 20 watts through each of the heating elements, which is desirable. And then in addition to the difference in voltage, I'll throw in a thermometer or a thermal regulator so that I can configure the temperature. I'm probably going to want to be running this at the maximum temperature, but you never know, and it gives me some data on whether or not the device is actually working and getting my food hot. Thanks for watching. Thank you.
+
+
+The Sabbath heat is something I bought a couple of years ago and used when I went to a conference, but otherwise I haven't really used until recently. It's pretty good, but it requires an outlet, which is a problem, because it takes about an hour and a half to warm up a reasonably sized meal to the temperature that I like. I am probably moving around quite a bit to the point that I can't sit by an outlet for an hour and a half. So a solution that I've tried is getting these relatively large batteries that have an inverter built in, which basically gives me a portable wall outlet. The problem is these batteries are heavy and massive. So carrying them around during travel is just shitty.
+I would much rather have that space in my backpack available for something like a steam deck or maybe my Oculus Quest.
+
+Of all the solutions I've outlined, this is the one that's worked best, but that issue about the space and the weight is one that I wanted to address. So I decided to build, essentially, the same thing, except instead of being powered by 120 volt AC outlet to do, look up the NEMA code for that, I'll build one that's powered by USB-C. Why USB-C, because the standard has USB-C power delivery, which allows me to drive extremely high-power loads. If you've used an electric stove, an induction cooktop, an electric dryer, or anything of the like, you know that it takes a lot of power to warm something up, so we need high power. In the case of USB-C power delivery, we can actually drive hundreds of watts through our load. Ultimately, it comes down to the power source on what wattage can support. I have chargers that support 100 watt output, and I was able to find a couple of batteries that support 100 watt output as well. I bought three of them combined, weighs less, and is less compact than any of the single batteries with the built-in inverter. The other benefit is that their capacity is much less specifically less than the travel safety administration's arbitrary limit of 100 lot hours, which means I should have no issues taking this past airport security. I also don't necessarily have to run it off of a battery because USB-C can be plugged into a wall with a wall wart. As I mentioned I have chargers that output 100 watts so if I do have an outlet available I can just plug it into the wall. I always have my 100 watt wall warts with me. I don't know what I'm going to do. I don't know what I'm going to do.p to do, mention that the cable has to support 101 output as well.
+
+#+CAPTION: The diagram is almost too simple to warrant drawing out.
+[[./food-warmer-circuit.svg]]
+
+* Solution 0: Use a Microwave at a Wawa or 7/11
+
+You basically have no idea if a convenience store is actually going to have one that works and lets you use it to warm things besides food you buy from the convenience store.
+
+I had the idea for a crowdsourced map of microwave ovens along popular travel corridors but I'm sure I'm the only person who would use it.
+
+Doesn't work for rail or air travel.
+
+* Solution 1: Bring a Microwave With You
+
+This is an absurd solution, but something I've done in the past, notably when I drove home during Thanksgiving and Christmas of 2024. The problem is that you have to find an outlet, which are ubiquitous at rest areas but nowhere else. And along the I-95 corridor, there are some states where rest areas have plentiful CCS charging stations, and some where they do not. Notably New Jersey.[fn:1]
+
+One thing you can do is get a battery and use that to power the microwave. Great, an extra thing that's incredibly heavy. I actually haven't tried this, I just went onto the next solution
+
+Doesn't work for rail or air travel.
+
+* Solution 3: Dehydrate Food, Rehydrate on Hotplate
+
+Severely limits what you can bring with you. Probably the strangest looking of all the solutions.
+
+* Solution 2: Bring a Heating Element
+
+SabotHeat
+
+Even if I'm trying to build a different solution, this was money well spent since the battery gets plenty of use otherwise for solar experiments
+
+Works fairly well for rail travel. On Amtrak, the outlet next to the seat is powerful enough to for the SabotHeat. Presumably works for air travel because the batteries are within the range of "two spare larger lithium ion batteries acceptable with airline approval", but I haven't tried that yet.
+
+The batteries are extremely bulky and heavy, though. So let's improve.
+
+* New Solution: USB-C Heating Element
+
+Can be powered on typical battery banks (saves [TODO] lbs, [TODO] cu in), more efficient since there's no intermediate conversion to AC necessary, can theoretically get hotter temperatures.
+
+---
+
+This should work in theory, but as the title suggests, I have no experience, so let's check myself.
+
+* Experiments
+
+Started with one thermistor.
+
+Thermistors aren't polarized so I can connect them in any direction. Connect them in parallel
+
+#+BEGIN_EXPORT html
+<table class="wikitable floatright" style="text-align:right">
+ <caption>USB PD Rev. 1.0 source profiles<sup id="cite_ref-PD1.0_91-0" class="reference"><a href="#cite_note-PD1.0-91"><span class="cite-bracket">[</span>69<span class="cite-bracket">]</span></a></sup>
+ </caption>
+ <tbody><tr>
+ <th>Profile
+ </th>
+ <th>+5&nbsp;V
+ </th>
+ <th>+12&nbsp;V
+ </th>
+ <th>+20&nbsp;V
+ </th></tr>
+ <tr>
+ <th>0
+ </th>
+ <td colspan="3" data-sort-value="" style="background: var(--background-color-interactive, #ececec); color: var(--color-base, inherit); vertical-align: middle; text-align: center;" class="table-na">Reserved
+ </td></tr>
+ <tr>
+ <th>1
+ </th>
+ <td rowspan="5" valign="top">3.0&nbsp;A, 15&nbsp;W<sup id="cite_ref-default-profile_92-0" class="reference"><a href="#cite_note-default-profile-92"><span class="cite-bracket">[</span>a<span class="cite-bracket">]</span></a></sup>
+ </td>
+ <td data-sort-value="" style="background: var(--background-color-interactive, #ececec); color: var(--color-base, inherit); vertical-align: middle; text-align: center;" class="table-na">—
+ </td>
+ <td rowspan="3" data-sort-value="" style="background: var(--background-color-interactive, #ececec); color: var(--color-base, inherit); vertical-align: middle; text-align: center;" class="table-na">—
+ </td></tr>
+ <tr>
+ <th>2
+ </th>
+ <td>1.5&nbsp;A, 18&nbsp;W
+ </td></tr>
+ <tr>
+ <th>3
+ </th>
+ <td rowspan="2" valign="top">3.0&nbsp;A, 36&nbsp;W
+ </td></tr>
+ <tr>
+ <th>4
+ </th>
+ <td>3.0&nbsp;A, 60&nbsp;W
+ </td></tr>
+ <tr>
+ <th>5
+ </th>
+ <td>5.0&nbsp;A, 60&nbsp;W
+ </td>
+ <td>5.0&nbsp;A, 100&nbsp;W
+ </td></tr>
+ <tr>
+ <td colspan="4"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239543626"><div class="reflist reflist-lower-alpha">
+ <div class="mw-references-wrap"><ol class="references">
+ <li id="cite_note-default-profile-92"><span class="mw-cite-backlink"><b><a href="#cite_ref-default-profile_92-0" aria-label="Jump up" title="Jump up">^</a></b></span> <span class="reference-text">Default start-up profile</span>
+ </li>
+ </ol></div></div>
+</td></tr></tbody></table>
+#+END_EXPORT
+
+** First Challenge: Why Am I Getting 12 Volts?
+
+On my desk is a 175 watt power supply with a handful of USB ports, a few of which are USB-C PD. Three are labeled 100W, so I grabbed one and plugged the ammeter and trigger module into the unoccupied one. The ammeter read 12 volts.
+
+Well, I suppose that gives me a convenient way to experiment without the buck converter, since the heating elements are rated for 12 volts anyway. I connected one heating element across the terminals, which drew a touch over 20W and the heating element got warm. I connected two in parallel over the terminals and... WTF? The voltage drops to [TODO] volts and the current increases.
+
+Through some experimentation, I came to learn that the reason I was getting 12V across the terminals is because my power supply is mis-labeled. Three of the ports are labeled "100W", but in reality, only two of them support that much power. The one I was plugging the trigger module into only supported 20V. Alternative explanation: two of them support 20V output and the trigger module only supports 100W when the voltage across the terminals is 20V. I don't have a datasheet so I'm flying blind, but when I do plug the module into the other 100W ports I do get 20V and I am able to connect all four elements in parallel.
+
+After learning this, I checked the battery banks and... yes! I do get 20V when I plug into the more powerful USB-C port, so we should be good to go for warming food.
+
+** Whoops, Over-Volted the
+
+My amnesiac ass forgot that the temperature controller was rated for 12V and put it before the buck converter. Whoops.
+
+* Making Sure I Don't Melt The Bag
+
+I had a (probably irrational fear) of the heating elements getting so hot that they melt or burn the containing bag, so I wanted to put something down to insulate the bag and prevent that, akin to how the SabotHeat element has one hot surface and the rest is plastic.
+
+I had a baking sheet I received as a free gift when I ordered some artificial flavorings from a vendor a couple months ago. I hadn't used it, and I usually don't use any sort of parchment paper on my baking sheet, so I think it would get more use being the insulator for this application. If it's designed to withstand oven heats, I'm imagining it should do fine in direct contact with some regulated heating elements.
+
+* You're Really Going to Travel With That?
+
+If the American [[https://en.wikipedia.org/wiki/Transportation_Security_Administration][Transportation Security Administration]] is willing to peculate my lawfully-owned lock picks under the guise that sharp things, however small, could be dangerous, they would almost certainly blow a gasket seeing me try to travel with a jumble of wires and a LCD display reminiscent of al-Qaeda's [[https://en.wikipedia.org/wiki/Casio_F-91W#Usage_in_terrorism][watch of choice]]. So let's build a nice enclosure for all of the electronic components.
+
+I'll gladly take the excuse to break out the 3D printer I haven't used in ages.
+
+Unfortunately the FreeCAD package in Gentoo is broken so I had to use the AppImage.
+
+* Conclusions
+
+What's that? "Productize?" Probably not. First, my job keeps me far too busy to meaningfully engage in any sort of side-hustle. Second, I'm certain this isn't the most sound solution. As I stated in the introduction, I have a very limited background when it comes to electronics. If I were going to turn this into a product to sell, I would probably recruit my electrical engineer brother to look over the design and manufacturing process.
+
+For that reason, consider the design open hardware. This post is CC-BY-SA 4.0. The design is certainly too simple to protect under copyright or any sort of open hardware license, so if you want to turn this into a product, go wild. Just let me know if you do, so I can lose sleep at night over my decision not to commercialize my silly electronics project.
+
+That said, if you want one but lack the skill to construct it yourself, send me an email and I would be happy to build one for the cost of materials and labor.
+
+---
+
+[fn:1] At the time, I didn't have Ford's NACS adapter. These days, I have one but avoid the Tesla Supercharger network on personal principle.