Monday, October 31, 2011

Wireless Infra Red(IR) TSOP Design Tutorial 2

May the peace and mercy of Allah be with y'all.


You guys!We continue our journey in Infra Red (IR) communication in more practical approach. From the previous introduction article, IR pulse frequency play important role in determining the TSOP IR detection sensitivity level. How do we start?? Below is how we calculate the timing. Lets go!
From the calculation above, we need to light on the IR LED for 12.5us and turn it off for 12.5us. This is for a period/cycle. Repeating this cycle will generate IR LED pulse oscillator of 40kHz!

Go grab your Microcontroller (uC) or any IC that can generate pulse like we discussed. *I prefer uC as I can easily tune the frequency by modifying my code and not my hardware.

Eg : Carrier pulse 40kHz using mikroC and PIC12F629(cute and small uC). We can't set 12.5us delay as the input x to the function delay_us(x) as x should be round integer and not floating number.

While(1)//forever loop IR LED on and off producing oscillating pulse!
GPIO = 0xFF; //IR LED on
delay_us(12); //wait 12us
GPIO = 0x00; //IR LED off
delay_us(13); //wait 13us

The actual result : Use oscilloscope to probe at output pins.

On time(Delta) = 12.40us
Off time(Delta) = 12.01us

Period/cycle = (on time + off time) = 24.41us ;
1/Period = frequency = 40.9668kHz(Good enough!)

Oscilloscope helps a lot. From my experience, when the frequency is not exactly at the right specification (error = +/-1kHz), the TSOP sensitivity decrease! Some cases, I need to place the IR LED extremely close to the TSOP receiver to make it detectable!!! (T^T). Please verify your frequency pulse generated. Don't 100% trust on the code you write(especially high level coding) for timing restriction coding unless you use assembly language with precise calculation.

Monday, October 24, 2011

Wireless Infra Red (IR) TSOP Design Tutorial 1

May the peace and mercy of Allah be with you.


More than a years I haven’t post any article in this beloved knowledge-base blog! I miss vortex electrica so much.OK! This time we talk about an idea on how to make a IR communication from scratch!

Component: TSOP4840,TSAL6200(IR LED 940nm wavelength)

I choose TSOP4840(use in my own project) as IR receiver. It was design to be used inside remote control(TV,DVD player..etc). When we know how to design it, we can implement it anywhere such as in robotic project. Below is the internal circuit of it.

From the block diagram above, we can see the internal circuitry of the TSOP48XX. Band Pass filter is the most important part where it can filter out the noise from ambient IR wave.*TSOP4840 (40 = 40kHz bandpass filter,38 = 38kHz,52,36) .

What the bandpass filter do???? it reject any light which have frequency other than 40khz. In non-technical way represented as cartoon below. (^^)

You can read the pins assignment from TSOP4840 datasheet,the circuit for the receiver shown as below/datasheet:application_circuit.

TSALXXXX is a IR LED. Ignore the transmitter part 1st. In my design, +Vs I used is +5V. The OUT pins can be left unconnected 1st to test it functionality. When the voltage +Vs and GND supplied, the OUT value should be high almost ~5V. TSOP48XX working in active low mode, if it detect any IR light pulse ~40kHz,the the OUT pin will be ~0V!

This Infrared receiver(TSOP) only sensitive to an IR light pulse 40khz with 50% duty cycle. From the data sheet, the minimum 10 pulse should be send by the transmitter to make the TSOP able to detect it.Link

That the introduction, in the next tutorial, I'll show you the working example + video!

See ya!

Wireless InfraRed(IR) Design Tutorial 1

Wireless InfraRed(IR) Design Tutorial 2

Related Posts Plugin for WordPress, Blogger...