I’m currently trying to control my AC via my Imp, but sadly it seems a lot more complicated than it is in Arduino-land.
I’ve done it with an Arduino utilizing the IRremote library (https://github.com/shirriff/Arduino-IRremote) and it works flawlessly on all of the remotes I’ve tried.
I can ‘sniff’ the signal with a IR receiver, store it and then replay it using a simple IR LED.
What’s the easiest way to do this with the Imp?
I’d really hate to have to integrate my Imp with an Arduino just to be able to incorporate IR into my project…
Please, help me out!
Thanks in advance!
Here’s a project @tom made that does pretty much exactly what you’re looking for
The “secret sauce” is figuring out how to bit-bang the remote control codes; squirrel can be very timing-inconsistent, so you need to use the SPI interface to bang out the codes in a timing-consistent manner.
The other important piece is that the remote control code needs to be used to modulate a carrier frequency (usually 38 kHz here in the US, sometimes 56 kHz, especially in Europe). If you have a look at the schematic, you can see that the Sana design does this by producing the carrier wave with a PWM_OUT, then ANDing the carrier and the code signals together.
There are links in the project page that take you to squirrel classes for both IR learning and IR code transmission. The IR learn class outputs the raw code as a string, and the IR TX class takes in a code as a string - simple.
Please give a loud shout if you need a hand understanding the hardware!
Hi and thanks for the replies!
Really love the e-imp community!
Sadly, doing this seems a lot more complicated with the Imp than it is on the Arduino…
There you can just pass by with a phototransistor and an IR LED without any other circuitry and the library is really straightforward…
Thanks for the hard work on making this possible, though, and I’ll try to make it work based on your sana project.
btw, Are you thinking of offering the sana commercially any time soon?
Let me know - thanks!
I was thinking of the IR detector and visible LED myself.
I have a circuit to test IR remotes by converting the IR pulses to visible LED.
I’ll try to find it and post it.
Here’s a circuit:
I have a question for @tom - First off, great job on the Sana! Everything seems very clearly laid out and explained for such a complicated project!
I’ll be looking to breadboard only the IR Receive / Transmit parts of the project and I’m having some difficulties deciphering which components I’ll need to get for this as well as their their non-SMD counterparts…
Do you by any chance have a list for that, similar to this: http://devwiki.electricimp.com/lib/exe/fetch.php?media=impee-sana-bom-20130724.pdf
I think I’ll be able to make sense of the schematics and the source, but having such a list would really be a time-saver.
Thanks in advance and have a great day!
@tom - Do you have a BOM with the non-SDM counterparts for the Sana since I’ll be trying to breadboard it? Sorry for asking again, but it would really help me out to breadboard it.
Thanks in advance!