[Link] Xiaomi Air Purifier 3/3H with custom ESPHome firmware

Take a look at the picture at the bottom of the github readme.

Here is how I did it (can’t promise I didn’t make a mistake though, real or written):

  • Connect to GND:
    • GND on serial adapter
      • grab all below dupont jumpers with alligator clips
    • pin with GPIO0 arrow, marked 1 on board
      • dupont jumper M/M
    • pin next to GPIO0 arrow, marked 2 on board
      • dupont jumper M/M
    • pin with GPIO2 arrow
      • press a dupont jumper M/M on top of the pin and use an alligator clip (preferably with a sleeve, since this is for plastics) to hold it in place with the help of the nearby white connector (should be just close enough)
    • GND on external power supply
  • Connect 3v3 to external power supply:
    • dupont jumper to whatever your power supply offers
    • had to crank to 3.45v -measured- for it to work
  • Connect RX/TX to your serial adapter
    • dupont jumpers according to your adapter

I used pin headers (a 4-pin 2.54mm single row -the ones meant to be soldered-) to plug into the 4 pins (3v3/GND/TX/RX) of the board, with the dupont jumpers on it (jumpers alone could easily touch below the board, pin headers remain parallel!). It will skew a little with gravity (jumpers’ weight), which should ensure continuity.
Ignore the yellow and white wires on the github picture.
Make sure everything is properly connected with a quick continuity test.

There sure are better ways to do it, but I did it with what I had on hand; worked for me… I tried without the external power supply at first, but that didn’t work.

It might seem long “in written format”, but it was actually really fast, and didn’t require messing with the board’s soldering.
Sorry I can’t post pictures, the box is all closed up again… :sweat_smile:

1 Like

Do you have any product recommendations for these?

I was thinking about getting a set like this.

Just found this amazing item on AliExpress. Check it out! AU$9.57 21%OFF | Cleqee P1512D Mini SMD IC Test Hook Test Leads Kit Mini Grabber Silicone Jumper Wire 26AWG Dupont Cables for Logic Analyzer
https://a.aliexpress.com/_mqROGGg

No sorry I don’t have any of these, I just use the basic ones, in combination when necessary…

dupont

1 Like

Alright! Can’t believe it was that simple! I would never have thought that I need to ignore the yellow and white wires on the github picture… :sweat_smile: That was the only part that was bugging me.
Worked like a charm! Thanks for the help and the clear instructions!
Here’s to never having to open those purifiers again! Cheers!

1 Like

Disassembly vid for V3 teardown:

Watch this in double speed before you start so you know what you’re in for:

Metal pry tools really help (maybe even required).

Teardown is definitely quite involved.

1 Like

I reckon I got quite lucky and got mine flashed 1st shot just using the ttl adapter for power. I mostly followed your method. I was connected to my HA server (old laptop).

I thought I’d take some flicks to contribute to making the flashing easier to follow for others.

I managed to flash using only dupont cables and pin headers. No soldering or even clips! I had these but they were no good for gpio2 so I abandoned them.

TTL / UART rig.

Rig for pulling gpios

Shove it all in and use a bit of gravity or slight hand pressure to help with contacts.

I toggled power via usb stick with one hand while the other hand held in gpio2

More details…

BTW, you can extend the life of your filters by adding your own disposable “pre-filter”.

https://www.aliexpress.com/item/32958097736.html?spm=a2g0o.order_list.order_list_main.20.41581802jgrZYA

1 Like

Fantastic, the only thing I missed when I posted… unfortunately mine was already flashed and repacked by then. Thanks.

As I mentioned before, using a power supply, it wouldn’t cooperate until I let the decimal point go up a bit (3.45V), so maybe a USB adapter a bit more lax on the power it lets flowing through works just fine here, without external power. I just tested mine, it outputs near exact, 3.305V.

1 Like

I measured ~3.3V on mine. Could also possibly depend on how good your connections are and length of wires? Could be some extra resistance/voltage drop if your connections aren’t great etc? I was thinking about this power issue as I went and used as short wires as possible etc. Possibly also an area that might benefit from a soldered approach. Especially if you don’t have a variable power supply (I don’t).

I’m guessing we used the same type of Aliexpress duponts :smile:
I didn’t look much further since it worked with the external to be honest.

1 Like

Esp32 can be picky regarding power supply - it must be powerfull enough, since current spikes can be well over 1A. So, if you have some small (or cheap) PSU this could be the problem. If i program my esp32 it won’t program when powered via (low power) usb port… it must be USB3.0 .

I used USB-C (newer adapter), yet no joy… So I think the source of the issue is weirder than that.
But then again, between the computer, drivers, power saving features, the quality of the adapter, connections, and everything else on the board’s side… so many things involved :grinning:

They also mention a double-beep in the README, when the board powers up; even though I flashed it successfully, I never heard those… In case anyone is waiting for them, don’t, it just might be working already (try to flash and see if the serial port opens). Guessing there could be slight differences between versions/locations…

1 Like

I just remembered: a while ago i decided to play with newly arrived wemos d1. I coudln’t get it to flash - it didn’t even start to flash. After a while i managed to solve it by (re)installing original wemos drivers on my windows 11, although drivers were installed, i flashed naords with same uart chio before… perhaps fake chinese uart chip…?

I don’t recall hearing it either… Possibly it depends on whether the beeper is on? Although dunno if that setting survives a hard reboot.

1 Like

Good point. I can’t remember what state it was before I flashed it (had done a bunch of resets & reconfigs…). I updated the original post to mention this. Thanks.

1 Like

Pinout for this board? - Xiaomi airpurifier pro H
photo_2024-02-25_18-02-46

A quick Google of “esp32-wroom-32d pinout” showed up this…


Is my purifier supported?

Does anyone have any tips on how to get the covers off? I can get the side pannels all the way down to the top, but those last tabs seem darn near impossible for me to get. I’ve watched several videos and still can’t seem to get it.

1 Like

Yeah mine were pretty tough. Two pry tools eventually got me there. Think I may have snapped a tab or two in the process.

If I recall correctly those last top tabs have a different style of latching mechanism to the others.





Succeeded!!!
I confirm compatibility with Air Purifier Pro H.

2 Likes