Skip to content

DIY Hack: Add Activated Carbon to Your Xiaomi Air Purifier

My air purifier's HEPA filter catches dust, but not smells or VOCs. So I designed a refillable activated carbon cartridge that drops into the filter I already had. The 3D files are free, with print settings, and there's a version for those without a 3D printer.

3D printed activated carbon cartridge next to a cross-section of a Xiaomi air purifier, with an arrow to where it sits. Price tags: retail €40, DIY €2.50

I've had two Xiaomi air purifiers running on auto mode in my home for years. They're great at catching dust and pollen, but not gases, like the fumes from a 3D printer. Activated carbon catches those, so I added it to the filter I already had.

It sits in a 3D printed cartridge, a non-destructive mod that drops into the top of the HEPA filter, and I refill it when the carbon is used up. The 3D files are free to download below. No 3D printer? The air vent method is at the end.

3D printed activated carbon cartridge for a Xiaomi air purifier: the basket with diamond holes and the honeycomb lid that screws onto it
The two printed parts: the basket that holds the carbon, and the lid that screws onto it.

If that doesn't look like a 3D printed part to you, it's because it uses something a 3D printer is really good at, in a way you rarely see: single lines of plastic bridged across a honeycomb, into a mesh that is very fine and still strong. More on that below.

Here's the whole build in under a minute:

Overview

Why a HEPA filter isn't enough

That's because a HEPA filter is a particle filter: it catches what floats in the air, not the gases that are part of it. Those include the volatile organic compounds (VOCs) that paint, furniture, building materials, cleaning products and 3D printers give off. According to the US EPA, "concentrations of many VOCs are consistently higher indoors (up to ten times higher) than outdoors." For 3D printing, the American Lung Association recommends exactly this pairing: air cleaners with a HEPA filter and activated carbon.

What does catch gases is activated carbon: its pellets are full of tiny pores that gas molecules stick to. The EPA's guide to air cleaners puts it plainly: "To filter gases, choose a portable air cleaner with an activated carbon filter or other filter designed to remove gases." My Mi Air Purifier 2H came with a plain HEPA filter.

Why not just buy a carbon filter?

Xiaomi does make a carbon version of the same filter, the Formaldehyde Filter S1 (the green one). But it costs about twice as much as the plain one (€30 to €43 in the shops I checked in November 2026), and you throw it away. The replacement interval is moulded right into the rim:

Text moulded into the rim of the Xiaomi HEPA filter: replace filter every 3 to 6 months, with spaces for the start date
The rim of my Xiaomi filter: "Replace filter every 3 to 6 months".

For two purifiers and a new filter every six months at about €40, that's €160 a year. My HEPA filter was fine; I only wanted the carbon, in something I could refill. So I designed my own, and made it open source.

How the printed cartridge works

The letters match the drawing below.

  • C, dusty and toxic air: the fan pulls room air in through the purifier's sides and into the wall of the cylindrical HEPA filter.
  • B, dust-free but toxic air: the filter stops the dust, but the gases reach its hollow core.
  • A, clean air: all the air leaves the core through the top opening, right under the fan. That's where the cartridge sits, so every bit of it passes through the carbon.
Cross-section drawing of a Xiaomi Mi Air Purifier 2H with the 3D printed activated carbon cartridge in the top of the HEPA filter, showing the airflow through filter, carbon and fan
A cut through the purifier with the cartridge in place. The close-up of the cartridge and the top of the filter is to scale, drawn from the CAD model and my caliper measurements.

The basket is a shallow cone that hangs about 35 mm into the filter and holds the carbon. Its sloping wall is covered in small diamond holes and its flat end is a fine mesh, so air enters the carbon from the side and from below. The lid screws on with two turns of thread, and its flange rests in the recess on top of the filter, so the purifier closes as usual.

3D model render of the carbon cartridge: the basket seen from above with its mesh floor and diamond-hole wall, the honeycomb lid, and both screwed together from the side
The 3D model: the basket, the lid, and both screwed together.
0:00
/0:04

It drops into the filter's top opening and sits flush with the rim.

Which air purifiers it fits

The cartridge fits the cylindrical Xiaomi HEPA filter (M8R-FLH). According to Xiaomi's own filter pages, these purifiers use it:

  • Mi Air Purifier 2H (the one I tested it in)
  • Mi Air Purifier 2S and 2C
  • Mi Air Purifier 3H and 3C
  • Mi Air Purifier Pro (the 2017 model, not the Pro H)
  • Mi Air Purifier 2 and 3, according to retailer data sheets

