Solar-powered ESP32 garden sensor — 6 months on a 6V panel

Asked 2 weeks ago Modified 3 days ago Viewed 11 times
Solar-powered ESP32 garden sensor — 6 months on a 6V panel

Goal: a wireless soil + air sensor I can stake into the garden, powered entirely by sunlight, that runs for at least 6 months without intervention. Got there — has now survived monsoon season unattended.

Power chain

  • 6V / 2W solar panel (mini polycrystalline, ~115×85mm)
  • TP4056 charger module with built-in protection circuit
  • 18650 cell (Samsung 30Q — high capacity + low self-discharge)
  • MCP1700-3302 LDO regulator to give a clean 3.3V to the ESP32

Why a TP4056 with protection: the unprotected variant will happily discharge the cell below 2.5V, killing it. The protected board has a DW01 + 8205A pair that cuts off at 2.4V.

Power budget

  • Wake duration: ~3 seconds (read sensors, transmit, sleep)
  • Wake current: ~80mA average
  • Deep sleep current: ~12µA (measured with the regulator's quiescent draw included)
  • Wake every 15 min → daily energy ≈ 3600J × 0.0008% ≈ negligible compared to a 18650's 40,000J.

Sensors

  • Capacitive soil moisture (Vegetronix or generic capacitive, NOT resistive)
  • BME280 for air temperature, humidity, pressure
  • A photoresistor on an ADC pin for ambient light

Communication

  • LoRa SX1276 module on SPI, talking to a 'base station' ESP32 in my house.
  • Spreading factor 8, bandwidth 125kHz, ~1km line-of-sight more than enough for the garden.
  • Each packet is 16 bytes: sensor ID + 4 readings + CRC. Transmission takes ~70ms.

Enclosure

  • 3D-printed in PETG (UV-resistant, unlike PLA which crumbles in the sun in months).
  • Gore-Tex membrane patch over the air vent — lets vapor pass but blocks water.
  • Soil probe sealed at the cable entry with epoxy + heat-shrink.

Lessons learned

  • Always plan for the worst case (3 days of rain). The 18650 cushions through that.
  • Don't deep-sleep the LoRa module via its own pin — power-cycle the whole regulator.
  • A small reverse-polarity diode on the panel input has saved me twice from accidental short circuits.