ESP32 & ESP8266

ESP32-S3 Air Purifier Built Into a Trash Can Tracks Dust and VOCs

ESP32-S3 Air Purifier Built Into a Trash Can Tracks Dust and VOCs

Store-bought air purifiers with a nice air-quality screen can run into the hundreds of dollars, yet the core of one is just a fan pushing air through a filter. A maker going by Next Builder proved how little stands between you and your own version by turning an 18-liter stainless steel trash can into AirSense, a Wi-Fi connected purifier with a live dashboard.

What AirSense actually is

From the outside it looks like a retail appliance: a custom intake grille, a polished metal body and a small color screen. Inside sits a cylindrical replacement filter made for the Xiaomi Air Purifier 4 Lite. Picking an off-the-shelf filter was a smart call, because spares stay cheap and easy to find long after the build is done. Air is pulled through by the motor and blades salvaged from a 150 mm exhaust fan, held in place by a motor mount and filter base designed in Fusion 360 and printed.

The “smart” part comes from a Waveshare ESP32-S3 board reading two sensors. An optical dust sensor estimates particulate levels by measuring how much light gets scattered by passing particles, while a BME680 reports gas readings (VOCs), temperature, humidity and pressure.

Under the hood

  • Display: a 2.4-inch LCD running an LVGL interface that shows air quality, filter condition and Wi-Fi status.
  • Sensors: the BME680 talks over I2C, so it only needs SDA, SCL, 3.3V and ground. Keep the wires short and check whether your breakout already has pull-up resistors before adding your own.
  • Fan control: a relay switches the 220V AC exhaust fan on and off from a GPIO pin.
  • Cloud: Arduino IoT Cloud logs readings over time and lets you start the purifier from your phone while you are away.

The tricky part is that 220V relay. Mains wiring inside a metal can is a real shock hazard if anything comes loose. For a school or thesis build, swap in a 12V DC fan driven by a logic-level MOSFET with PWM. You lose the mains risk and gain variable fan speed, which lets the ESP32 ramp airflow up when the dust reading spikes instead of just flipping a relay.

Build it yourself

Next Builder published a full build guide plus the firmware, CAD files and wiring diagrams on GitHub, all linked from the original write-up on Hackster: hackster.io/news/taking-the-trash-out-of-the-air. Start on a breadboard with just the ESP32-S3, the BME680 and the dust sensor, and get stable readings printing to Serial Monitor before you touch the fan or the LVGL screen. Once the numbers look sane, a classroom air-quality logger is already done, and the purifier becomes a second phase you can add after.

Frequently Asked Questions

How does AirSense measure air quality?

It combines an optical dust sensor, which estimates particulate levels from scattered light, with a BME680 that reports VOC gas readings, temperature, humidity and pressure. The ESP32-S3 samples both at regular intervals and shows the results on a 2.4-inch LCD.

Is it safe to copy the 220V fan setup?

The original uses a relay to switch a mains-powered exhaust fan, which needs careful insulation and proper wiring inside a metal enclosure. For student builds, a 12V DC fan driven by a MOSFET is safer and also gives you PWM speed control.

What will I learn if I build this?

You will practice I2C sensor wiring, reading and calibrating environmental data, building a graphical dashboard with LVGL, driving loads from a GPIO pin, and sending data to a cloud dashboard. It is a solid base for an IoT or environmental-monitoring thesis.

This article was inspired by reporting from Hackster. Find the parts and modules to build it at Circuitrocks.

// written by Ann Arandia

Ann Arandia covers community projects and maker events for the Circuitrocks blog. She writes about local workshops, kid-friendly electronics, and the Philippine maker scene — the people, the meet-ups, the projects that come out of them.