Just Chillin' - Clone your AC remote with an #Arduino

When the heat in Brooklyn can get up to about 100 degrees, it's such a relief to come into our nice, unnaturally cool office. However, it sucks when you only have one remote to share between the six of us, so for our next project we decided to build our own air conditioning remote.

To get started, we went on Sparkfun and bought an infrared emitter/detector set. We needed to be able to first find and decode the signal our existing remote was sending out in order to replicate it. After hooking up the detector up to the oscilloscope, we were able to find the signal. Now we just needed to figure out what it meant.

We did a bit of research and found these excellent blog posts that gave us a basic idea of how to determine what type of signal we had on our hands. Since all the pulses were the same width but the space between them varied, we concluded we had pulse-distancing encoding. 

We used this document to determine the different parts of the various signals and how to map them. Below are our finished translations of all remote signals:

Next, we hooked our Arduino up to the infrared emitter and wrote various functions to emulate the signals above. We started by writing a function for just one pulse, then functions for zero, one, and the leader (a 9ms burst that signals to the air conditioner an incoming command is beginning). Since the address is the same for all commands, we made that it's own function, including the leader. A sample of our refined code for the temperature down button looks something this:

void tempDown() {
address();
one();
zero();
one();
one();
endZero();
zero();
one();
zero();
zero();
endOne()
}

The trickiest part was getting the timing correct. Since the Arduino wasn't exact to the microsecond, our signal and the signal we wanted to send were different lengths of time. To fix this, we hooked the infrared emitter and the infrared detector up to the oscilloscope to try to compare our signal to the remote. Below is a snapshot of the two (unfortunately out of sync) signals, with the remote in yellow and ours in blue.

Eventually, we were able to get the timing just right and managed to control the air conditioner! What's next? We have lots of ideas. Obviously, we want to be able to print out the next version of the circuit so we aren't confined to a breadboard. We also are considering trying to incorporate a Sparkcore so we can control this remote via wifi. Or maybe we'll eventually figure out how to program our own universal remote, effectively controlling the universe. Who knows! But for now, we're pretty psyched to be able to control the air conditioning.

Check out what we've got so far:

 

 




Alex Della Santina
Alex Della Santina

Author



Leave a comment

Comments will be approved before showing up.