38 kHz IR communications tutorial

Learning about how infrared remote controls work is a great way to expand your electronics knowledge. That’s because this technology is invisible to our eye, and happening faster than we can comprehend without help from test equipment. This tutorial over at Pyroelectro talks about the theory behind how the data is transferred and shows you how to build a couple of circuits to experiment with and communicate through infrared light transmissions.

Instead of going with an IR receiver module you’ll build your own using a photo-transistor and an operational amplifier. The Opamp is used to amplify and invert the signal picked up from the IR transmission of a common home entertainment remote control. From there the digital signal is read by a PIC 18F452 microcontroller for processing. But if you want to use a different microcontroller there’s still more than enough usable information to get you across the finish line.

Comments

  1. Stryker says:

    THis is wonderful, I’ve been trying to figure out how this stuff works… (I mean I know the basics and all but I don’t have an oscilloscope [and I'm too cheap to get one] so I’ve been somewhat stumped.)

  2. andres says:

    @stryker

    FIND AN OSCILLOSCOPE! i waited years to get mine and if there is one tool i would kill to keep it would be my scope. comes in handy every day.

  3. izzy84075 says:

    That’s certainly one way to decode remote control signals. I’d have poked around with it until I figured out the actual protocol being used, but for this purpose it works.

    I’ve been working with two-way communications, though, so I actually have to worry about the protocol involved. This is a good starter project, though, other than the PIC, I think. Last I checked, PIC programmers were either expensive or annoyingly difficult to use.

  4. Sprite_tm says:

    Hmm, the setup is kinda fail. Integrated devices (like the venerable TSOPxxxx-series) use a bandpass-filter to get only the light intensity at 38KHz. This schematic will have massive problems when either a light source shines directly into it or something like a TL-tube is above it: because the 100Hz-signal it emits will mix with the 38KHz signal, the PIC won’t be able to discern between the two.

  5. fartface says:

    “I don’t have an oscilloscope [and I'm too cheap to get one]”

    Living in a cardboard box must suck. Last Oscilloscope I bought cost me $35.00 WITH a new probe. How do you get internet access living on the streets like you do?

    Oscopes are CHEAP, buy used, you dont need a 2ghz 8 trace color scope. a 5mhz old single trace is more than enough for 90% of what tinkerers do.

    • Nick says:

      I agree. I got a 20mhz dual trace from a school for free. They were getting rid of their old equipment for newer stuff. Later I buckled and got myself a rigol dso1052.

      I love my o’scopes.

  6. fartface says:

    Easier way to mess with IR remotes. get frisking IR remote receivers and it eliminates 90% of the parts, IR in, digital signal out. in a $0.29 part.

    I like the older 10base2 cards that had the 15 pin cable on them, you could hook them up to a IR led transmitter setup and a IR receiver setup and create a optical ethernet connection quite easily.

  7. alan says:

    @fartface

    please tell me where you can get an scope for $35.00. single trace 1Mhz scopes cost around $70.

  8. mess_maker says:

    I picked up a nice 60mhz o’scope from Craigslist for $40 from someone who ( I don’t think ) knew what they had. It is in very good condition except it didn’t come with probes. It isn’t a digital scope, though, it is perfectly capable of handling anything that I will be throwing at it for the foreseeable future. When I need to step up to a better scope I can always do that in the future.

    For anyone out there that cares, about a week later I picked up a nice frequency generator for $50. If you take your time you can find nice things, in your area, for affordable prices using the internet super highway :)

  9. Macpod says:

    @alan

    Craigslist, ebay, and ham[ radio] fests.

  10. Macpod says:

    Forgot to mention surplus auctions in your area too.

  11. scatterbrained says:

    I agree TFA was lame. He didn’t even mention the fact that most digital cameras will pick up IR and display it as visible so you can see what’s going on with the transmitter.

    I especially thought the part where he said there were no standards was dumb. The problem isn’t that there are no standards, the problem is that there are too many and everybody messes with them to avoid licensing fees. That’s why a universal remote has to have a manual with 6 pages of codes for every TV ever made.

    Philips RC5, Sony’s and a few other codes are pretty well documented. Linux LIRC project has some good info as well. http://www.sbprojects.com/knowledge/ir/ir.htm is a good source as well.

    Also not all IR is 38 kHz, IIRC there’s also 36 kHz, 40 and 56 kHz in common use.

  12. Doktor Jeep says:

    Stuff like this makes the internet useful.

  13. Tinkerer-r2d2 says:

    Old hint but still useful. Yes, you can get all the bells and whistles with an IR receiver, but an IR transistor has the advantage you can do something else with it than just decoding remote signals and it’s 50% cheaper anyways. If you buy in 100 quantities like I do, I won’t like to pay 10 bucks for a lot of IR receivers when I can do the same with a lot of transistors for just 4 bucks. An mcu is capable of doing the decoding and also doing the amplifying with an adc pin. Saves the opam.

    Regarding scopes: I had a scope and hardly ever used it. Bought it 35 years ago, but sold it 10 years ago. You can do almost all the tinkerer stuff without a scope. Just THINKING makes the difference. Having a scope is a nice to have tool, but it’s not really needed for a thinking tinkerer. Where scopes make more sense imho is if you have to repair something without having a schematic, that kind of case.

    Have a wonderful day, together!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,434 other followers