Leafi a Leaf-shaped Air Quality Sensor
by htz forge in Living > Health
60 Views, 2 Favorites, 0 Comments
Leafi a Leaf-shaped Air Quality Sensor


A Leaf But Smarter
Leafi is a leaf-shaped air quality sensor designed to raise awareness about indoor pollution in a fun and educational way. Powered by an MQ135 sensor and a WS2812B LED strip, Leafi visualizes air quality in real time by transitioning from green to red—green when the air is clean, red when it's polluted. It also features multiple lighting modes, including ambient animations and a relaxing "lounge mode", with adjustable brightness to match any atmosphere. Fully open-source and 3D-printed, Leafi is eco-friendly, customizable, and perfect for makers, educators, and anyone who wants to make the invisible visible.
Supplies
Electronics:
- 1X MQ-135 Sensor https://tinyurl.com/yc4zb3pc
- 1X Arduino nano https://tinyurl.com/2wdw9s6p
- 1X Female USB-C Connector https://tinyurl.com/54vz655f
- 1X 330Ω resistor https://tinyurl.com/2fp34p7y
- 1X Male USB-C connector https://tinyurl.com/tsd4apfx
- WS2812B 5V Led strip (144 Leds/m) https://tinyurl.com/56exza8c
- 1X 6×6 momentary push button https://tinyurl.com/yxjv8f8m
- 1X 5v USB-C Power supply
Tools:
- Soldering iron & solder
- Hot glue gun or epoxy or cyanoacrylate glue
- 2X M3 and 2X M1 screws (or just more glue)
- Wire cutter/stripper
- Optional: translucent filament for the leaf (for best glow)
- Jumper cables
3D-Printed Parts:
- LEAFI_BODY
- LEAFI_BOTTOM_CAP
- LEAFI_BOTTOM
- LEAFI_BUTTON
- 2X LEAFI_LEAF-BICOLOR
- LEAFI_SWITCH_HOLDER
- LEAFI_TUBE
All parts can be printed in PLA
**You can also download my full instructions pdf file :)**
🎥 Watch the Demo

RGB vibes for eco-nerds 🌈🍃
🛠️ Assembly





No screws required for the printed parts– it's all snap-fit
Female USB-C connector is glued to LEAFI_BOTTOM.stl
🔘 Installing the Button
Insert the LEAFI_BOTTON.stl in the hole, then place the 6×6 mm momentary push button on top of the LEAFI_BUTTON.stl. Then, carefully place the LEAFI_SWITCH_HOLDER.stl on top to hold it in place.
⚠️ It might take a bit of gentle persuasion — don’t worry, Leafi won’t bite! 😄
Once everything is aligned, I recommend adding a small dab of glue to keep the button nice and snug.
Now your Leafi is ready to click and glow! 🌟
🔌 Wiring




Components connected to Arduino Nano
MQ135 Sensor
VCC → 5V
GND → GND
AOUT → A0
WS2812B LED Strip (61 LEDs)
DIN → 330OHM RESISTOR →D6
+5V → 5V
GND → GND
Switch Button (6×6mm)
One leg → D2
Other leg → GND
And plug the male usb-c to the arduino and connect it to the female usb-c plug
The Arduino Nano and the MQ135 sensor can be mounted using M3 and M1 screws, but you can also glue them in place instead of screwing.
🤖 Arduino Code
Upload the code to the arduino nano !
Downloads
🍃 Leafi – Quick Start Guide
Power
🔌 Plug Leafi into a 5V USB-C power source.
Modes
Leafi features 4 lighting modes:
- MEASURE – Color changes based on air quality
- LOUNGE – Ambient color animation
- SPOT – Static light for focused use
- WAVE – Slow, flowing color transitions
🕹️ Hold the button to switch between modes.
Brightness
💡 Short press the button to cycle through brightness levels.
Enjoy the glow!
📸 More Pictures