These look similar but use a different filter, so it won't fit them: the Xiaomi Smart Air Purifier 4, 4 Lite, 4 Pro and 4 Compact, the Mi Air Purifier Pro H, the Elite and the Mijia Smart Air Purifier 6. Watch out for the 4 Lite: its filter has the same diameter but is 17 mm taller, and retailers often list it as compatible anyway.

I have only tested it in my own filter, so measure yours before you print:

Cross-section drawing of the Xiaomi HEPA filter top: 144.2 mm opening, 153 mm ledge, 158 mm recess, 1.88 mm and 0.56 mm steps
The top of my filter, cut through the middle: a 144.2 mm opening and a 158 mm recess. The cartridge's wall is 144.1 mm and its flange 157.4 mm.

Download the 3D files

One zip holds project files for OrcaSlicer-based slicers with all settings, STL files for other slicers, STEP files if you want to change the design, and a README with the print settings.

They're free under CC BY 4.0: print, share, change and even sell what you make, as long as you credit me and link back here.

Printing it

Both parts print face down, with no supports and no brim.

0:00
/0:05

The basket printing on my Snapmaker U1: about 2 hours squeezed into 5 seconds.

  • Printer and slicer: Snapmaker U1, Snapmaker Orca 2.4, "0.20mm Standard" profile. With another printer, switch the printer and keep the process settings.
  • Nozzle and material: 0.4 mm, PLA (I used PLA+).
  • Layers: 0.20 mm with a 0.25 mm first layer. The honeycomb and the mesh are sized to these, so keep them.
  • Time and material: about 1 hour 10 minutes for the lid, 2 hours 10 minutes for the basket, 65 g of filament in all.
  • Check the preview: layers 8 and 9 must show single crossing lines over the honeycomb. A solid layer there means the mesh disc lost its per-part settings; the README has them to set by hand. (The project files embed them, which is why the app shows a "Customized Preset" notice.)
  • Other slicers: load both STL files of a part as one object (the body and its mesh disc) and give the disc the settings from the README. I have only tested the OrcaSlicer project files.

Expect some light stringing across the basket's wall holes. A quick pass with a hot-air gun cleans it off.

Filling and installing it

Shake the dust off the carbon pellets first, outside or over a bin. The carbon sits after the HEPA filter, so any dust it sheds goes straight into the room.

Fill the basket to the rim and level it off, so no air can slip past the carbon.

Pouring activated carbon pellets from a bag into the printed basket, then levelling them with a scraper
Fill the basket to the rim, then level it off.

Screw the lid on; the thread pulls it tight, no glue or tools needed.

The assembled carbon cartridge held in two hands, showing the honeycomb lid and the basket's diamond-hole wall
Screwed together and ready to go in.

Drop it into the filter's top opening, lid up, and put the filter back in the purifier.

Xiaomi Mi Air Purifier 2H with its cover off next to the HEPA filter with the printed carbon cartridge in its top
The filter with the cartridge, ready to go back into the purifier.

From the drawer to the printer, with an AI agent

This cartridge was one of those projects that ended up in a drawer. I wanted a printable version for years, but never found the time to design it. In the meantime I used the air vent version you'll find at the end of this article, and it did the job.

Lately I've been experimenting with AI driven CAD design, and it has let me open that drawer and finish some of the projects I abandoned over the years. This cartridge is one of them.

I work with Claude Code, an AI agent, in a project folder on my PC. I describe the part and measure what it must fit; the agent writes the CAD model as Python code and checks it before I see it. I print, test and tell it what was off, and what each part teaches goes into a handbook it reads before the next one. For this cartridge that took two fit-test rings for the flange, and four test pieces for the mesh.

How to print a fine mesh without modelling it

Most 3D printing advice tells you to avoid thin, free-standing lines. But done right, a 3D printer makes a very good mesh, and it's the part of this project I'm proudest of.

The faces had to let through as much air as possible and still hold 1.5 mm pellets. So each is a coarse honeycomb for strength, with a fine mesh across every cell: single 0.42 mm lines with 1 mm gaps, in two layers crossing at 60 degrees.

