Community project
AI-Driven Energy Harvester Booster
Gagan Magadum
Published August 7, 2026 · Updated August 11, 2026
Generated with AIThis project builds an intelligent energy harvesting system that captures power from low-voltage sources and boosts it to usable levels under ESP32 control. The system combines an LTC3105 energy-harvesting controller with a separate 5 V boost stage, gate-drive circuitry, dual current monitoring, and thermal sensing to safely extract maximum power from minimal input while protecting against overtemperature conditions.
The guide provides a complete wiring diagram, full parts list with component values, Arduino firmware with real-time sensor monitoring and OLED display output, and step-by-step assembly instructions covering cold-start circuit preparation, power rail construction, boost stage integration, and safety inspection procedures before first power-up.
Wiring diagram
Interactive · read-only
Pan and zoom to explore the wiring. Remix the project to edit it in your own workspace.
Parts list
Bill of materials| Component | Qty | Notes |
|---|---|---|
| Energy Harvester Input Terminal0.3–1 V | 1 | Two-pin 0.3–1.0 V DC source input for a solar cell or rectified piezoelectric harvester. |
| LTC3105 Energy-Harvesting Boost Controller Module3.3 V configured | 1 | Energy-harvesting boost controller module configured for 3.3 V storage rail. Its MPPC/cold-start function must be set using the manufacturer reference design for the actual harvester source. |
| 3.3 V Low-Quiescent-Current LDO Module3.3 V, ≥500 mA | 1 | Low-quiescent-current 3.3 V LDO fed from the harvested storage rail to supply the ESP32 and low-power I2C devices. |
| Storage Capacitor100 µF, ≥6.3 V | 1 | Low-leakage capacitor on the harvested storage rail. |
| Input Bulk Capacitor100 µF low-ESR, ≥6.3 V | 1 | Low-ESR electrolytic input reservoir across the protected raw input rail. |
| Input Ceramic Capacitor1 µF X7R, ≥6.3 V | 1 | Ceramic high-frequency bypass capacitor across the protected raw input rail. |
| Reverse-Polarity Schottky Diodelow-VF Schottky; verify startup loss | 1 | Series reverse-polarity protection diode between the harvester positive terminal and VIN. Select a very-low-forward-drop part because the source is only 0.3–1 V. |
| 5 V Boost Power StageL1 22 µH; AO3400; SS34; Cout 220 µF + 10 µF; 500 mA PTC; 5.6 V clamp | 1 | External non-synchronous boost power stage comprising L1, Q1, D1, output capacitors, 500 mA polyfuse and 5.6 V TVS clamp. This stage must be enabled only after the storage rail is sufficient; its actual switching frequency, inductor saturation current, gate network, and compensation require bench validation. |
| MCP1407 MOSFET Gate DriverMCP1407; add 10 Ω gate resistor and 100 kΩ gate pulldown at Q1 | 1 | Single MOSFET gate-driver stage powered from the protected 5 V rail. A logic-level input accepts the ESP32 PWM signal and drives the boost-stage MOSFET gate. |
| INA219 Input Current Monitor (0x40)INA219, 0x40, 0.1 Ω shunt | 1 | 3.3 V-powered INA219 monitor configured at I2C address 0x40 with a 0.1 Ω high-side shunt on the protected low-voltage input path. |
| Adafruit INA219 High-Side DC Current Sensor0x41; 0.1 Ω shunt | 1 | INA219 high-side current and bus-voltage monitor breakout. It is powered from 3.3V or 5V and communicates over I2C. Route the measured load current through VIN+ and VIN-; those shunt terminals are part of the power path, not MCU GPIO. |
| DS18B20DS18B20; thermal epoxy or clip to Q1 | 1 | Digital temperature sensor using OneWire protocol |
| SSD1306 OLED128×64, I2C 0x3C | 1 | 0.96 inch 128x64 OLED display with I2C interface |
| 18650 Li-ion Cell3.7 V nominal, protected cell | 1 | 18650 lithium-ion cell, nominal 3.7 V, ~2500 mAh. Common for higher-capacity portable / battery-bank style projects; needs a holder and protection / charger circuit. |
| TP4056 Li-Ion/LiPo charger module with protectionTP4056 with protection; set charge current ≤ available harvested power | 1 | TP4056 single-cell Li-Ion/LiPo linear charger module, 5V USB input, 1A charge current (programmable). Common variants ship with DW01 protection. Pair with battery_lipo_storage for the cell. |
| Protected 5 V Load Output Header5 V output, 500 mA maximum | 1 | Two-pin output connection for a regulated 5 V load. The original 12 V option is intentionally not fitted in this 5 V build. |
| Protected Battery Output Header3.0–4.2 V protected battery output | 1 | Optional protected 3.0–4.2 V battery-output header from the TP4056 OUT terminals. Do not parallel it with the 5 V harvester output without a designed power-path circuit. |
Assembly
7 stepsPrepare the low-voltage source safely
Keep harvester_input disconnected while assembling. Use a solar cell or an appropriately rectified and clamped piezo source rated 0.3–1.0 V. Connect its positive lead to harvester_input VIN+ and its return to harvester_input VIN−. Connect VIN+ through reverse_diode anode A; its cathode K is the protected VIN net. Observe diode polarity: the banded cathode faces protected VIN.
- Tip: At 0.3 V, diode forward drop can prevent useful startup. Select an extremely low-VF protection part or use a designed ideal-diode circuit after engineering review.
- Tip: For a piezo source, fit a bridge rectifier and voltage clamp outside this input before connecting it.
- ⚠ Never connect a bench 5 V supply directly to harvester_input: it bypasses the stated 0.3–1 V design envelope.
- ⚠ A piezoelectric harvester can produce high open-circuit voltages; clamp it before this circuit.
Build the cold-start and 3.3 V control rail
Across protected VIN and GND, fit cin_bulk with its positive lead to VIN and negative striped lead to GND, then fit cin_ceramic in parallel. Connect cold_start VIN to VIN and GND to GND. Connect cold_start VSTORE to storage_cap positive and then to ldo_3v3 VIN; connect storage_cap negative and ldo_3v3 GND to GND. Connect ldo_3v3 VOUT to the 3.3 V rail. Connect cold_start PGOOD to ESP32 GPIO27.
- Tip: Place cin_ceramic close to cold_start VIN/GND and storage_cap close to the cold-start module.
- Tip: Configure the LTC3105 module’s MPPC/cold-start network exactly for the actual harvester, using its reference design before applying input power.
- ⚠ Do not power an ESP32 DevKit from an under-rated 3.3 V LDO; ldo_3v3 must supply at least 500 mA peak with suitable local decoupling.
- ⚠ Confirm VSTORE and LDO input/output voltage ratings before energizing.
Assemble the separate 5 V boost power stage
Build boost_stage as specified: L1 22 µH from the input rail to SW; AO3400 Q1 drain to SW, source to GND; SS34 D1 anode to SW and banded cathode to VOUT; 220 µF Cout electrolytic and 10 µF ceramic from VOUT to GND; 500 mA PTC in the outgoing VOUT path; and a 5.6 V clamp across output after the PTC. Connect boost_stage VIN to ina_input VIN− and its VOUT to ina_output VIN+. Keep all power grounds common.
- Tip: Keep the L1–Q1–D1–Cout loop physically small with short, wide conductors. Keep sensor and ESP32 wiring away from SW.
- Tip: Fit the 100 kΩ gate pulldown from Q1 gate to source and the 10 Ω series resistor between gate-driver output and Q1 gate, as stated in boost_stage.
- ⚠ This discrete PWM boost stage has no proven current-limit or feedback compensation in the supplied topology. Do not energize it or enable PWM until its inductor saturation current, MOSFET/diode ratings, output clamp, and control loop have been bench-characterized.
- ⚠ The 5.6 V clamp is emergency protection, not a regulation method. It can overheat if the converter is uncontrolled.
Wire gate drive and ESP32 control pins
Connect gate_driver VDD to the protected 5 V rail and GND to common ground. Connect gate_driver IN to ESP32 GPIO25 (PWM_GATE), and OUT through the 10 Ω gate resistor to boost_stage GATE/Q1 gate. Connect boost_stage EN to ESP32 GPIO26. Use ESP32 GPIO27 only for cold_start PGOOD. Do not use boot-strapping GPIO0, 2, 5, 12, or 15 for these signals.
- Tip: Verify that the exact gate-driver module accepts a 3.3 V HIGH input at its selected VDD before use.
- Tip: The supplied firmware intentionally keeps the PWM and boost enable off.
- ⚠ Do not connect the gate-driver output directly to an ESP32 pin; the driver output is a 5 V signal intended only for Q1’s gate network.
- ⚠ All modules must share GND for valid PWM and I2C signaling.
Wire the 3.3 V sensing and display bus
Connect VCC and GND of ina_input, ina_output, temp_sensor, and oled to the 3.3 V and GND rails. Make a shared SDA net from ESP32 GPIO21 to both INA219 SDA pins and oled SDA. Make a shared SCL net from ESP32 GPIO22 to both INA219 SCL pins and oled SCL. Set the input INA219 to address 0x40 and output INA219 to 0x41 using their module address jumpers. Connect temp_sensor DATA to ESP32 GPIO4 and fit a 4.7 kΩ resistor from DATA to 3.3 V. Thermally bond the DS18B20 body to Q1 without shorting its leads.
- Tip: Power all I2C modules at 3.3 V so their pull-ups do not drive ESP32 pins above 3.3 V.
- Tip: Keep the INA219 shunt connections as Kelvin-style short pairs where practical.
- ⚠ A 0.1 Ω shunt drops 50 mV and dissipates 25 mW at 500 mA; verify this loss is tolerable on the ultra-low input rail and use a suitably rated shunt.
- ⚠ Do not let an OLED or INA219 breakout pull SDA/SCL up to 5 V.
Connect output, charger, and battery correctly
Connect ina_output VIN− to the protected 5 V rail. Connect load_header VOUT to that 5 V rail and its GND to common ground. Connect charger IN+ to protected 5 V and IN− to GND. Connect charger B+ to battery +V and charger B− to battery GND, observing cell polarity. Connect charger OUT+ and OUT− only to battery_output_header, which is the protected 3.0–4.2 V battery output.
- Tip: Set the TP4056 charge current below the sustained available harvester output. Typical 1 A TP4056 modules are unsuitable for tiny harvesters without resistor modification.
- Tip: Use a protected 18650 cell in a proper insulated holder.
- ⚠ Never connect the TP4056 protected battery output (battery_output_header) directly to the 5 V output. A proper power-path/boost design is required if the battery must power the 5 V load.
- ⚠ The fitted load_header is 5 V only; do not attach a 12 V load.
Inspect before first power
With no battery and no harvester connected, check for shorts between VIN/GND, 3.3 V/GND, and 5 V/GND. Confirm all electrolytic capacitor polarities, SS34 and reverse_diode bands, MOSFET pinout for the actual AO3400 package, and every module’s GND. First test only the cold-start/3.3 V path with a current-limited source appropriate to cold_start. The monitoring firmware may then be deployed with Schematik’s Deploy button; it starts with boost PWM disabled.
- Tip: Measure 3.3 V at the ESP32 rail before attaching the ESP32 and confirm I2C addresses with a scan if a device is absent.
- Tip: Use an oscilloscope and current-limited source before authorizing any boost-stage PWM development.
- ⚠ Do not insert the 18650 backward or work on the circuit with the cell connected.
- ⚠ The submitted firmware is a safe monitoring baseline, not a closed-loop MPPT controller; it intentionally cannot turn the power stage on.
Pin assignments
Board wiring reference| Pin | Connection | Type |
|---|---|---|
| EXT | harvester_input VIN+ → Reverse-Polarity Schottky Diode A | power |
| GND | harvester_input VIN- | ground |
| VIN | reverse_diode K | power |
| VIN | cin_bulk + | power |
| GND | cin_bulk - | ground |
| VIN | cin_ceramic + | power |
| GND | cin_ceramic - | ground |
| VIN | cold_start VIN | power |
| GND | cold_start GND | ground |
| GPIO 27 | cold_start PGOOD | digital |
| GND | storage_cap - | ground |
| 3V3 | ldo_3v3 VIN | power |
| GND | ldo_3v3 GND | ground |
| 3V3 | ina_input VCC | power |
| GND | ina_input GND | ground |
| GPIO 21 | ina_input SDA | i2c |
| GPIO 22 | ina_input SCL | i2c |
| VIN | ina_input VIN+ | power |
| EXT | ina_input VIN- → 5 V Boost Power Stage VIN | data |
| GND | boost_stage GND | ground |
| EXT | boost_stage VOUT → Adafruit INA219 High-Side DC Current Sensor VIN+ | power |
| EXT | boost_stage GATE → MCP1407 MOSFET Gate Driver OUT | digital |
| GPIO 26 | boost_stage EN | digital |
| 5V | gate_driver VDD | power |
| GND | gate_driver GND | ground |
| GPIO 25 | gate_driver IN | digital |
| 3V3 | ina_output VCC | power |
| GND | ina_output GND | ground |
| GPIO 21 | ina_output SDA | i2c |
| GPIO 22 | ina_output SCL | i2c |
| 5V | ina_output VIN- | power |
| 3V3 | temp_sensor VCC | power |
| GND | temp_sensor GND | ground |
| GPIO 4 | temp_sensor DATA | data |
| 3V3 | oled VCC | power |
| GND | oled GND | ground |
| GPIO 21 | oled SDA | i2c |
| GPIO 22 | oled SCL | i2c |
| 5V | charger IN+ | power |
| GND | charger IN- | ground |
| EXT | charger B+ → 18650 Li-ion Cell +V | power |
| EXT | charger B- → 18650 Li-ion Cell GND | ground |
| 5V | load_header VOUT | power |
| GND | load_header GND | ground |
| EXT | cold_start VSTORE → Storage Capacitor + | power |
| EXT | storage_cap + → 3.3 V Low-Quiescent-Current LDO Module VIN | power |
| 3V3 | ldo_3v3 VOUT | power |
| EXT | charger OUT+ → Protected Battery Output Header BAT_OUT+ | power |
| EXT | charger OUT- → Protected Battery Output Header BAT_OUT- | ground |
Firmware
ESP32#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_INA219.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// Forward declarations
void setBoostEnabled(bool enabled);
void readSensors();
void updateDisplay();
constexpr int SDA_PIN = 21;
constexpr int SCL_PIN = 22;
constexpr int PWM_GATE_PIN = 25;
constexpr int BOOST_ENABLE_PIN = 26;
constexpr int PGOOD_PIN = 27;
constexpr int ONE_WIRE_PIN = 4;
constexpr uint8_t OLED_ADDR = 0x3C;
constexpr uint8_t INA_INPUT_ADDR = 0x40;
constexpr uint8_t INA_OUTPUT_ADDR = 0x41;
constexpr uint32_t PWM_FREQUENCY_HZ = 20000;
constexpr uint8_t PWM_RESOLUTION_BITS = 10;
constexpr uint16_t PWM_SAFE_DUTY = 0;
constexpr float OVER_TEMP_C = 80.0f;
constexpr uint32_t DISPLAY_INTERVAL_MS = 1000;
Adafruit_INA219 inaInput(INA_INPUT_ADDR);
Adafruit_INA219 inaOutput(INA_OUTPUT_ADDR);
OneWire oneWire(ONE_WIRE_PIN);
DallasTemperature temperatureBus(&oneWire);
Adafruit_SSD1306 display(128, 64, &Wire, -1);
bool inputMonitorOk = false;
bool outputMonitorOk = false;
bool displayOk = false;
bool powerGood = false;
float mosfetTemperatureC = NAN;
float inputVoltageV = NAN;
float inputCurrentMa = NAN;
float outputVoltageV = NAN;
float outputCurrentMa = NAN;
uint32_t lastDisplayMs = 0;
void setBoostEnabled(bool enabled) {
digitalWrite(BOOST_ENABLE_PIN, enabled ? HIGH : LOW);
ledcWrite(PWM_GATE_PIN, enabled ? PWM_SAFE_DUTY : 0);
}
void readSensors() {
temperatureBus.requestTemperatures();
const float temperature = temperatureBus.getTempCByIndex(0);
mosfetTemperatureC = (temperature == DEVICE_DISCONNECTED_C) ? NAN : temperature;
if (inputMonitorOk) {
inputVoltageV = inaInput.getBusVoltage_V();
inputCurrentMa = inaInput.getCurrent_mA();
}
if (outputMonitorOk) {
outputVoltageV = inaOutput.getBusVoltage_V();
outputCurrentMa = inaOutput.getCurrent_mA();
}
}
void updateDisplay() {
if (!displayOk || millis() - lastDisplayMs < DISPLAY_INTERVAL_MS) return;
lastDisplayMs = millis();
display.clearDisplay();
display.setTextColor(SSD1306_WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.println("Harvester monitor");
display.printf("PGOOD: %s PWM: OFF\n", powerGood ? "YES" : "NO");
display.printf("Vin: %.3f V %.1f mA\n", inputVoltageV, inputCurrentMa);
display.printf("Vout: %.3f V %.1f mA\n", outputVoltageV, outputCurrentMa);
if (isnan(mosfetTemperatureC)) {
display.println("Q1 temp: sensor absent");
} else {
display.printf("Q1 temp: %.1f C\n", mosfetTemperatureC);
}
display.println("Tune MPPT after test");
display.display();
}
void setup() {
pinMode(BOOST_ENABLE_PIN, OUTPUT);
pinMode(PGOOD_PIN, INPUT);
ledcAttach(PWM_GATE_PIN, PWM_FREQUENCY_HZ, PWM_RESOLUTION_BITS);
setBoostEnabled(false);
Wire.begin(SDA_PIN, SCL_PIN);
inputMonitorOk = inaInput.begin();
outputMonitorOk = inaOutput.begin();
temperatureBus.begin();
displayOk = display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
if (displayOk) {
display.clearDisplay();
display.setTextColor(SSD1306_WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.println("Safe startup");
display.println("PWM disabled");
display.display();
}
}
void loop() {
powerGood = digitalRead(PGOOD_PIN) == HIGH;
readSensors();
// This board deliberately does not enable the discrete boost stage.
// A 0.3–1 V source, PWM duty, current limit, inductor saturation limit,
// and compensation must be characterized on hardware before closed-loop MPPT.
const bool thermalFault = !isnan(mosfetTemperatureC) && mosfetTemperatureC >= OVER_TEMP_C;
setBoostEnabled(false || thermalFault);
updateDisplay();
delay(250);
}“Deploy to device” opens this project in Schematik, where you can flash it to your board over USB.
Remix this project
Make it yours in one click
Open a full copy of this project in your own Schematik workspace — diagram, code, parts, and assembly steps included. Swap the sensor, add features, or redesign the whole thing with AI. The author's original stays untouched.