Saltar al contenido / Skip to content
flink;
about Idea lab

A humidifier for my plants

My plants live in a dry corner of the house, so I built them a humidifier. The idea is simple: a submersible pump splashes water onto an ultrasonic disc, the disc vibrates and turns it into mist. The fun was in the details.

The parts

  • An ESP32-C3 SuperMini as the brain
  • A two-channel TB6612FNG driver: one channel for the disc, one for the pump
  • A 5 V submersible pump
  • A 5 V ultrasonic disc
  • A 5 V / 2 A power supply and a big capacitor next to the driver
  • A 3D-printed mount and box in matte black PLA

Each driver channel is locked to a single direction and power is set by PWM at 20 kHz, above the audible range, so nothing whines.

The golden rule: water first

An ultrasonic disc running dry heats up and dies quickly. So the order is non-negotiable: the pump starts (with a soft ramp, so the current surge doesn't reset the board), there's a two-second wait for the water to reach the disc, and only then does it vibrate. Shutting down goes the other way: disc first, then pump. And if the pump stops for any reason while the disc is waiting its turn, the disc never starts.

The box

It's three parts: a mount that sits on the jar's mouth, a box that hangs outside with the electronics, and its lid. That way the water stays inside the jar and the boards stay outside, away from the mist.

Drag to rotate: the open box with the ESP32-C3 (top) and the TB6612FNG driver (bottom), and the lid beside it. The boards are simplified stand-ins in approximate positions.

Download the STLs (matte PLA):

The code

An Arduino sketch for the ESP32C3 Dev Module, no external libraries (WiFi, WebServer and mDNS ship with the ESP32 core). Before compiling, copy config.h.example to config.h. The web interface is off (USAR_WIFI 0); set it to 1 if your board's WiFi works and fill in your network in config.h.

What I learned along the way

A 1k resistor that prevents a puddle. During the first milliseconds of boot, before any code runs, the ESP32's pins are floating. If the pin that enables the driver floats high, the pump can switch on by itself for an instant, and with a primed pump that means water outside the container. A 1k resistor to ground on that pin guarantees the driver always boots disabled. The internal pull-down doesn't help: it only exists once the software sets it up, and the dangerous moment is right before that.

The WiFi that never showed up. I had a local web interface to control it from my phone, but this board's radio turned out to be dead: it won't join any network or even bring up its own. Instead of fighting it, I left it running offline, with a single button as the only control. The web interface is still in the code, ready to come back with a one-line change when I swap the board.

These days it runs its own cycle: a short burst when you plug it in, then 40 seconds of mist every 6 hours. The plants haven't complained. 🌿🤓

Originally published on Instagram