Connect with us

IR transmitter and receiver.

Discussion in 'General Electronics Discussion' started by eptheta, Apr 15, 2010.

Scroll to continue with content
  1. eptheta

    eptheta

    188
    0
    Dec 20, 2009
    Hi,
    I wanted to build an IR-transmitter-receiver system to send signals to a device....
    Let's say the device is a simple blue LED (just to make life easier...for now)
    I've gone through several websites, and this is what i've learned:

    1. I need an IR LED to blink at a specific frequency (say 40khz)
    I found this circuit implementing a 555 oscillator, and this seems reasonably simple...
    [​IMG]

    2. I need an IR sensor tuned to that particular frequency, i.e 40khz.. For which i have model numbers.
    Now i am unsure about the circuit for the receiver. I know that the receiver module has 3 terminals:
    ground-0V
    VCC-+5V
    signal=???
    Other than this, i'm not sure what the circuit involved is.

    Thats all the information i've acquired for now. If anyone can help me get this project started, i'd be very grateful.

    If this has been covered in another post, please redirect me to it ? Otherwise, i'd appreciate all the help i can get.
    Thanks.
     
  2. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
    The signal output of those integrated IR-receiver modules will go high (5V) when it sees a 40kHz IR-light. They contain all the needed tuning & demodulation circuits.
     
  3. eptheta

    eptheta

    188
    0
    Dec 20, 2009
    Thats all ? That simple ?... Well thats nice....
    Thanks.... I'll try it out and post here if i have any problems...

    Also, if i want the same IR LED to blink at different frequencies, can i just connect it parallel to two oscillators of different frequencies or will that mess things up ?
    Will i have to use two IR LEDs if i want to have two control signals instead of one ( i.e to light up a blue LED with one button and a red with another) ?

    Thank you.
     
  4. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
    As far as I can tell from your model-number-less description it should be that simple. Some receivers are not meant for "static" signals though, and the output could be inverted for all I know.

    Mixing carrier waves can be done both ways. Doing it the electrical way requires it to be designed the correct way; swap places of R1 & the LED's, and use two R1's - one for each 555.
     
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,397
    2,777
    Jan 21, 2010
    Another point is that the IR receivers have a fairly narrow bandwidth.

    Once you adjust your simple transmitter to activate the receiver, the easiest indication that you are close to the centre frequency (and the peak of their sensitivity) is the range over which the circuit will operate.

    From the look of your circuit, the adjustment may be quite coarse. You might like to consider a multi-turn trimpot
     
  6. eptheta

    eptheta

    188
    0
    Dec 20, 2009
    Hi,
    I've assembled a 555 timer chip to run at 38 khz and power an IR LED as per this circuit diagram i found on a website..
    [​IMG]

    I have two problems now.....
    1. I have no real way of telling if my IR LED is actually oscillating at 38 khz or not (since my multimeter doesn't have a frequency setting)
    2. I am unsure of the receiver circuit. I have a TSOP1738 chip which should run at 38khz.. Unfortunately, I do not know what to connect to the output of the chip ? (Just an LED or an elaborate setup of amplifiers etc...)

    If anyone knows what circuit i have to implement on the receiver end using the TSOP1738, please guide me...

    Also, if there is any problem with the circuit diagram of the transmitter (which i have already assembled) then please alert me !

    Thanks !
     
  7. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,397
    2,777
    Jan 21, 2010
    Measure the voltage on pin 3 of the 555. If it's not oscillating you'll read either 0V or 5V (or very close to). If it's oscillating with a 50% duty cycle it will read near 2.5V.

    The IR receiver's output can source 5mA, so you can drive a LED as long as you choose an appropriate resistor so that the current is mA or less.

    The specs show you how to wire it up.
     
  8. eptheta

    eptheta

    188
    0
    Dec 20, 2009
    Voltage on pin 3 registers as 3.18V..... Is there something wrong here which i have to correct ? My input voltage is 5VDC....
    Also, my R3(47Ohm) resistor is becoming very hot.... (nothing else seems to be)

    Another question i wanted to ask...
    Whats the operating voltage of an IR LED ? I think i may have fried mine....

    Thanks
     
  9. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,397
    2,777
    Jan 21, 2010
    What wattage is the 47 ohm resistor. By my estimation it should be dissipating just over a twentieth of a watt. The IR diode may also be getting a little warm, and the 2222 transistor likewise (they're all dissipating a similar amount of power)

    If it's a small resistor it may be getting quite warm, but it shouldn't be anything to worry too much about.

    3.18V is close to what I'd expect a meter to read. What does it read on an AC range?

    The IR LED probably drops about 1.7V
     
  10. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,397
    2,777
    Jan 21, 2010
    Where did you get that 555 circuit from. It does look unusual.

    I won't say wrong right now, but certainly very unusual.
     
  11. eptheta

    eptheta

    188
    0
    Dec 20, 2009
    I got it from here...
    http://www.robotroom.com/Infrared555.html

    I was going to use the standard template and then calculate resistance and capacitance using f=1.44/(R1+2R2)*C from here:
    http://www.doctronics.co.uk/555.htm

    But i couldn't find suitable resistance and cap values for it to work..And besides, i wasn't sure how to test if it was exactly 38khz, so i decided to use someone else's...
    If you think it would be better, i'll switch to the standard form of this circuit... But i will need your help calculating the right values for R1, R2 and C..........

    What do you think ??

    EDIT:
    I'm not sure exactly how to measure AC, but here's what i tried..
    -Multimeter at a setting saying V~
    -at 200 setting

    It reads 6.6 irrespective of what my variable resistor value is... Is this a problem ?

    Thanks..
     
    Last edited: Apr 18, 2010
  12. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,397
    2,777
    Jan 21, 2010
    I've checked out that oscillator now I'm awake :) Yeah, it appears OK and the values are reasonable.

    If you want 38kHz, then the combined resistance of R1 and R2 should be near 19k. You'll also find that the adjustment using R2 is really coarse. I would recommend getting a 500 ohm trimpot and placing it in series with the 5k trimpot. (or better a 10 turn 5k trimpot with a 100 ohm trimpot in series). Let's call the additional trimpot R22.

    Start with R22 centered. Then adjust the R2 for a total resistance of the three resistors (R1, R2, R22) of 19k.

    Start up the circuit and see if your detector detects it. If not, adjust R2 until it does (if youre not using a multi-turn pot, the adjustment may be minute, with a 10 turn pot, maybe half to 3/4 of a turn either way (a lot depends on how stray capacitance affects the oscillator).

    Once you have the detector detecting the signal as best you can with R2, adjust R22 to get the best range. Note that if you have to move R22 completely to one end, you may have to adjust R2 a smidgen more.

    Because it's an RC oscillator, the frequency may change with all sorts of factors including temperature, humidity, battery voltage, the presence of your hand (or screwdriver doing the adjustment). Using plastic adjustment tools will help prevent unusual behaviour during your tuning operation, but at this frequency are probably not required.

    Oh, you may be able to test your IR receiver by pointing any old remote control you have at it and pressing buttons. Be aware that some IR controls use different frequencies, so you may have to try a few before you find one that works. If you're anything like me you probably have half a dozen for controlling all manner of things that sit around your TV.

    The AC voltage of 6.6 is reasonable and confirms that the circuit is oscillating. The DC voltage gives you the average (which should be about half the input voltage. The AC reading gives you the rms value of the signal (or some approximation if it). This should be equal to the supply voltage in this circuit. The variations are understandable as your multimeter is probably not suited to measurements at this frequency and almost certainly does not produce a true rms reading even at lower frequencies.
     
  13. eptheta

    eptheta

    188
    0
    Dec 20, 2009
    Alright.. I made the receiver circuit and it didn't work too well... (mainly because i didn't have all the exact capacitor values and resistors)

    I did however do something else......
    [​IMG]

    I'm not very good at putting resistances and diodes where they are necessary, so could you help me out a bit here ?
    +5 is +5 Volts DC....G is ground...The blue circle is an LED..... Out is the output from the chip.
    I used a remote control to check if i get an output, and i do, but it has barely enough voltage.
    On a multimeter, the reading registers as about 1.2V.
    Also, the LED blinks at the same frequency that the remote control IR LED does.

    So i now have two tasks( that is until i get the right capacitors/resistors )
    1. Amplify voltage: I want the voltage to get up to 5V, without using an external voltage source... Is there any way i can ? ( i can't use an op-amp cause i need a 9V source...)
    2. Get the blinking to stop and make it constant DC voltage...... Any ideas ?

    I will try and sort out the receiver module first before testing the 38khz transmitter, that should get something out of the way.
    Thanks for all the help so far !
     
  14. eptheta

    eptheta

    188
    0
    Dec 20, 2009
    Alright, since my last post, i assembled the circuit and tested it on my parallel port. The blinking stays but i realized that if i just compensate for it in my program i could easily detect it and use the signal as if it was just DC.... That part is fine now...
    A new question arises from an observation:
    I used a TV remote to test this circuit and realized that every button on the remote caused the LED to light up(or sends a signal to the parallel port)... i.e all the number buttons, the volume +/-, the off button, everything !
    Does this mean that my TSOP1738 picks up all sorts of frequencies including and other than 38khz ? or is it just my remote control that uses 38khz (i really don't think this is a coincidence)

    Also, this said, can i use another module of 40khz to send a different signal using a different transmitter or will one module end up picking up both frequency signals ?

    I need this information because i want to send two commands (to two different parallel port inputs) to control volume up and volume down functions..
    I need two different signals for the two different buttons, but i am unsure how to achieve this.

    Please do advice me...
    Thank you.
     
  15. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
    38 & 40kHz is too close to each other for receivers to differentiate between.
    The 38kHz is a carrier frequency. On this is superimposed (in other words modulated) a serial data train. Each blink you see is a full train of many bits.
    So, you need to decode/recognize the data stream bits, in software.
     
  16. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,397
    2,777
    Jan 21, 2010
    With a correct transmitter, the LED should not blink.

    The remotes are sending code, delay, code, delay, code, delay (typically) as long as you hold your finger on the button.

    Each time it sends a code you see the LED flash.

    Howerer each code is a very rapid combination of ons and offs that decode to a specific button.

    each of those on's is the result of the transmitter sending (say) 10 pulses at 40kHz (or 38kHz (or whatever)

    You don't see the 38 kHz on the output. It stays high whenever it is present (it may take a couple of cycles to realise though)
     
  17. eptheta

    eptheta

    188
    0
    Dec 20, 2009
    Nothing seemed to work right, so i revamped my entire design.
    It works fine, but i need to increase range somehow. How can i do this....?
    Here are my new designs:
    Transmitter:
    I decided not to go for designs i just found on the net, so i used this site astable 555 calculator to calculate resistor and capacitor values to get the correct frequencies(successfully)
    -2 555 timers, one running at 38khz and another running at 10hz/20hz (for my 2 commands)
    -the 10hz/20hz powers the 38khz so i get a 10/20hz square-wave of 38khz square-waves...

    Receiver:
    -Same as last time--- Receiver module connected to an amplifier, connected to my parallel port...

    I now need to increase the range of my transmitter-receiver pair.
    Any suggestions ?

    Thanks
     
  18. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
    The robotroom page you linked to has the answers, halfway down - yellow & white text windows.
    : Reduce the duty cycle from 50% to 10% and crank up the peak current 5 times or whatever the LED spec's allows. Put 2 leds in series, or more if you have >5V available.
     
  19. eptheta

    eptheta

    188
    0
    Dec 20, 2009
    Greetings...
    I've developed a snag in my project...
    My hardware works up to a certain range(about 20 cm)...
    I've followed all procedures i could find on improving the range of the transmitter with little success....

    I'd like someone to verify my software algorithm and see if i am doing things right.
    1. increment variable x=0 in a loop until parallel port pin connected to the output of my TSOP1738 goes to zero (i.e LED is off)
    2. compare the value of x to specified parameters and execute appropriate command

    For my 5hz 38ksignal, the x is about 14000 and for the 10hz 38ksignal its about 8000..
    I could reduce this, but that isn't my priority right now.
    The difference is relatively large and my program is able to ignore any noise as the random noise's x values are something like 50 or 100.

    The problem is, when i move away from my receiver, my x values change. That is when i increase range, my program has to change as well....
    I can't create an adaptation program or anything like that, so my only hope is to increase range so that i get a constant value of x at any distance.

    If this doesn't make sense, I'll try to elaborate further.
    Basically i need range, i just wrote down my algorithm to find out if there is another way to get at it.....

    Thanks.
     
  20. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,397
    2,777
    Jan 21, 2010
    If you're trying to identify the frequency, it may be best to look at the interval between the times the output of your sensor turns on.

    It possibly takes longer to respond to the input signal when the signal is weaker, so the time that the output stays high could indeed vary, however the time between the start of subsequent pulses should vary far less.

    Your IR diodes may not have peak emission at the peak of the receiver's sensitivity. Have you checked this? That may greatly affect your range.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-