Introduction: Mini-Split 7-day Thermostat for a Tiny House
I bought a $4,000 super efficient LG mini-split Heat pump for my tiny house. It can heat and cool. It came with a dumb thermostat; that is, non-programmable. This is illegal for new construction per ASHRAE code(1) which is adopted in many states and requires a means of setback... wow setback. That's not rocket science.
You can buy an LG programmable thermostat online for $130-$150.
This design turns the unit ON and OFF automatically based on my work schedule.
You can make one for quite a bit less:
arduino $10-$29 (depending on the flavor)
real time clock $15 from sparkfun
IR receiver diode $2 from sparkfun for testing your remote's codes
IR sending LED for $1 from sparkfun
(1) ASHRAE 90.1-2004 section 6.4.3 code
Step 1: Read Your Remote Codes
1st thing to do is read your remote codes using your IR receiver and some code. You'll want to hook up your IR receiver and download the git-hub library. You can use the example code IRecvDemo.ino.
Here's sparkfun's tutorial on how to read your remote codes. Simply point your remote at the IR receiver and start pressing buttons and recording numbers.
You'll want to get both the ON code and OFF code for sure. My LG unit had a different ON code if you were starting in heating at 60F or if you were starting in heating at 70F.
Mined looked like this:
OFF button => 88C0051
ON button at 60F => 88045D6
ON button at 70F => 8804ADB
Step 2: Build Your Circuit
The circuit is pretty simple as follows:
Here's the build.com tutorial for hooking up the RTC and testing it out with Adfruit's RTC library.
Hook your LED up to PIN 3 on the arduino and add a resistor too. Here's the tutorial I mentioned earlier that also shows how to hook up your IR LED.
A lower resistor value increases the sensing distance. I was able to decrease the resistor down to 70ohm based on a 1.5volt forward voltage and 50ma specs from the cut sheet.
Step 3: Upload the Code
Upload the code and place the parts next to the unit with the LED facing the mini-split.
I wrote a thermostat code called 5-2 control. It has one schedule for Monday-Friday (5 days) and a slightly different schedule for the weekends (2 days).
You can infinitely expand on these options but here's one. You can also hook an occupancy sensor up to the arduino to trigger ON or OFF times.
ON at 7am 68F
OFF at 8am Mon-Friday
OFF at 9am Saturday and Sunday
ON at 5pm all days
OFF at 10pm all days
5 years ago
I tried this with a plain IR led. I can read the AC remote code but I cannot send it. AC doesn't respond the IR led. I am not using an RTC module. Can that be the reason?
5 years ago
I'm trying to do something similar, perhaps using Home Assistant software and an IR blaster module.
It seems a Broadlink Bean IR component would could about the same amount as your DIY arduino, sometimes less if you find an importer from China (some $12-15 average). Only thing is that you'd need to run the HA software on something, possibly a Raspberry Pi or similar. I haven't tried any of this yet, I'm just exploring ideas. Thanks for sharing this!
7 years ago
Nice! I might have to do this just to replace a dropped/broken remote. But I appreciate the thermostat code too, for another purpose. Thanks!