"... and no one shall work for money, and no one shall work for fame; But each for the joy of the working, and each, in his separate star, shall draw the thing as he sees it, for the god of things as they are"

-Kipling

 

IRSky:
Manchester Decoder for RC6 and RC5 IR Remotes

Background

This project implements a Manchester Signal Processor with an associated RC6 and RC5 decoder. The software is written in C# and there are versions for Mono running on the Beaglebone Black and .NETMF on the Netduino Plus 2. The code is largely focused on interpreting the RC6 Mode 6 IR pulse codes sent by an SKY+ IR remote control - however it should work with minimal adaptation to interpreting the pulses sent by any RC5 or RC6 Philips TV IR remote control.

Why Write the IRSky Software?

One of the main things I would like to implement in my ongoing Wellity CNC router rehabilitation and modernization project is a Digital Read Out (DRO) and console. Besides displaying the usual position and status information, I would also like the console to be able to control the operations of the Wellity router. Basically I want a manual "jog" mode and also the ability to send commands back to the machine controller software on the PC (Mach 3) to invoke macros there. What is more, I want to be able to do all this with only minimal interaction with a computer keyboard.

So, in order to provide the part of the project that enables me to interact with the Wellity router in a keyboard free way, I have developed the IRSky software which will enable me to point a surplus SKY+ satellite box IR remote control at the console and have that console initiate actions based on the buttons being pressed. The choice of a SKY+ IR remote control is somewhat arbitrary being based on the facts that it a) has relatively few buttons, b) the buttons are big and hence suitable for my large shovel like peasant hands and c) I had one available.

The IRSky Software Hardware

The IRSky software runs on Mono running on the Beaglebone Black and .NETMF on the Netduino Plus 2 and expects, at minimum, an IR signal demodulator to be implemented to reduce the 38KHz IR carrier signal into pulses. I used the Sparkfun IR Receiver Breakout SEN-08554 for this and I must say it worked pretty well. You will also need to have some way of seeing which IR signals have been received once the software has decoded them. On the Netduino Plus2 I dumped these out to a Sparkfun 7-Segment Serial Display (COM-11442) via SPI and on the Beaglebone Black the code simply writes to the Console window.

Capabilities

What IRSky Software Does Not Do

The IRSky software is a Manchester Signal Processor. It does not have code which will interpret other types of IR Protocols such as the pulse width modulated Sony SIRC. Furthermore, the pulses processed by the Manchester processor are set to trigger on the 0.444 microsecond fundamental (1T) timing unit of the Philips RC5 and RC6 protocols. This value is a constant, easily adjustable in the code, and so other Manchester based signals could be implemented.

The code was developed for a SKY+ remote it has also been observed to work with a standard Sky remote but this was not extensively tested. No other types of RC5 or RC6 IR remote controls were tested.

Only the Decoders for the RC5 and RC6 Mode 6 protocols are included.

How it Works

Both the Netduino Plus 2 source code and the Beaglebone Black source code are extensively commented, however, a brief discussion of the function of each module is below:

A Note On SKY+ Remotes in TV Mode

SKY+ IR remote controls operate in two modes: SKY mode and TV mode. SKY Mode is activated when the SKY button is pressed and most buttons will then emit IR codes which use the RC6-6-20 protocol. TV mode is activated when the TV button is pressed. The IR codes emitted in this mode are intended to control a TV, not the Sky box, and since TV's use a wide variety of IR protocols the codes output are dependent on the current TV setting of the SKY remote. If the SKY remote is configured to a Philips TV then the output codes will be RC5. It is up to the user to configure the Sky+ IR remote to the type of TV.

There are specific exceptions. Some buttons (Volume+/- and Mute) always emit the configured TV codes even in SKY mode. A few buttons (Play, Pause) send as yet unknown (to me) codes in TV mode and some buttons (TV Guide, Box Office) always toggle SKY mode back on and then send a SKY mode code.

If the remote has been configured to for use with a Philips TV, the IRSky software handles the intermixed RC6 and RC5 signals from the SKY+ IR remote control (Sky mode or TV mode). This is easily done using the 0081 four digit brand code.

The SKY+ IR Remote Control Codes page documents what I have been able to uncover about the codes sent by a SKY+ remote control.

License

This software is offered as source code under the terms of the MIT License.

Source Code

Web browsable versions of the IRSky Netduino Plus 2 Source Code and the the IRSky Beaglebone Black Source Code are available. The C# to HTML conversion was performed by the CoDocker software.

Download

Acknowledgements

Various internet resources were used to help understand the RC5, RC6 and RC6 Mode 6 protocols. Especially useful was San Bergmans SB-Projects site which comprehensively documented the RC5 and RC6 IR protocols. Thanks San!

RC6 PROTOCOL
    http://www.sbprojects.com/knowledge/ir/rc6.php
    http://www.pcbheaven.com/userpages/The_Philips_RC6_Protocol/

RC6 MODE 6A PROTOCOL
    http://www.guiott.com/wrc/RC6-6.html

RC5 PROTOCOL
    http://www.sbprojects.com/knowledge/ir/rc5.php

NETDUINO
    User "Phil" on the Netduino forums has also provided a Manchester RC6 code which works with SKY+ remotes - however it does not handle RC5 so the TV mode specific buttons (such as Vol+, Vol- and Mute) cannot be recognized. http://forums.netduino.com/index.php?/topic/185-rc6-decoder-class/

Images

A SKY+ IR Remote Control