Share this post!
Share on FacebookShare on Google+Tweet about this on TwitterEmail this to someone

In a small office like Poin2 Lab., it’s sometimes hard to determine if I can turn on air conditioner on a somewhat-hot-but-cloudy kind of day, or switch it off when it’s blasting out freezing arctic wind. Am I the only one feeling hot or cold? Why isn’t anyone doing anything about that thing once it’s turned on? Everyone probably is feeling the same. They want to do something about it, but are afraid how others would react. The solution is: Let a robot do it.

Things you need:
Arduino UNO x1
Infrared Receiver x1 (unless you have the same Samsung A/C we have in our office)
Infrared Transmitter LED x1
Ambient Light sensor 5516LDR x1
Temperature sensor LM35 x1
10k Resistor x1
Breadboard x1 and few cables
Remote controller for A/C

The overall process is simple. First, you read IR signals from A/C remote controller and record the signals it sends to the A/C. Then second, you build a machine that transmits those signals under certain temperature/ambient light circumstances.  For reading and writing IR signals, I got all the information from this instruction by Wally_Z on Basically the link has all the information you need, but I will add few tips along the way.

Hardware Connection


Detailed Steps

1. Connect IR Receiver’s output to digital pin 2. You only need to connect IR Receiver in the first step.

2. Download IR_RECIEVE.pde file from Wally_Z’s guide, open the file on Arduino program and upload the code to the board.

3. Open serial monitor and see if you get bunch of codes when you press a button of A/C Remote controller pointing at the receiver.
* For my case, A/C remote controller had its own on/off state, so the “power” button transmitted different signals when A/C was ON and A/C was OFF.

4. Save each set of codes by its function, like “On”, “Temp up”, “Temp down”, and “Off”. For your reference, mine looked like this: ACControl.txt

5. Now comes the hardest (labor-intensive) part of the project: Putting those numbers into IR_SEND.pde from Wally_Z’s guide, defining each set of numbers as a function.
My code consists of 4 remote control functions, TurnOn(), TurnOff(), TempUp(), and TempDown().

6. Now it is time to wire up all remaining parts and do some experimental runs to optimize your settings. You may remove the IR Receiver too.
– Wait until it is hot enough in the office that you want to turn on A/C, then measure temperature at that moment. This will be the temperature at which Arduino will turn on A/C.
– After you turn on A/C, wait until it is cold enough that you want to turn off A/C, then measure temperature. This will be the temperature at which Arduino will turn off A/C.
– With lights off in the office, take analogRead of light level at dusk. At a light level lower than this, Arduino will turn off A/C and start hibernating.
– I took additional measure when it’s really dark in the office, so I can reduce brightness polling frequency at night.

7. With the numbers you got from Step 6, modify the code below to fit your situation. Make sure you copy and paste functions you defined in IR_SEND as well.
Download: AC_Control.ino

8. Upload the code to the board and place it somewhere directly facing the A/C unit.

9. Enjoy your smarter office!


That’s all we got for today. Any questions or comments are welcome!

Smarter Office: Automatic control of A/C in a small office
Share this post!
Share on FacebookShare on Google+Tweet about this on TwitterEmail this to someone
Tagged on:             

2 thoughts on “Smarter Office: Automatic control of A/C in a small office

Leave a Reply

Your email address will not be published. Required fields are marked *