It's been a while since I posted an update here. The optocoupler circuit is in place and working well, so I now have remote serial port access to the thermostat, as well as ethernet / web access.

Next step is taking over control of the HVAC (air exchanger) unit. This one is by Venmar, and apparently the controls don't work like many/most other units on the market. I've googled it, and there are lots of reports of people scratching their heads when trying to hook it up to fancy store-bought home controls.

The main unit has two terminals specifically designed for use with simple switches/relays, but behaviour is worse than dumb: closing the contacts triggers a 20-minute timer cycle in the main unit, which cannot be stopped once triggered. Duh.

The wall controller for the unit has a 4-wire interface. Some probing revealed 12VDC power and ground as two of the wires, and +5VDC on the other too. Oh oh.. Logic Analyzer time. It turns out that those two wires are a custom serial interface between the main unit and the wall controller. One wire for each direction, 300 bits/sec.

Then it gets weird. Pressing a button on the controller sends a 24-bit sequence (with a single start bit, and one stop bit). I'm not sure what the purpose of those transmissions is, because they just inform the main unit what "mode" the controller is in. The main unit responds with a 7-bit (or 6-bit?) reply.

Whenever the controller actually turns the fans "on", it sends a 6/7 bit request to the main unit, and gets another 6/7 bit reply. I think the "reply" packets are just to tell the controller to turn status LEDs on/off. One arrives whenever the fan starts up, and another when it shuts off, including when triggered by the simple "timer" contacts discussed earlier.

Anyway, it all looks messy but doable. But during the course of playing with it, I discovered that if I disconnect the main controller, and then just short the transmit line to ground via a 1K resistor, the fan turns on. Remove the short, and the fan turns off. More or less exactly what I need! The main unit seems to have a pull-up on the line, so it floats back to +5V when not connected or shorted to anything. Current through my resistor is about half a milliamp.

So, I'll just ignore the fancy protocol and hook it up to one of the relays in the thermostat. The only slight downside, is this method only operates the fan at HIGH speed. There's also a LOW speed that would have been nice to access, but this would require the fancy digital protocol.

Cheers