Hello community! I have a Tristar A/C that I would like to control with an ESP if possible. Linked are some photos of the PCB boards. Before anyone suggests IR, I want a way to detect the states of the a/c unit such as temperature, mode, state etc.
Is there an easy way to link up to the pins CLK,GND,5V for control or is this much harder than I expect?
I actually did it all with a ESP32 and the INA219 module. The INA219 detects voltage spikes on the + line of a system. So I used my multimeter to find a line that gets a voltage spike. Then I used the ESP32 LED IR transmitter code and now I can turn it on and off via the ESP32. I wanted the INA219 module because there was no other way to detect if it had power or not. The Tristar does have an AC temperature sensor but I did not feel comfortable trying to figure out how to read the board. Right now I use a zigbee temperature sensor and a door sensor from ikea (also zigbee). When I am home, and my bedroom door is shut, and the temp is below X celsius, it will turn the A/C on.
I do not have a way to detect what temperature the Tristar is set to, but when it’s turned off and back on, it resets the temperature and I can assume from there based on what I send via the IR transmitter on the esp32.
Not too sure, I would have to take it apart again. I will be honest here. I was soldering some parts when I was doing this while it was plugged into the mains. I did not see it was plugged in, and I shorted the board. Luckily I found a broken one at a local garage sale and bought it. The electrical board parts swapped over perfectly. I have not opened it since. But it should be this board.
To interface with the AC unit using the resistor values you mentioned and ESPHome on the ESP32, you can create a setup where the ESP32 simulates these resistor values to trigger specific actions. The general idea is to use the GPIO pins on the ESP32 to simulate different resistances between the “KEY” and “GND” pins.
Required Components:
Resistors: 1kΩ, 1.99kΩ (or close), 3kΩ, 5kΩ, 20kΩ
NPN Transistors or Relays: If you want to control the resistors using the ESP32.
Breadboard/Wires: For prototyping.
Steps to Implement:
Connect the GND:
Connect the GND pin from the ESP32 to the "GND" on the AC controller board.
Create a Voltage Divider Setup:
For each function (Mode, Speed, Temp+, etc.), connect the appropriate resistor between the "KEY" and "GND" pins.
Use a transistor or relay controlled by the ESP32 to switch the resistor in and out of the circuit.
Switching Resistors Using GPIO Pins:
For each function, connect one end of the resistor to the "KEY" pin on the AC controller.
Use an NPN transistor or relay to connect the other end of the resistor to GND.
The base of each transistor is connected to a GPIO pin of the ESP32 through a current-limiting resistor (e.g., 1kΩ).
Here’s how you can wire it:
1kΩ for Mode: Connect one end of the 1kΩ resistor to the "KEY" pin and the other end to the collector of a transistor. Connect the emitter of the transistor to GND. The base of the transistor is connected to a GPIO pin through a 1kΩ resistor.
Repeat this for the other resistors and their respective GPIO pins.
Configure ESPHome YAML:
Define each GPIO pin as a switch in ESPHome. When a switch is activated, it will turn on the corresponding transistor, allowing the resistor to connect "KEY" to "GND" with the specific resistance, triggering the corresponding action (e.g., Mode, Speed, etc.).
Mode Selection (1kΩ): When the “Mode” switch is activated in ESPHome, the GPIO pin connected to the transistor’s base turns on the transistor, allowing the 1kΩ resistor to connect between the “KEY” and “GND” pins.
Speed Selection (1.99kΩ): Similarly, when the “Speed” switch is activated, the 1.99kΩ resistor is connected between the “KEY” and “GND” pins.
And so on for the other functions…
Testing:
Flash the ESPHome firmware to your ESP32.
Connect the ESP32 to the AC unit as described.
Use the ESPHome dashboard or Home Assistant to toggle the different switches (Mode, Speed, Temp+, Temp-, Timer) and observe the corresponding actions on the AC unit.
Important Notes:
Power Supply: Ensure that the ESP32 and AC unit share a common ground.
Resistor Tolerances: The resistor values you use should be as close as possible to the ones specified (1kΩ, 1.99kΩ, etc.) to ensure the AC unit interprets the commands correctly.
This setup should allow you to control the AC unit via ESPHome using the GPIO pins on the ESP32 to simulate the required resistor values between “KEY” and “GND.”