esp8266-mitsubishi-aircon

Public

@dgoodlad

Share esp8266-mitsubishi-aircon

Check access before sharing the link.

Who can open this board

Anyone can open this board. No sign-in is required.

This link opens the latest version. Copying it does not grant additional access.

Loading…

README

ESP8266 / Mitsubishi AC interface

Software to control and monitor some Mitsubishi air conditioning units over MQTT using an ESP8266-based wifi module.

Designed with the Adafruit HUZZAH breakout board in mind, this repo also includes a PCB layout to do the requisite logic-level shifting etc.

NOTE: this information comes with no warranty of any kind. I do not claim that any of the software or designs in this repository will work for your particular hardware or situation. MODIFYING AIR CONDITIONING UNITS IS DANGEROUS AND YOU DO SO AT YOUR OWN RISK.*

Supported Models

I haven't done any broad testing beyond the units in my own home. The underlying library states that it has been

Tested with Mitsubishi HeatPump MSZ-FH/GE (wall units) and SEZ-KD (ducted units)

and offers a wiki page listing its Supported Models. Check there as a good place to start! Importantly, that page notes that

if your unit has cn105 port, it is most likely supported

Functional description

  • Uses WiFiManager for configuration via a captive portal access point
  • GPIO12 acts as a "factory reset" button. When held low for 3 seconds, clears all settings configured by WiFiManager
  • Uses the HeatPump library to handle comms with the aircon unit
  • Uses Async MQTT Client to communicate with your MQTT server. The messages are designed to line up with the expectations of the Home Assistant MQTT HVAC component.
  • Detects the presence of the aircon unit (rather than USB/FTDI/debug power) by looking for a high signal on GPIO4. The PCB implements this using a voltage divider to step the 5V power supply down to 3V3.
  • If an aircon unit is detected:
    • Calls Serial.swap() to make UART0 use GPIO13/15 as RX/TX for the aircon serial communication. This avoids connecting the aircon to the default RX/TX pins that dump some debug/boot-time information from the ESP8266 chip
    • Uses Serial1 (UART1) to output debug logs on GPIO2 at 115200/8N1
  • If no aircon unit is detected
    • The heatpump code does not start, and no call to Serial.swap() is made.
    • Uses Serial (UART0) to output debug logs on GPIO1 (TX) at 115200/8N1
    • Serial1 (UART1) is not used

PCB

I used OSH Park to fabricate these PCBs, it cost about 10 USD with free shipping to 🇦🇺Australia🇦🇺 for three boards. I've made a shared project there if you'd like to order the boards quickly:

Note that the HUZZAH is revA with 11 pin connectors, not the newer 10-pin version. The 11-pin version is just what I had a few of lying around, and they have an extra no-connection (NC) pin between the power and GPIO pins on each row. The order of the pins is exactly the same and it would be straightforward to modify the board layout to use the newer 10-pin version instead.

Bill of Materials

You'll need the following to build the PCB:

Reference(s)QtyValueDescriptionDatasheetDigikey Part NumberRS Components P/N
A11HUZZAHAdafruit HUZZAH (revA) breakoutlink1528-1223-ND
C1, C220.1uFSMD 0603 Ceramic Capacitorlink1276-6994-1-ND
J11AIRCONJST PH 4-pin Male Connectorlink455-1721-ND
J21DEBUG2-pin 0.1" pin header (male)linkS7000-ND
n/a211-PIN11-pin 0.1" pin header (female)linkS7009-ND
R112K2SMD 0603 Resistorlink679-0112
R213K3SMD 0603 Resistorlink679-0311
R3, R421KSMD 0603 Resistorlink678-9875
SW11KMR2SMD tactile push-button switchlink135-9490
U11TXB0104DR4-channel logic level shifter, SOIC packagelink296-21928-1-ND

You should be able to pick these parts up for under AUD25, but YMMV. I've linked to the vendors that I used (Digikey & RS Components) in Australia. I used two sources because I was ordering parts as I experimented, and RS does free shipping within Australia on any order size while Digikey requires a minimum order value. None of these parts are particularly special, and you should be fine swapping out resistors, caps etc so long as you keep the values (especially for the voltage divider R1/R2).

I created a BOM at Digikey with pricing as of 3/1/2019 and have exported it as CSV here. It contains everything you need to build the PCB and a cable (except for wire!).

Cabling

To connect the PCB to your air conditioner, you need to make an appropriate cable.

On the aircon end, they use a JST PA-series 5-conductor connector, of which we only need four (pin 1 is a +12V output that is unnecessary here).

On the PCB, I've used a JST PH-series 4-conductor connector.

You'll need the following parts to build a cable:

JST Part NumberQtyDescriptionNotesAU RS Components URL
SPHD-002T-0.54PA-series crimp connectorBPHD-002T-0.5 is equivalenthttps://au.rs-online.com/web/p/pcb-connector-contacts/9182817/
PAP-05V-S1PA-series connector housing (5-circuit)https://au.rs-online.com/web/p/pcb-connector-housings/4766798/
SPH-002T-P0.5S4PH-series crimp connectorBPH-002T-P0.5S is equivalenthttps://au.rs-online.com/web/p/pcb-connector-contacts/8201456/
PHR-41PH-series connector housing (4-circuit)https://au.rs-online.com/web/p/pcb-connector-housings/8201478/

... and four wires (or a 4-core cable) that meet the requirements of both crimp connectors. That means anything 28-24 AWG, with insulation outside diameter between 0.8mm-1.5mm.

Note that the crimp connectors may be offered in a B-prefixed part number instead of S; they'll be fine, too, they're just packaged as individual parts in bags rather than on a long metal strip.

I used an Engineer PA-09 crimper for these connectors. They're small and finnicky but once you get the hang of it they're do-able. Some vendors sell pre-crimped leads if you want to skip crimping (at least on one end). If I re-design the board in the future, I'd put a PA connector on that end for consistency and for availability of pre-made leads.

The wiring is simple, as I've kept the pin order from the aircon unit:

    Aircon                      PCB
Signal | Pin                 Pin | Signal
   12V | 1 * (NC)
   GND | 2 * ----------------* 1 | GND
    5V | 3 * ----------------* 2 | 5V
    TX | 4 * ----------------* 3 | RX
    RX | 5 * ----------------* 4 | TX

For convenience, here are the diagrams of the two connector housings from their respective datasheets:

Comments

No comments yet. Be the first to ask about this board.

Ask about this board

Sign in to BoardRepo

New here? Signing in creates your account; there is no separate sign-up.