Swap With Dell 9300

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

Tuesday, October 11, 2011

InduinoX: IR receiver

Posted on 8:58 AM by Unknown
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 from various remotes that you might have.

Fortunately for us the InduinoX board comes with an IR receiver. And the good news is that some one already wrote the code to read IR signal from arduino! Just copy the code from http://www.arduino.cc/playground/Code/InfraredReceivers, replace the value of IRpin from 2 to A1, because on InduinoX, the IR receiver is connected to analog pin 1. Compile and upload the code to InduinoX.

The code basically sets up the serial port to 115200 baud rate, then sets up timers (read this excellent tutorial on PWMs on arduino), finally the code waits on the IR receive pin for the signal to change (the signal changes when a button on a remote is pressed pointing to the IR receiver). Then the code keeps track of the time it takes for the signal to change from high to low and low to high. At the end of the signal transitions the code prints the timing information. The output looks like

0 0
2476 0
2476 1
3000 1
3000 0
3664 0
3664 1
4204 1
4204 0
5472 0
5472 1
:

Save the output to a file. The output can be used by gnuplot to display the graph of the signal. Make sure you have gnuplot installed on your machine. I used these commands

$ gnuplot
set yrange [-1:2]
plot  "/home/chandanp/temp/vol_up.txt" with lines title 'signal'

And my output looks like this


Notice how the signal repeats itself 2 times and then there is a partial signal at the end. If you happen to have an oscilloscope, you can use the probe on the IR receiver data out pin to see the output on the scope. I have a picoscope 2205 (perhaps a blog post on that later) and the output on the scope looks like this


Since the signal repeats itself every 45ms, here is a closer look at the signal.


Notice that the signal is inverted. Knowing that 0 is represented by 600ms of high and 600 ms of low and a 1 is represented by 1200ms of high and 600ms of low signal (see my previous blog post if you don't know how I arrived at these numbers), the code for volume up on my remote control is 0x490 (0100 1001 0000). In my next blog post, I will show you how I was able to change the volume on my TV by sending the signal 0x490 from InduinoX and pointing it at my TV!
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in arduino, ir receiver, ir remote, picoscope | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • 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...
  • Scopes and electronics
    An oscilloscope is very important for any electronic enthusiast. Recently I have been trying to send IR remote codes from an arduino board ...
  • Dell Recalls Batteries
    Ahh the news could not have come at a better time. I was having problems with the battery that came with my Dell Inspiron 9300. Just 7 days...
  • XBMC / Boxee remote control android app
    I have been writing a few android apps over weekends at home and during 20% time at Google. However I never actually released any of them in...
  • Elisa problems marshalling MediaUri
    The short version If you are having problems with elisa not playing your local media files (see https://code.fluendo.com/elisa/trac/ticket/9...
  • nVidia ION for HTPC
    This is an exciting time for buying HTPC devices. They come in really small sizes, they are efficient and yet can playback 1080p video and b...
  • Purchase experience with Probot
    I have recently posted my purchase experience with Simple Labs . This post is the continuation of that. That same day I ordered these compon...
  • 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 ...
  • gtkdocize not found
    If you are ever configuring an app and see the message "gtkdocize not found" in Gentoo, then you need to emerge gtk-doc. I had som...
  • Testing AdSense and Getting Things Done
    Working in Google and not having an AdSense account is not cool. So I created an account and added the AdSense page element. Looks good. Alt...

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