Invalid syntax for [github owner="..." repo="..." latest]

Infrared Support

Infrared (IR) is a common technology one can find in variety types of daily devices. Basically the infrared signal is no more than light with a longer wavelength than visible light. The infrared emitter can be compared with an LED but emitting radiation with a longer wavelength than the ordinary LED. Furthermore the IR receiver is a microchip with a photocell and appropriate IR filters. It contains a demodulator which detects modulated signals around 38 KHz. A digital IR receiver we are using in this project outputs low (0V) if no signal was detected and high (5V) if a modulated IR signal was detected. A more detailed introduction to IR can be found in this tutorial.

Software

To translate the digital output into information, vendors introduced a various number of protocols. Some of those them are implement in an Arduino library called IRremote we found on Ken Shirriff’s blog. This library supports a growing number of IR remotes including NEC, Sony, RC5 and RC6. Unfortunately not all common protocols are supported since for example remotes of Grundig TV’s can’t be understood. Since we want our software to support a wide range of IR remotes we abandon the use of protocols but furthermore use the underlying high and low pulse lengths that can be accessed by the mentioned library, too.
Please refer to the Wiki on Github or Ken Shirriff’s blog plost for more details about the IRremote library.

Hardware

To build an IR emitter, we use two IR diodes and an additional NPN Transitor to control the diodes. To increase the range of the IR sender, we run the IR diodes with 12V from VIN which requires an external DC adapter for the Arudino box. The transistor is used to trigger the IR diodes and it is controlled by one of the 5V pulse width modulation (PWM) output PIN’s of the Arudino IC. In case of an Arduino Ethernet Board, PIN 3, 5, 6, 9 and 10 provides 8-bit PWM analog output and can be used for this purpose.
The IR receiver works out of the box and must only be connected to a 5V voltage input and ground. The signals can be received through the third PIN which is connected to a digital input PIN of the Arudino board.

To ensure the PWM support of the emitter PIN, the PIN number if defined by the IRremote library in IRRemoteInt.h. The default PIN for the IR receiver and the status LED are defined in server.h and can be adapted to your needs in main.cpp as follows:

HomeControlServer hcs;

// PWM output PIN is given by IRremote in TIMER_PWM_PIN,
// see IRRemoteInt.h.
hcs.enableIROut();

// PIN connected to IR receiver.
hcs.enableIRIn(IR_RECV_PIN /* 5 */);

// PIN connected to the positive (long) leg of the status LED.
hcs.enableIRStatus(IR_STAT_PIN /* 9 */);