Maker Pro
Maker Pro

IR Receiver Output Problem

RepulsiveStyler

Aug 2, 2012
6
Joined
Aug 2, 2012
Messages
6
Hi,
I am using an IR Receiver TSOP type and since its output is directly compatible with MCU. I am feeding the output of TSOP with pull up resistor 10K to RA4/T0CKI pin of PIC18F452.

I have tested the input pin of pic with another square wave which is able to trigger the schmit trigger but unfortunately IR Receiver output is not able to trigger the schmitt trigger of the MCU.

Is there any technique which i can employ and be able to detect output pulses from IR Receiver?

Reply will be greatly appreciated.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,518
Joined
Nov 17, 2011
Messages
12,518
TSOP is not a receiber type, it is a chip package that can hold anything. Give us the exact type of the IC.
What are the operating voltages of the receiver and the PIC? What are the output high- and low-voltages of the receiver? Are they compatible to the PIC's inputs?
 

RepulsiveStyler

Aug 2, 2012
6
Joined
Aug 2, 2012
Messages
6
TSOP is not a receiber type, it is a chip package that can hold anything. Give us the exact type of the IC.
What are the operating voltages of the receiver and the PIC? What are the output high- and low-voltages of the receiver? Are they compatible to the PIC's inputs?

I am using HX1838 which detects 38 Khz frequency for which 555 is used. Its an active low output device. After I have made connection to the MCU, the idle output voltage is 1.63 V.
 

RepulsiveStyler

Aug 2, 2012
6
Joined
Aug 2, 2012
Messages
6
I am using HX1838 which detects 38 Khz frequency for which 555 is used. Its an active low output device. After I have made connection to the MCU, the idle output voltage is 1.63 V.

Compatibility to PIC Yes I have read the block diagram which tells me it already has demodulator and sch-mitt trigger.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Connecting the output of the receiver to an input of the PIC should not change the output voltage. Are you sure the PIC pin is not set as an output?

bob
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
TSOP is not a receiber type, it is a chip package that can hold anything. Give us the exact type of the IC.

As ironic as it is, in this case it is a chip designation not a package designation... I have seen many a blog refer to these sensors as just TSOP IR sensors...

http://www.voti.nl/shop/catalog.html?IR-TSOP-38

Random Google image hit of a datasheet...

1215685620_426_FT10720_tsop1738_.jpg
 

RepulsiveStyler

Aug 2, 2012
6
Joined
Aug 2, 2012
Messages
6
Connecting the output of the receiver to an input of the PIC should not change the output voltage. Are you sure the PIC pin is not set as an output?

bob

Yes I am sure. The RA4/T0CKI pin is set as input and infact when I plug it into the output of a 555 which is used for the PWM. It seems to be detecting that properly.

To check if the receiver was working properly I connected an LED to its output and when ever there is a detection, the LED seem to blink.

The package already includes a schmitt trigger output and I am trying to connect it to the RA4 pin which when configured as input acts like a schmitt trigger again. Is that going to be a problem?

Is there any other possible way you could suggest me to detect pulses from the receiver using PIC18F452?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
If you are reading 1.6V at the output with no signal something is wrong. What do your read when the PIC is not connected?

Bob
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,518
Joined
Nov 17, 2011
Messages
12,518
As ironic as it is, in this case it is a chip designation not a package designation
I stand corrected

Just to make sure: The 10kOhm resistor is connected to Vcc (3.3 V or 5V)? Not accidentally to GND?
The IR-receiver has an internal 30k Pull-Up. Your reading 1,6 V at the output sounds like you're building a voltage divider between the internal pull-up and an external pull-down.
And, just to ensure one more thing: The LED is not connected when you use the IR-receiver, or is it? The LED would work like a pull-down and limit the high-voltage to 1.6V (and astonishing coincidence). Thus the PIC would never see a High signal.

Harald
 

RepulsiveStyler

Aug 2, 2012
6
Joined
Aug 2, 2012
Messages
6
If you are reading 1.6V at the output with no signal something is wrong. What do your read when the PIC is not connected?

Bob

Well I tried connecting oscilloscope and there is not signal but when there is detection I see the line go up on the screen.

Anyways when the PIC is not connected it reads 5V
 

RepulsiveStyler

Aug 2, 2012
6
Joined
Aug 2, 2012
Messages
6
I stand corrected

Just to make sure: The 10kOhm resistor is connected to Vcc (3.3 V or 5V)? Not accidentally to GND?
The IR-receiver has an internal 30k Pull-Up. Your reading 1,6 V at the output sounds like you're building a voltage divider between the internal pull-up and an external pull-down.
And, just to ensure one more thing: The LED is not connected when you use the IR-receiver, or is it? The LED would work like a pull-down and limit the high-voltage to 1.6V (and astonishing coincidence). Thus the PIC would never see a High signal.

Harald

The 10K resistor is connected to Vcc 5V. I just realized that the development board I am using that is HP488-00-3 as an LEDs onboard for PORTA and PORTB. Is that the problem?
Will I have to connect MCU on a breadboard instead to test it?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
What else is connected to the PIC pin? If nothing else, then your PIC pin is an output which is overriding the output of the sensor.

bob
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,518
Joined
Nov 17, 2011
Messages
12,518
The LEDs are a very probable source of the problem. Without seeing a schemativ it is hard to tell, but I assume that the LED is connected to the port via a comparatively low resistance resistor (a few 100 Ohms). In connection with a 10 k Pull-Up this is negligible. Therefore the Pull-Up will send a current through the LED and the High voltage is limited to ~1.6 V.

This is valid even if you program the port pin as input.

If you can't remove the LED, just use another port without LED.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Okay, I didn't see the post about the LED. That is certainly the problem.

Bob
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
I stand corrected

It confused me when I first discovered it as well... I was working on an IR project and I kept coming across people calling them TSOP sensors, it was really tossing me until I figured out what it was all about...

BTW these sensors work just fine on a PIC I/O port so it has to be that LED or another irregularity on that pin...
 
Top