Tone-Decoder vs IR Reciever Module

Thread Starter

WylieZA

Joined Jan 16, 2018
8
Hi there,

I am trying to build an IR receiver from the ground up using the RC-5 protocol. I am aware of components such as the TSOP382 (IR receiver) that does this all in a neat little package, however, I am trying to build a receiver from the ground up using a photodiode.

I have broken this problem into modules and I am using a tone-detector (LM567) to convert "the presence of a 36kHz tone" into a logic level. This is where I am having an issue. The tone-detector is incredibly slow to detect the tone and not only that, it goes through a period of oscillation before it settles after detecting the presence (or absence) of the tone.

To give some context, this is my first time working with a tone decoder, so I'm not sure if I have made a bad circuit or if tone decoders are actually this slow. Ideally, I want to match or come close to matching the performance of the TSOP382 (IR receiver) because otherwise, it will be too slow and not be able to decode any RC-5 packets.

To illustrate my issue, I have taken screenshots of traces on an oscilloscope and also drawn out my circuit. Please note that the center frequency was determined empirically and that the circuit is built on a breadboard. Originally I calculated I would need to use a 910-ohm resistor on T-Res, but ended up finding ~230-ohms produced the center frequency I require.

tonedecodercircuit.jpg

In the following image, the red trace is the 'signal' and the blue trace is the 'output'. As the screenshot shows, the LM567 takes 8ms before it reacts to the signal. When it finally does react, it oscillates for around 1ms before settling on a new output value.

tonedecoder_image1.JPG

To contrast this, I did the same experiment using the IR receiver (TSOP382) and the following screenshot shows the performance:
ir_receiver_image1.JPG

The IR receiver module takes less than 150uS to detect the presence of a 36kHz tone and it does not oscillate when it transitions. (Note: the input signal is 'ugly' because I am physically connecting the signal by hand - it does become 'clean' later in the trace)

