Controlling AirCon through Raspberry Pi  - Page 1
Forum section: electronics / beginners

author: plumdrix
author_rank: Newbie
timestamp: March 16, 2020, 06:04:23 am
content: Hi Forum,I'm struggling with a portion of my project and was hoping to find some pointers here. I'm trying to enhance the control unit of my Aircon, by adding individual controllers for each room. These will communicate with a Raspberry Pi to either enable or disable a particular zone. The Controller can control 8 separate zones, but only has 2 sensors (one in the downstairs lounge, one at the upstairs landing). So adding an individual controller, that also includes a temperature sensor to every room seems like a good idea as well as a great opportunity to brush up on many areas (electronics, programming, etc).As there is no "official" way to interface with the controller, I had to resort to take the thing apart and solder some wires straight to the PCB (I know, I'll go to hell for that). Switching zones on and off is working fine so far, by bridging the existing momentary switches on the PCB via Reed Relays (which are triggered from the RPi).But this is only half the battle, since I also need to know the state of each zone. The only way I could figure to achieve this, is by latching onto the indicator LED's. These give me around 4.9V on theAnodekathode when off and about 2V when off. It is this information I would like to transform into a High / Low signal for the RPi.In order to keep both circuits (my project circuit and the Aircon controller circuit) separate, I’m thinking of running the signal through an Opto Coupler, but as the Aircon Controller circuit is very sensitive to additional load, I can't connect it directly to the Opto Coupler. I was planning on using an OpAmp in a buffer configuration (as I don't require amplification), but am struggling to come up with a suitable design.Any suggestions what the best solution would be to transfer the signal from the Aircon controller to the RPi with as light a touch as possible?Thanks in advance for any tips.

author: floobydust
author_rank: Super Contributor
timestamp: March 16, 2020, 06:24:36 am
content: Welcome to the forumThis is a central A/C supplying cold air or water to each zone? Here it was -20ºC last night and I forgot what Aircon is, at least all killer bugs are dead, and animals are hibernating...I would use low current opto-couplers, many work needing 1mA or less for the LED, which does not appreciably load down the controller. If you know the controller's LED resistor value, that tells how much the LEDs are presently pulling from the MCU. Or a pic of the board we can reverse engineer some of it. You can also use opto-couplers (flipped) to drive the buttons instead of reed relays.I would look at 6N139,MOCD217M (smt)even PC817/847 if the resistor on the R-Pi side is large >=10k then the optocoupler has higher gain which works with low LED current.

author: plumdrix
author_rank: Newbie
timestamp: March 16, 2020, 07:28:51 am
content: Thank you for the reply and the welcome to the forum.I should have realised that this is not a mainly Aussie forum and maybe should have been a bit more verbose in the explanationI try to do better in the future.Yes, it is an Air Conditioner (reverse cycle for cooling and heating, although the heating portion isn't half as much used as the cooling part here in Sydney) and I attach a picture of the PCB (incl. my horrendous wire soldering).Just for the record and before the manufacturer sues me or revokes any remaining warranty, this is a secondary controller that I can operate in parallel to the primary (and entirely pristine) controller still attached to the wall.Also important to mention is that I made a mistake in my original post. I patch into the signal (where I can measure the 5V/2V dop) on the kathode of the LED not the anode. The PCB is fed a 20V rail for operation As the PCB is a multi-layer and all components are SMD, it is a bit of a challenge to follow the traces and reverse engineer the schematic. I haven't been able to find schematics online.I do use the 6N139 in my project and it hadn't even occurred to me to use this in reverse to toggle the switches. The reed relays actually work very well for that purpose (and more importantly have already been purchased :-)), but I keep that idea in mind nonetheless.If I connect these directly however, the LED on the controller dims to about half, which made me worried that I might be influencing other parts of the controller as well and create functional issues as a side effect.That's why I was thinking to use something with pretty high input impedance and landed on OpAmp. I'm using the LM348N (quad OpAmp) and haven't been able to get a clear High/Low output for the 2 input values. Do you ave any suggestion on the best resistor values to use in the feedback line as well as the signal line?Thanks again,Peter

author: Renate
author_rank: Super Contributor
timestamp: March 16, 2020, 01:42:43 pm
content: You know, there are many ways to skin a cat...I had a Mitsubishi mini split. I first interfaced to it using an IR transmitter (it was set up for an optional handheld controller).I first had to decypher the protocol.The Mitsubishi also had wireless control panels.I never did decypher the RF protocol.But the inside unit had an optional RF transmitter connected internally to the control systems.I did decypher that protocol and used that.In any case:I take it that you have two wired control panels that are wired up on three conductor cable?Are the two cables connected to the same place or do they have separate ports on the aircon?You could figure out that protocol and then you'd only need 2 or 3 wires to control everything (and get back full information).(I would do it this way myself, less hardware, more status information.)It's lucky that the bottom 2 x 4 buttons directly map to your zones.This would be much harder if it were the more typical, "Go to the zone page and scroll down."

author: atmfjstc
author_rank: Regular Contributor
timestamp: March 16, 2020, 06:23:55 pm
content: How about pointing a photoresistor at each indicator LED? Kind of like a broken-up photocoupler.

author: floobydust
author_rank: Super Contributor
timestamp: March 16, 2020, 06:55:41 pm
content: I think your board interface might be looking like this (sketch). The MCU does not seem to use X-Y scanning as a matrix, so this is easier.Any opto connected directly to your wires would be fighting with the LED current and I'd probably use a buffer or transistor then go to an opto-coupler. The large resistor 5k6 really doesn't give them much current at all, maybe 0.5mA and to check you measure LED off almost 5V, LED on around 2V on your take offs?It's odd the LED's are dimming- when does this happen and what colour are they?