## Hardware Zine Article [[!Joule Thief]] **Contents:** - [[#Inspiration]] - [[#System Design]] - [[#Buffers & Handling]] - [[#ESR]] - [[#MPPC]] --- ## Joule Thief ![[Pasted image 20250805165937 1.png]] ### Inspiration **Why Joule Thief?** This project was started as a New Year's Resolution to exhibit at Open Sauce 2025, and was finished 2 days prior to the event. I have no commercial intent with this project. I don't believe that it is particularly novel, and a close look by anyone experienced with energy harvesting & power electronics should rightly reveal it as something akin to a useless machine. ![[Pasted image 20250805165616 1.png]] (The booth at open sauce) I teach myself new skills by designing projects that require to develop the skills I want in order to complete them. I put a high level of effort into this project because I wanted to go through the process of designing a relatively performant embedded system without referencing anyone else's work. Just pick functionalities and features, set a spec, and then flip through datasheets until you find the right combination. Then put it all together and prove that it works. Design the schematic, route a board, write the firmware, etc. and then package it all up and provide thorough documentation on the whole thing. I had never done any of that before and I have no professional experience working as an electronics engineer. I do have an EE degree and currently work in power system analysis for hyperscale datacenters, so this project is actually something like a microcosm of my day job. There is little overlap though, and I consider myself self-taught here. I learned a lot! The classic Joule Thief is a simple party trick involving a dead battery, a hand-wound toroid, and a BJT. It is essentially using the voltage spike from inductive kickback to PWM an LED back to life. I thought it would be fun to build a precise version of that and drain the batteries dry. ![[Conventional_Joule_Thief_with_red_LED.jpg]] My technical motivation for this project was to demonstrate that there is a considerable amount of energy left in alkaline cells when they are discarded, so I set out to build an overengineered energy harvester that could precisely quantify how much energy was actually left in a dead cell, and then store it into a lithium-based battery bank to further prove the point. The Joule Chief was designed to be an Arduino UNO Shield mainboard that allows for the consolidation of harvested energy from an arbitrary number of Joule Thief Extraction Modules collecting energy from different sources at different rates. The Joule Chief serves as both an aggregator and an abstraction layer for the energy harvested. ### System Design ![[Pasted image 20250805170005 1.png]] #### Buffers & Handling ![[99_ARCHIVE/998_ASSETS/dump/2025-1/Joule Thief Buffer Gating.png]] The Joule Chief can handle an arbitrary number of extraction modules each working on arbitrarily weak or intermittent energy sources. This mainboard can effectively accumulate these energy sources and efficiently deposit this energy via intermittent pulses of energy into a rechargeable battery bank for later use while providing precise diagnostics at every stage of the harvesting process. The frequency of these charging pulses is dependent on the strength of the sources. Harvesting a sufficiently powerful source, such as a fresh AA cell, will allow the mainboard to achieve steady-state operation, and a continuous current flow into the 18650 becomes possible. The Joule Chief begins with a low-voltage schottky diode on the output of the extraction module to prevent backflow. After the energy is delivered to the mainboard's input bus, all the energy is stored in a 1F supercapacitor. The Joule Thief Extraction Modules are all set to boost whatever energy source they are targeting to 5V and charge the 1F supercap to 5V accordingly. Readings from the mainboard's INA219 allow the MCU to precisely track the voltage of the supercap as well as the power flowing into this buffer. The MCU is programmed to operate a schmitt trigger with thresholds at 2.5V and 5V, only enabling the 1F supercap's energy to pass through the mainboard's LTC3105 after 5V has been reached, and until 2.5V. This region of input voltage allows the boost chip to operate in a high-efficiency mode. Once the energy has moved through the 1F supercap and through the LTC3105, it is stored in a second 1F supercap connected to the lithium cell charger. The cell charger is controlled by a second schmitt trigger running on the MCU as well. This schmitt trigger keeps the second 1F energy buffer between 4.5V and 5.0V, such that the buffer will always be an appropriate voltage for charging a lithium cell (3.0V to 4.3V). #### ESR ESR is dynamic and affected by a lot of things inside the battery such as electrolyte gradients forming and ionic mobility decay that give it a pretty large time constant, on the order of minutes. The ESR will continuously fluctuate and grow as these chemical factors further inhibit current flow and reduce cell voltage. For an AA with an unloaded Cell Voltage of 1.5V, you might load it for 100-200mA and then read a cell voltage of 1.2 or even 1.0V. A battery tester will tell you the ESR is 100mΩ but just comparing the unloaded vs. loaded cell voltage for a given load current lets you calculate the ESR, and it usually comes out around V/I=3Ω in my experience. Typically when you want to get the maximum power out of a voltage source, you try and set R_load = R_ESR. But our ESR is constantly fluctuating, and will only get worse the longer we load it. Measuring the ESR once and matching it just won't work. Because these chemical ESR factors only worsen the situation the longer and more loaded the battery runs, some PWM or other intermittent loading scheme may come to mind. If you can track the ESR dynamically and match that, what will eventually happen is the load will increase, reducing the burden on the cell, which allows it to catch its breath, and the ESR will decrease slightly. From there, the ESR-tracking-Load will decrease in turn, allowing for increased power output. And the cycle continues as our tracker forces the battery to oscillate right around an optimal point. #### MPPC ![[Pasted image 20250804125610-1.png]] ![[Pasted image 20250804125633 1.png]] I'm using a combo of all the chips involved to create a control loop set to maximize the average power output of the battery. The LTC3105 Boost chip has an MPPC pin. This MPPC pin acts as a 10µA current source. The user places a resistor between this pin and ground in order to generate a voltage based on the value of the resistor. The LTC3105 then reads that voltage and throttles the main inductor's switching patterns in order to ensure that its input voltage matches the voltage seen at the MPPC pin. So now we're producing the ESR formula a bit backwards. We know the unloaded cell voltage, and we are essentially manually selecting the loaded cell voltage by setting the MPPC resistor. ``` Unloaded Cell: 1.5V MPPC Resistor: 100kΩ MPPC Voltage: 10µA x 100kΩ = 1.0V ESR Calculation: 1.5V -> 1.0V means 0.5V drop, produces 400mA current into the LTC3105, thus ESR is 0.5/0.4 = 1.25Ω ``` This works fine, but as the cell decays, the loaded cell voltage remains static. If we were matching ESR as described above, we'd see a loaded cell voltage of exactly 50% the unloaded cell voltage across the entire range as it depletes from 1.5V. Now, we run into a different asymptote, where eventually the cell will reach 1.0V unloaded, and the boost chip will still be set to 1.0V loaded. No voltage drop means no current flow, and the water wheel stops turning. So what we really need to do is make this MPPC voltage adjustable. And the way to do that is to add a digital pot across the MPPC pin so we can arbitrarily modulate the resistance, and thus the voltage setpoint. All we really need for a control loop is a sensor and an actuator. As long as there's some coupling between them, simple algorithms can figure out the rest for us. So we run the energy leaving the battery and entering the boost chip across a shunt meter and get a power reading. Then we hand that to the MCU and tell it to wiggle the digital pot around until it finds the top and stay there. That's all that's going on here. But it manages to deliver superior performance to my bench DC Electronic Load, which is static. I was able to get 400-500mW max out of a fresh AA with the bench load. With the Joule Thief board, I was able to achieve 600-700mW, sometimes upwards of 900-1100mW. In this case, our control loop is running around 10-100Hz, which is far greater than the time constant of these batteries. The result is the Joule Thief can maintain 70-80% extraction efficiency while pulling energy out of the battery as aggressively as possible, faster than the chemistry can react. I don't know what's going on inside the chemistry of the battery to prevent the ESR buildup I was seeing on static load tests. The responsive and dynamic throttling of the effective load seen by the battery allows it to consistently push higher power outputs indefinitely, where static loads would eventually "fatigue" the cell and it would reach a variety of failure conditions such as outputting 50mV,1A (aka Crashing Out). Overall, this isn't really that clever of a solution. I developed an understanding and intuitive feel for what limitations alkaline cells have based on their chemistry, but this schema doesn't require any of that knowledge. It's very simple: find the power throttle, then strap a sensor & MCU to it and tell Claude to make it work better.