Open hardware USB or Ethernet to infrared remote control (for Midea A/C) interface

Recently our house was equipped with a new Midea air-conditioning, which I wanted to control remotely, like switching it ON before returning to the house etc. Midea offers some Wifi interface for that purpose, but this is totally unsuitable for me for two reasons - first, it needs an Android app, which communicates with the air-conditioner via third party servers and I refuse to let my critical home automation infrastructure to be dependent on foreign servers. Secondly, Midea Wifi interface supports only PSK encryption, while I am using the "Enterprise" setup with my own radius server, so it would not work anyway.

I therefore decided to develop my own interface which would issue commands to the AC unit via the infrared interface, imitating the IR remote control. I have developed two versions thereof, using either USB or Ethernet; the Ethernet one will actually be employed, while the USB one I used for mutual debugging of the IR RX and TX. The hardware is pretty straightforward and is just a slight respin of my previously developed interface to RFM22. Actually, since I had spare boards of the RFM22 interface, I did not let these board to be manufactured, just added the little extra circuitry on a universal boards to that boards, where RFM22 was not populated and the IR RX and TX signals were connected instead. As the receiver I used TSMP58000, for transmitter a transistor switching two IR leds with different wave lengths around 900nm, as I was not sure, at which IR wavelength Midea receiver is most sensitive.

Schematics in PDF format is here eth_lpc_ir.pdf and usb_lpc_ir.pdf. For open hardware Kicad design files see eth_lpc_ir.zip and usb_lpc_ir.zip.

Concerning the software, Midea employs the pulse distance encoding, see e.g. Freescale AN3053 for more information on IR modulations. I have implemented an interrupt-driven transmitter/receiver for this encoding only, as there was no need to implement other encodings presently. Concerning the higher-level protocol, it is very simple and has been already reverse engineered by Daniel Veillard here. I just add two remarks:
1. the "mysterious" temperature encoding can be recognized as a Gray code, so I suspect it is an inheritance from some old Midea units with a mechanical temperature dial
2. The remote control sends always 3 packets, the first two are formed as described by Veillard, the third one is different, mostly constant and, as far as I observed, completely irrelevant and can be omitted. However, you have to transmit the 0xB2... packet exactly twice after each other, transmitting it just once will not work and transmitting it 3 or four times will not work either.

At the user level, the USB interface implements a terminal-like communication (/dev/ttyACMx under linux) witl the LPC1343 MCU and a simple commands can be used to transmit Midea packets. Received packets (e.g. from original remote control) are printed when arriving. The Ethernet interface works similarly, just using UDP packets for input of the commands and output of the received IR packets. The Gnu GPL licensed source code is in the files eth_ir_interface.c and usb_ir_interface.c in the archive arm_lpc111x.tar.gz, the low level procedures are in lib/ir.c and lib/midea.c.

My Electronics page


My hobby page


My main page with e-mail contact


TOP of my family pages