What didn't work

  • Modelling the mesh: thousands of crossing strands froze the slicer (Snapmaker Orca, a fork of OrcaSlicer) at 25 %. On a small test piece it sliced, but each strand became its own tiny wall that the nozzle dragged loose as it wiped back along it. Loops and blobs.
  • Square holes: my pellets are little cylinders, and a cylinder drops into a square or a slot and blocks it. It can't fill a diamond.
Two 3D printed mesh test pieces: modelled strands printed as tangled loops, and a slicer-drawn diamond mesh printed straight and even
Left: the mesh modelled as strands. Right: the same cell with the mesh drawn by the slicer.

The trick: let the slicer draw it

Do what people do for printed sieves: don't model the mesh at all. Each flat face has a shallow pocket on top of the honeycomb, holding a separate plain disc, two layers thick, with no walls and no top or bottom layers. All that's left is infill, which the slicer draws as one continuous zig-zag per layer, with no retractions. The disc reaches 1 mm past the honeycomb, so every strand rests on solid plastic at both ends. The part slices in about a second.

The parts print honeycomb first, because thin lines on the first layer get ruined as soon as the nozzle crosses them. Seven layers of 10 mm cells make a sturdy start, and layers 8 and 9 are the mesh, bridged across each cell in mid-air at 30 mm/s.

Snapmaker Orca slicer preview of the lid: two layers of fine crossing infill lines drawn over the honeycomb, forming the diamond mesh
The slicer preview of the lid: the mesh is two layers of infill lines, drawn over the honeycomb.

The settings, and the density gotcha

Per-part settings on the mesh disc in OrcaSlicer:

  • Walls 0, top and bottom shell layers 0.
  • Infill: rectilinear, 0.42 mm wide, 30 mm/s, direction 0 with the rotation template "30,150" for 60 degree diamonds.
  • Infill density: 26.6 %, for lines 1.42 mm apart (1 mm gaps).

You'd expect 0.42 / 1.42 = 29.6 %, but that gave lines 1.275 mm apart: OrcaSlicer divides the flow spacing by the density, not the line width. For a 0.42 mm line on a 0.2 mm layer, that's 0.42 − 0.2 × (1 − π/4) ≈ 0.377 mm, and 0.377 / 1.42 = 26.6 %. About 40 % of the meshed area is open, straight through.

A slicer only draws lines like this on flat faces, so the basket's sloped wall has modelled holes instead: 1573 diamonds, 1.2 mm across. And the method works for any flat face: a sieve, a vent grille, a fan guard, a dust cover.

No 3D printer? Use an air vent

A round air vent from the hardware store can hold the carbon too. You need:

  • A round air vent for 125 mm ducts. Mine cost a few euros and fits the filter's top opening exactly, but check yours.
  • Cooker hood filter cloth, or a cut-open vacuum cleaner bag.
  • Activated carbon pellets, sold online in bags of a few kilos, often for aquariums.
  1. Cut a circle of cloth to the vent's inner diameter and lay it flat against the grille.
  2. Fill the vent with pellets to the top.
  3. Cover it with a larger circle of cloth, held tight with a rubber band, tape or string.
  4. Drop it into the filter's top opening.
Round plastic air vent filled to the rim with small cylindrical activated carbon pellets
The vent filled with carbon pellets.
Air vent filled with activated carbon, closed with filter cloth held by a string, ready to go into the air purifier filter
The vent filled and closed with cloth and string.

It works, but every refill means untying the cloth, which the printed cartridge's screw lid avoids.

The trade-offs

  • I haven't measured how well it works. My purifier measures particles, not gases, and I haven't measured airflow or noise with and without the cartridge either.
  • It's a small bed of carbon. The EPA notes that "activated carbon filters can be effective, provided that there is a large amount of material used in the filter." The cartridge holds what fits in the top 35 mm of the filter: a lot more than nothing, but not a big carbon filter.
  • Carbon gets used up, with no indicator, and I don't know yet how long a fill lasts. Refilling takes a few minutes, so it's easy to do often.

Final thoughts

What I like most about this design is that it's a non-destructive mod: no cutting, no drilling, no glue. Take the cartridge out, and the purifier and the filter are exactly as they came. All I needed was a way to put carbon in the air stream, and now I have a cartridge I print once and refill for years.

That's the idea behind this blog: build it yourself, understand how it works, and share it. The files are free to print, change and improve. If you make a better version, I'd love to see it.

Want to see a smoke-clearing test with and without the cartridge? Let me know in the comments.