kpishere / homie_heatPump

HVAC IR Remote Library+ with Homie integration example
GNU General Public License v2.0
15 stars 1 forks source link

New Aura models have a RS232 port #5

Open nerdralph opened 4 years ago

nerdralph commented 4 years ago

Sometime in early 2019, Midea added wifi control to the Aura series heat pumps. The wifi module plugs into what is physically a USB port in the head unit, but it uses the D+/D- pins for Rx/Tx. https://fccid.io/2ADQOMDNA19

low-budget commented 3 years ago

Have you got a unit with this interface? If so, have you sniffed the protocol? I'm considering getting one to integrate with my forced air system, but I have some more research to do before committing. Would be glad to collaborate with anyone doing similar.

nerdralph commented 3 years ago

It was a unit I installed for a family member. I recently swapped out a head unit control board on a unit from 2019, and noticed it has an unused connector. The old board wasn't dead; it was swapped out because the heat pump wasn't going into defrost mode. I may try debugging the board to see if I can discover how to control it via the UART.

The control board is silkscreened with a 2016.09.25 date and what looks like a model code: EU-KFR26G/BP3N1Y-AB.D.11.NP1-1

low-budget commented 3 years ago

Thanks for the part number info. A search brought me to a hi res photo of the board from an eBay seller. The only connector that seems to be populated or not on various revisions is a 5-pin labelled CN14. Is that the UART connection? I'm interested in any info that you can share if you manage to get data from the UART port.

nerdralph commented 3 years ago

I don't think so. I think the old units have the connector populated, as there's an unused cable similar to the one for the temperature & power display. The board has a 240V power supply section, so even powering it up will be a bit tricky. I did notice the MCU is labeled D79F8513A. I think it's a discontinued NEC 8-bit processor that has been cloned by some Chinese manufacturers.

low-budget commented 3 years ago

I can't find any data on the D79F8513A, but based on the NEC/Renesas part numbering, it has a 78K0 instruction set. Most parts seem to have a debug mode on the same interface as the FLASH programming port, but there are security bits in the option bytes to disable FLASH readout and debug mode. I think it would be a dead end to try and get access that way if that's what you are thinking. For powering up just to poke around with the WiFi serial port, you may be able to skip the 240V connection. It looks from the board photos online that there is a linear regulator after the switch mode power supply. It's in a TO-220 package with a heat sink. If I'm right, you could just inject a DC voltage to the Vin of the regulator to power up the MCU side of the circuit. If that's not the case then you could try to power the AC input with 120V since the switch mode supply probably has a universal input voltage range. It looks like it's got a TNY276 AC-DC switch mode controller which has 85-265V input.

nerdralph commented 3 years ago

You are right about the TO-220. I just checked and it's a 7805. If I can find the 5V rail on any of the connectors, then it should be easy to power it up.

low-budget commented 3 years ago

The 7805 won't like Vout to be greater than Vin, so you best bet is to inject 12V in the Vin pin and let the 7805 regulate it down to 5V. Just trace back from pin 1 of the 7805 to a convenient attachment to inject the 12V. There is a big electrolytic just below it which is probably connected, and there seems to be an empty land pattern for a smaller cap (C4?) which might also be connected. EDIT: Scratch that... I checked further and it seems there is protection if there is a voltage on Vout when there is no voltage on Vin.

low-budget commented 3 years ago

I was able to power the indoor unit control board with 120VAC with no problem and do some sniffing of the signals. As it turns out, many others have already paved this path. Check out the following links for a starting point:

https://github.com/reneklootwijk https://github.com/mac-zhou/midea-msmart https://community.home-assistant.io/t/support-for-midea-a-c/265236

For a low effort first attempt, I set up the SmartKey and Android app and then used node-red-contrib-midea-hvac which is based on the reneklootwijk code linked above. I was successful in getting a node-red thermostat control working, but the connection through the Midea cloud is proving to be tempermental. A much better approach is to use a custom WiFi dongle in place of the SmartKey as others have using the 9600 bps TX/RX interface of the WiFi adapter port.

An alternative would would be a blend of this project which replaces the display board altogether and the other projects which use the serial protocol. This can be done since the data signal on CN201 (pin3, red wire) of the display board is actually bi-directional. The indoor unit control board receives IR signals on this pin as described in this project, but it also communicates with the WiFi adapter at 1200bps half duplex on the same pin. The WiFi adapter simply translates the 9600bps full duplex signals from the SmartKey into 1200bps half duplex and at the same time will arbitrate the the use of this pin with the received IR signal (via CN301).

I will try this approach because nobody seems to be able to find the serial protocol commands to extract the engineering data that we can get from the IR and LED display data. Most people won't care about about this data, but since I have integrated this with my central HVAC system using a different evaporator coil, I would like to monitor the metrics from the outdoor unit.