Hacking air purifier corrections
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Title: Hacking my Air Purifier into Home Assistant
|
||||
Title: Hacking my Air Purifier onto Wifi
|
||||
Date: 2026-05-27
|
||||
Category: Writing
|
||||
Summary: Hardware hacking my Airmega 200M Purifier into Home Assistant.
|
||||
Summary: Hardware hacking my Airmega 200M Purifier onto Wifi
|
||||
Image: purifier1.jpg
|
||||
Wide: true
|
||||
|
||||
@@ -15,17 +15,19 @@ I use motion sensors to control the lights in my house, so my home automation sy
|
||||
|
||||
I live alone, but my automation system has a "Guest Mode" which prevents motion from turning lights off. If this is enabled, the purifier only runs quietly.
|
||||
|
||||
I didn't want to get a different air purifier that was smart and have to deal with some app or let another smart device onto my network.
|
||||
|
||||
## Technical Details
|
||||
|
||||
The power supply and motor driver board originally connect to the control board via a 6-pin ribbon cable. Pin 4 of that cable expects a PWM signal that controls the speed of the purifier's blower motor proportional to the duty cycle. Pins 1 and 5 happen to be 5 V and Ground, which are used to power the Wemos D1 Mini ESP8266.
|
||||
|
||||
The Wemos boots up and connects to an MQTT broker on my Wifi network. It subscribes to the `iot/purifier/mega_1234/speed` topic where `1234` is part of the MAC address so different purifiers on the network can be addressed easily. It listens to messages that are numbers 0-100 and maps the linearly to 60-140 which correspond to the PWM duty cycle range that the motor driver expects. You can find the [source code](https://git.tannercollin.com/tanner/airmega-hack/src/branch/master/firmware/firmware.ino) on my Gitea.
|
||||
The Wemos boots up and connects to an MQTT broker on my Wifi network. It subscribes to the `iot/purifier/mega_1234/speed` topic where `1234` is part of the MAC address so different purifiers on the network can be addressed easily. It listens to messages that are numbers 0-100 and maps them linearly to 60-140 which correspond to the PWM duty cycle range that the motor driver expects. You can find the [source code](https://git.tannercollin.com/tanner/airmega-hack/src/branch/master/firmware/firmware.ino) on my Gitea.
|
||||
|
||||
A side effect of this is that the control board is completely dead and manual control of the purifier no longer works except for unplugging it. I actually don't mind this because it also kills the blue LEDs and I just use my smart watch or phone to control it instead. The built-in dust sensor also no longer works, but it should be possible to also read this with the Arduino over serial.
|
||||
|
||||
## Hardware Hacking
|
||||
|
||||
Hacking the purifier is actually fairly straightforward. My purifier was already over a year old, so I didn't care about voiding my warranty. The power supply isn't isolated and the electronics' ground is floating at something like 48 VAC (learnt this the hard way), so I keep it unplugged while I'm modifying it.
|
||||
Hacking the purifier is actually fairly straightforward. My purifier was already over a year old, so I didn't care about voiding my warranty. The power supply isn't isolated and the electronics' ground is floating at something like 48 VAC (learned this the hard way), so I keep it unplugged while I'm modifying it.
|
||||
|
||||
I removed the cover and all the filters, and then the nine Philips screws holding the case together. I lifted the blower half up and propped it up at an angle. You can see a photo of it below, with the ribbon cable plugged into the control board at the bottom left:
|
||||
|
||||
@@ -73,4 +75,4 @@ This showed me the hack was indeed possible, so I ordered a differential probe o
|
||||
|
||||
I wrote a quick Arduino sketch to see if the 0-3.3 V PWM it outputs was enough to control the speed and it was. This, combined with the fact there's 5 V supplied by the ribbon cable meant that the Arduino could be connected simply with three wires, without the need for level shifters or a power supply.
|
||||
|
||||
I ordered 17 different 6-pin connectors with the same pitch off Digikey and tested each one until I was satisfied with the fit. I programmed the Arduino, soldered it all up, and the hack was complete!
|
||||
I ordered 17 different 6-pin connectors with the same pitch off Digikey and tested each one until I was satisfied with the fit. I programmed the Arduino, soldered it all up, and the hack was complete!
|
||||
Reference in New Issue
Block a user