Muting DSTV using Arduino
- by skullkey
I have been playing around with infrared remote controls as part of the upcoming Introduction to MSP430 course – Guy and I were looking for an interesting use of PWM and timers, so the suggestion was to produce an infrared signal using an IR led.
I set out to learn a bit more about IR and prototype using the Arduino. After searching online, I found Ken Shirriff’s excellent IR library for Arduino on Github: https://github.com/shirriff/Arduino-IRremote
It supports some standard TV remote controls and a “raw” mode which looked promising for controlling other things, e.g. my DSTV remote control, air conditioner etc
In this mode you can give it an array of unsigned integers. For example:
unsigned int raw[36]={250,842,242,2374,...,250,81862};
For background on how IR remote controls works check out this article on the irq5 blog. In short the signal is encoded in bursts of “on” and “off”. When the LED is on, it is PWM’d at a certain frequency. To use the “raw” mode, we need to know the PWM frequency (typical values between 35-40 kHz) and then the “on” and “off” durations. The array is then made as follows:
unsigned int raw[36]={"duration on","duration off",....};
Using an IR LED, a resistor (e.g. 10K) and an oscilloscope, one can readily discover the signal sent from the remote control:
Get involved
Visit us on a Tuesday:
- Join us at 4 Burger Ave, Lyttleton Manor, Centurion every Tuesday evening from 18.00 till late (bring a project to work on or beer)
Telegram Group:
- Send a message to Schalk on Telegram to add you to the group - currently >100 users, relevant conversations for makers
IRL:
- Schalk 082 777 7098
After hours only, please rather send telegram message - Toby
http://tobykurien.com
- Not active at the moment, if you are interested in presenting a course, please let Schalk know