Just wanted to contribute something simple. I had been getting frustrated by my Medify Air Purifiers having absolutely zero smarts, so I decided to rip my MA-40s and my MA-112 open to get them integrated into home assistant while making no permanent changes to the devices. This guide is very basic, but gets the job done. These changes will disable the front panel on the device, making it 100% managed via Home Assistant/ESPHome. This adds a filter life field as well. I plan to do a guide for the MA-112 as well since it uses an analogue output for controlling fan speed, and also includes a tachometer for fan speed feedback.
This guide has more images to it, but I am limited to one image for this post
Start by opening the top of the MA-40 unit, exposing the IO Panel and the Control Board Box. There should be a couple screws near the top holding this one, and the full panel snaps on/off.
Open the Control Board Box to expose the Control Board.
Unplug the cable connecting the Interface Panel and Control Board from the Control Board. We will be using the following pins on this header:
5V - ESP32 Dev Board Power
GND - ESP32 Dev Board GND
ION - DIO for ION control
H - DIO for Fan High
M - DIO for Fan Medium
L - DIO for Fan Low
Plug Jumper Cables into this header for the listed pins:
Hey Steven. I have an ma-40uv. It looks like I have the same board as the picture in your post. Except mine has the U1 chip blown. Because it is blown I can’t read the numbers on it to cross reference it so I can order a replacement. You mentioned that you have more pics, any chance you have one showing this chip? Would really appreciate it. My email address is [email protected]
Thanks.
@stevo32792 i wanted to thank you for the excellent write up. I recently purchased a 112. Is there any possibility you might post how you did yours? I would love to follow your guide.
Was looking at the board for the 112, based on multi meter it looks like VSP goes from .6v => .65v => .75v => .96v. based on the fan speed button. I haven’t actually tried controlling the fan with the pin though so more testing is needed.
I’m probably not going to look more into this further and just DIY a box air purifier since medify filters are expensive.
Yes! I can put something together tomorrow most likely! I will link the post when I have it up. Sorry for the slow response, I need to turn on email notifications. This gives me time to open up the box and actually measure the pin for the motor control on the MA-112. Just got an oscilloscope in last month for figuring out how to control a Blisslight so I can make sure I got everything right for the MA-112.
We are planning on potentially getting some of these filters. They are H13/14 which is really great at this price point (kind of IQAir quality, at least the filters) so it’s disappointing they have 0 smarts. But maybe I’m contradicting myself - it’s the price point :).
@stevo32792 hey Steven, I was curious if you ever got things to work with the 112? Not trying to rush you of course just curious, would love to try to automate it if possible. Thank you sir.
Hi @stevo32792, I have both the MA-40 and the MA-112 unit as well. Your guide and code worked perfectly to quickly automate the MA-40, thank you. I have now opened up my MA-112 to see if I could automate it using your code as a base, but it is certainly proving more difficult.
As a novice with ESP Home and electronics I would appreciate any guidance. Right now I’m proceeding with a lot of trial and error and the support of forums and gpt4-o. I have been able to power on a ESP32 using the 5V + GND pins. The ION pin appears to work similarly to the above example code (I hear a hiss when I trigger it). I took Humbly’s voltage measures as is and have been trying to get the VSP to work using the dac output from the ESP32, but various configurations have not worked (see an example below).
A few additional things to note… the board Humbly posted is an intermediary board which the touch panel plugs into @ CN7 (VOC, GND, RXD, TXD).There are additional “Magnetic Control” plugs connected to this board that appear to be a safety mechanism. Finally, this board connects from CN1 (see Humbly’s picture above) to the control board box that is very similar to the MA-40. It seems like the mag control sensors detect if the top black vent as well as the panels covering the two filters are attached. They must be attached for the unit to start under normal operation. Lastly, for anyone else trying to open this unit you will need a tri-wing bit to for some screws.
@matthewcbyington, not sure if Steve is seeing these messages, but curious if you had any thoughts on how to proceed here? Any idea if the FG and PC pins are needed to start the fan?
output:
- platform: esp32_dac
pin: GPIO25 # Replace with your GPIO pin
id: dac_output
# Template output to control fan speeds
- platform: template
id: vsp_template_output
type: float
write_action:
- lambda: |-
if (state == 0) {
// Fan off
id(dac_output).set_level(0.0);
} else if (state == 1) {
// Low speed (0.6V)
id(dac_output).set_level(0.6 / 3.3);
} else if (state == 2) {
// Medium-Low speed (0.65V)
id(dac_output).set_level(0.65 / 3.3);
} else if (state == 3) {
// Medium speed (0.75V)
id(dac_output).set_level(0.75 / 3.3);
} else if (state == 4) {
// High speed (0.96V)
id(dac_output).set_level(0.96 / 3.3);
fan:
- platform: speed
id: ma112_fan
name: "Fan"
output: vsp_template_output
speed_count: 4 # Four speed levels including the .65V level
Sorry, I’ve just been dealing with some mental health issues and have been focusing on other parts of my life. I’d been putting off the guide unit I could get the unit open so I could mark down how to open the unit, which pins on the MA-112 would go to which pins on the ESP32, and to verify the original MA-112 signals with an oscilloscope. For now I can attach my code for the MA-112, noting that the control for the fan is an Analogue Output from the ESP32, and there is also a feedback (rpm counter) from the MA-112 to the ESP32. I believe VSP is the control for the fan (analogue output) and PC is the pulse counter. There are no safeguards in place with the magnetic switches.
No worries Steve, wishing you the best and hope you are doing better now.
Thank you for that code it worked like a charm. Only thing I had to play around with was the FG and PC pins. The FG pin worked as the tachometer for me and the PC as power control. Descriptions from gpt:
FG (Fan Ground/Fan Feedback):
If FG is a feedback signal (tachometer), it’s configured as a pulse_counter sensor to measure RPM.
PC (Power Control):
Configured as a GPIO switch. You can use it to enable or disable power to certain components.
Perfect! Thanks for that feedback. I might go ahead and post this information into a separate MA-112 thread just so google picks it up when someone goes to search for it. Like I had mentioned I was holding off as I didn’t have all the details properly documented. After that I’ll probably do a Blisslights thread, wahoo!
As for the health stuff, on the road to recovery. Thanks for asking!
It is possible, but would require either replacing the main board or main board microcontroller. Replacing the main board would not be permanent, but would require designing and fabricating a new main board. The other option would be permanent. If I were doing it myself I would opt for designing a new main board as it would be the most streamline solution, but its a lot more work.