Swap With Dell 9300

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, October 6, 2011

IR remotes

Posted on 7:22 AM by Unknown
As part of my home automation project, I also wanted to control my home entertainment system. The controller can be a web interface or an app on android phone, or even a universal remote. Which means, I have to be able to send IR signals from the arduino board that my TV, amplifier and set-top box can understand. For this I will first have to read the signal coming from the remotes, store the various signals and replay them from the arduino board depending on my needs.

Before going too far into the details of receiving and sending IR signals, it would help to understand how a remote control actually works. There is already a lot of material on the internet on how remotes work. So I will try to keep it short and simple.

The IR transmission from remote to your device works on a really simple protocol. The transmitter which is just an LED that emits light in the infrared spectrum, pulses the light in a quick succession and the receiver which is a phototransistor, converts the light signal back to electric pulses. Now to transmit information, the transmitter should send a bunch of 0s and 1s. Normally one would expect (at least I thought), a 1 would be represented by the LED being on and 0 would be represented by the LED being off. However all the data would then have to start with a 1 because only then will the receiver be able to start "listening" to the data.


One way to solve the dilemma of data always having to start with 1, is to have some kind of start signal (the header), to let the receiver know that the data is about to start, and that it should prepare for listening to the data.


Now what happens if there are more than 1 consecutive 0s or 1s? If we know that the pulse width is certain milliseconds then we can identify the consecutive 1s or 0s. But the problem however is the timing. The receiver's and the transmitter's timers should be perfectly synchronized. Otherwise 4 consecutive 1's from the transmitter could be mistaken for only 3 consecutive 1s, if the timers drift a little bit.


So to solve the problem, the IR transmitters and receivers actually use a combination of high and low to represent either a 1 or 0. The 1 is usually represented by longer high and smaller low. While a 0 is represented by smaller high and low. For example in the following drawing the 1 is represented by 1200 milliseconds of high and 600 milliseconds of low. A 0 is represented by 600 ms of high and 600 ms of low. The header is represented by 2400 ms of high and 600 ms of low.


This is the Sony protocol, used by all Sony remotes. Other remotes may have slightly different timings for 1s and 0s, but that is generally how most remotes work. Now there is just one more twist. The IR signal is finally modulated with a high frequency signal, usually between 38kHz and 40kHz. An IR signal modulated with 40kHz looks like this.


Finally, most remotes repeat the same signal at least 2 times. The sony protocol specified that it should be repeated at least 3 times, and the signal should repeat every 45ms.


That is all we need to know to get things started with automating home entertainment systems!
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in arduino, ir receiver, ir remote, sony remote protocol | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Installing Boxee on Gentoo: my experience
    You have probably heard of Boxee and Gentoo (come on). I wanted to give Boxee a try, because of all the movies and tv shows that I can watc...
  • InduinoX: Interfacing with LCD
    After my quick Hello World app , I became a bit more adventurous and decided to interface with the LCD screen that was part of the basic ki...
  • InduinoX and wireless relays: Part I
    It has been a while since I received my wireless relay and I finally got some time this weekend to put them to good use. The connections we...
  • IR remotes
    As part of my  home automation project , I also wanted to control my home entertainment system. The controller can be a web interface or an ...
  • InduinoX: IR receiver
    From my previous post , you probably understood how IR remotes work in general. Now lets take a look at how we can read the signals coming f...
  • Attesting General Power of Attorney in SF
    Recently I had to go through the motions of getting a General Power of Attorney (GPA) document attested in San Francisco. I am an Indian by ...
  • Google Chromium (the open source chrome browser) on Gentoo!
    Chromium is not yet complete no matter what I say here. Please do not post bugs or assume this is the final version of chromium. It still la...
  • What Darwin Never Knew: DNA
    I just finished watching one of the best PBS NOVA episodes - "What Darwin Never Knew". It is exceptionally good. I was finally abl...
  • VirtualBox additions
    I got everything working from with in virtual box, except for the additions. I was able to run VBoxLinuxAdditions.run (from the Guest additi...
  • Building a linux gaming PC: Update 1
    Today I received my 1GB memory, the upgrade I require to transform my media center desktop PC into a moderately powerful gaming PC. I am sti...

Categories

  • 555 timer
  • arduino
  • delay circuit
  • electronics
  • gentoo
  • home automation
  • induinox
  • ir emitter
  • ir receiver
  • ir remote
  • kubuntu
  • lcd
  • ldr
  • leds
  • lucid lynx
  • oscilloscope
  • picoscope
  • probots
  • receiver
  • relay
  • relays
  • scope
  • sensors
  • simple labs
  • sony remote protocol
  • transmitter
  • virtualbox
  • virtualization
  • wireless relay

Blog Archive

  • ▼  2011 (12)
    • ►  December (1)
    • ►  November (1)
    • ▼  October (6)
      • InduinoX and wireless relays: Part I
      • Scopes and electronics
      • InduinoX: IR Emitter
      • InduinoX: IR receiver
      • IR remotes
      • InduinoX: Interfacing with the LDR
    • ►  September (4)
  • ►  2010 (5)
    • ►  May (1)
    • ►  March (1)
    • ►  January (3)
  • ►  2009 (10)
    • ►  December (5)
    • ►  November (3)
    • ►  May (1)
    • ►  April (1)
  • ►  2008 (29)
    • ►  August (1)
    • ►  June (1)
    • ►  May (4)
    • ►  April (1)
    • ►  March (1)
    • ►  February (10)
    • ►  January (11)
  • ►  2007 (7)
    • ►  May (5)
    • ►  April (1)
    • ►  March (1)
  • ►  2006 (8)
    • ►  November (1)
    • ►  October (3)
    • ►  September (2)
    • ►  August (2)
Powered by Blogger.

About Me

Unknown
View my complete profile