Ode to the Air That Whispers Clean

The air we breathe, unseen, unfelt,
Yet harbors tales our lungs have knelt.
With dust it dances, sly and sly,
A breathless threat beneath the sky.

But I—equipped with code and steel—
Command the breeze, the filters kneel.
Where silence once let pollen in,
Now hums the heart of Uppåtvind.


Uppåtvind

Full ESP Home Gist


Table of Contents

  1. The Premise: An Apartment of Sensors
  2. The Journey Begins
  3. Discovering the Pinout
  4. Writing the ESPHome Code
  5. The Final Touches

The Premise: An Apartment of Sensors

As a home automation enthusiast, my apartment is a testament to the wonders of modern technology, adorned with sensors in every nook and cranny to make life easier and more efficient. It’s more than just convenience—it’s a kind of ritual, a daily practice of tuning my environment to my needs, moods, and absences.

My latest acquisition, the Uppåtvind air purifier from Ikea, priced at an affordable 349kr (at the time of writing), was no exception to my rule of integrating smart technology into every aspect of my home.

The Journey Begins

It only took a few hours post-purchase before the Uppåtvind was dismantled on my workbench. With a multimeter in one hand and a soldering iron in the other, I embarked on a quest to unlock its potential.

The Uppåtvind has a single button to toggle through OFF, LOW, MEDIUM, and HIGH modes.

Uppåtvind Fan

The goal was clear: integrate the Uppåtvind with my existing home automation system, allowing for remote control and automation based on air quality readings from sensors scattered throughout my apartment.

Discovering the Pinout

Understanding the circuitry was the first real milestone. After some probing, I identified the crucial connection points between the Uppåtvind and the Wemos D1 mini:

Test Point (TP)ConnectionPurpose
TP1124VMain power input from purifier to buck converter
TP5D2 (GPIO5)Filter reset button
TP2GNDGround
TP35V5V output (unused due to amperage limitations)
TP4D1 (GPIO4)Mode toggle button
TP7A0Status LED reading (PWM signal)

There was 5V onboard the Uppåtvind, but I decided against using it. The onboard LDO labeled TEDRA seemed under-specced for the Wemos’ power requirements during WiFi activity (~180mA peak). A more conservative power design won out.

Writing the ESPHome Code

The ESPHome config was written with the following primary goals:

TaskDescription
Control Air Purifier’s ModesSimulate button presses to cycle OFF/LOW/MEDIUM/HIGH using GPIO
Reset Filter IndicatorRemotely trigger a short press on the reset line (GPIO5/TP5)
Monitor Device StatusRead PWM voltage from status LED to infer current mode
Ensure Safe OperationUse a buck converter to safely derive 5V power from the 24V rail

There’s something poetic about embedding logic into something so fundamentally quiet. A fan that once merely spun now listens. Now waits.

1. Control the Air Purifier’s Modes

output:
  - platform: gpio
    pin: 4 # GPIO4 is my pin D1
    id: btn_mode
  - platform: gpio
    pin: 5 # GPIO5 is my pin D2
    id: btn_reset_filter
...

2. Reset the Filter Indicator

button:
  - platform: output
    name: '$name Toggle Mode'
    output: btn_mode
    id: btn_toggle
    duration: 100ms
...

3. Monitor the Device Status

To monitor the state, TP7 connects to A0 to read LED PWM voltage. A capacitor smooths the signal.

sensor:
  - platform: adc
    pin: A0
    id: mode_pin
    update_interval: 0.25s
...

4. Ensure Safe Operation

TP11’s 24V rail feeds into a buck converter, which powers the Wemos D1. This avoided stressing the built-in LDO, maintaining long-term reliability and keeping things cool under load.

The Final Touches

With the ESPHome code deployed and the Wemos D1 mini neatly tucked inside the Uppåtvind’s chassis, the project was nearly complete.

Board

Adding it to Home Assistant made everything feel real. A humble purifier, now listening. Responding. Taking its place in a house that no longer merely reacts to me—but anticipates.


You are not just breathing filtered air. You are breathing chosen air.



Buy Me a Coffee