These are some of my questions:
  1. Am I expecting too much performance from a tone decoder or is my circuit design unstable and causing the slow response? (perhaps due to using a breadboard)
  2. If I am expecting too much performance:
    1. What are some of the other options to explore? (Faster tone-detectors? Other IC's to do this job?)
    2. What kind of performance is to be expected?

Thanks in advance!
- Justin
 

ericgibbs

Joined Jan 29, 2010
18,766
hi Justin,
Have you considered how you are going to decode the IR receiver output into doing the required actions.

Low cost IR detectors, giving a digital output are available.

I use a Arduino Nano for converting the IR pulse codes.
On the same project I have a IR Emitter, so I can use it to Read and Transmit codes RC5 and some other coding.

E

Look thru these devices ie: the KY 022

https://www.ebay.co.uk/sch/i.html?_...tleDesc=0&_osacat=0&_odkw=IR+detector+modules
 

BobTPH

Joined Jun 5, 2013
8,804
Have you read up on the TSOP? It goes to great lengths to process the signal and get a reliable response. You will have a hard time duplicating its performance with analog circuitry.

Have you considered a micro and digital signal processing?

Bob
 

Thread Starter

WylieZA

Joined Jan 16, 2018
8
hi Justin,
Have you considered how you are going to decode the IR receiver output into doing the required actions.

Low cost IR detectors, giving a digital output are available.

I use a Arduino Nano for converting the IR pulse codes.
On the same project I have a IR Emitter, so I can use it to Read and Transmit codes RC5 and some other coding.

E

Look thru these devices ie: the KY 022

https://www.ebay.co.uk/sch/i.html?_...tleDesc=0&_osacat=0&_odkw=IR+detector+modules

Hi Eric,

Thanks for your response... I assume you are talking about detectors such as the TSOP382 which I am comparing to the tone detector, in which case, I have considered them as an option but I am specifically trying to build a receiver from 'scratch'.

This module I'm trying to create forms part of a larger project and I have spent some time considering how I will decode the output from the tone detector (or IR receiver).

- Justin
 

Thread Starter

WylieZA

Joined Jan 16, 2018
8
I wrote a blog on this using a Panasonic PNA4602M interfaced to MSP430.

https://forum.allaboutcircuits.com/ubs/msp430-tv-remote-decoder.570/
Hi Mr. Chips,

Thanks for the response. The blog looks great, but I am specifically interested in 'manually' detecting the 36kHz IR flashing using a photodiode and tone detector. Which has resulted in the question I have relating to this issue specifically. I have already made headway on systems for decoding etc.

- Justin
 

Thread Starter

WylieZA

Joined Jan 16, 2018
8
Have you read up on the TSOP? It goes to great lengths to process the signal and get a reliable response. You will have a hard time duplicating its performance with analog circuitry.

Have you considered a micro and digital signal processing?

Bob
Hi Bob,

Thanks for your response.

I have spent some time in the datasheet and looking at the block diagram I can see it has various components all working together to create a complex device. Having said that, I would have thought that the same complex circuitry would be available in a stand-alone IC (to oversimplify -> basically an IR receiver but without the built-in photodiode).

I was under the impression that a tone detector is that 'device'. I don't suspect I could match the performance of the IR receiver using discrete analog components, but surely using dedicated IC's it must be possible?

I originally was trying to use a Goertzel filter on an STM32F051C6, but it seems like the processor is just too slow. However, if no analog technique seems viable I might have to revisit that plan.

- Justin
 

LesJones

Joined Jan 8, 2017
4,174
Have you considered using the TBA2800 preamplifier or just using the block diagram to build the individual blocks using transistors. This device does not have a bandpass filter for 36 Khz. It was used in commercial products before devices like the TSOP382 were available. If you build a copy using transistors you could add active filtering or LC tuned circuits.






Les.
 
Last edited:

BobTPH

Joined Jun 5, 2013
8,804
The other important thing in the TSOP is AGC, if I remember correctly.

I suspect the tone decoder you are using expects a specific signal level, no?

Bob
 

Thread Starter

WylieZA

Joined Jan 16, 2018
8
The other important thing in the TSOP is AGC, if I remember correctly.

I suspect the tone decoder you are using expects a specific signal level, no?

Bob
This is correct, but for now, I would be happy to just get it to function with a well-behaved signal from a signal generator. All the other aspects I'm working on separately. The issue is that the LM567 seems to be too slow, even for a nice signal...
 

jpanhalt

Joined Jan 18, 2008
11,087
My experiments with active filters years ago confirmed that filters can oscillate. The higher the Q, the more likely to oscillate. I realize your Q is not high compared to the datasheet, but try increasing it. Even the TSOP devices have a very wide bandpass.
 
There is a LOT involved in what you want to do. You can probably do it with the help of an FPGA. I might have to "hunt down" the articals i found that would help in the process. The problems, from memory is IR filtering (window), Bandwidth filtering (limit to carrier frequency), AGC (Automatic gain control), speed and waveform edges.

Reminder, that it's usually PPM or pulse position modulation. Two different carrier bursts set the 1's and zero's and it's low duty-cycle to conserve power

Here is the stuff I dug up:
LT1328
Use to make a better detector for receiver board
https://www.analog.com/media/en/technical-documentation/data-sheets/1328f.pdf
Vishay Remote control receiver: https://www.mouser.com/datasheet/2/427/tsop121-1766938.pdf

Data formats for IR Control: https://www.vishay.com/docs/80071/dataform.pdf

Some info: http://wiki.sunfounder.cc/images/1/16/IR-Receiver_datasheet.pdf

TSOP98200 for code learning remotes: http://www.vishay.com/docs/49604/pt0048.pdf
Wide band IR. You loose selectivity and hence range.

https://www.lirc.org/cir.html

https://www.lirc.org/

Atmel IR receivers: http://ww1.microchip.com/downloads/...on-Guide-ATA2525-ATA2526_Application-Note.pdf

ONSEMI Application Note: https://www.onsemi.com/pub/Collateral/AN1016-D.PDF
Infared sensing and data transmission fundamentals

Remote control amplifier/detector: https://www.flippers.com/pdfs/MC3373-full.pdf
MC3373

Photodiode amplifier
https://www.analog.com/media/en/reference-design-documentation/design-notes/dn399f.pdf

Design Note 254:
https://www.analog.com/media/en/reference-design-documentation/design-notes/dn254f.pdf

Peak detector might be useful
https://www.analog.com/en/technical-articles/ltc6244-high-speed-peak-detector.html

LT1319 Obsolete muti-standard IR receiver
https://www.analog.com/media/en/technical-documentation/data-sheets/1319fb.pdf

Cypress: Might be a good idea: https://www.cypress.com/file/60101/download
PLL demystifying.

Measure . period and duty cycle; (PSOC): https://forum.allaboutcircuits.com/threads/help-required-with-rgb-signals.168808/post-1499846

You probably need to implement a PLL that works on less than 50% duty cycle. Lock and unlock signals become the output.

That was a lot of research. I'm only interested in a passive way because I wanted to know waht it would take to have the functionality of a Vishay TSSOP part for ~76kHz carrier.

I do have schematics of two discrete receiver designs, but they don't play well at all with CFL's and sunlight hence a design was created, although not by me, that used a TSSOP device at 1/2 the fundamental frequency. e.g. 38kHz instaed of 76kHz. I'm too lazy to find the actual number. I helped a little.

I would be interested in what you come up with,

I think one of the strong points for the NEC protocol is that the first frame sets the gain of the AGC.
 

AnalogKid

Joined Aug 1, 2013
10,986
One approach is to drill down into the TSOP part details, work up a block diagram for the various functions, then fill in the blocks with discrete circuits. Or start with the block diagram on the datasheet.

ak
 
Top