Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Infrared Receiver With Schmitt Trigger PIC18F452

Status
Not open for further replies.

RepulsiveStyler

Newbie level 5
Joined
Jun 10, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,356
I am using CHQ1838D module as my Infrared Receiver, while testing the circuit since its an active low device I am getting an output of almost 5V and when it is blasted with 38 Khz Infrared Signal, the output voltage varies from 3.69V to 4V. My aim is to calculate the RPM of the rotating object by capturing this ouput pulse from the receiver module over the period of a second. PIC18F452 is utilized with RA4 port is configured as input and T0CKI is configured to count when High to Low. But T0CKI is not able to count. What am I doing wrong?

And since I am using Development board HP 488 00 3, it only has PORTA and PORTB on board screw terminals where I can connect external circuits. Due to the requirement of my project, I am using PWM module at PORTC. How am I suppose to get the PWM output since there are no screw terminals? Are there other pins I can connect my Infrared Transmitter?
 

There are no CCP modules on PORTA but there are on PORTB and PORTC. My PORTB pins are occupied for 16x2 LCD. Unfortunately, my development board doesn't have screw terminals for PORTC. I am literally stuck. Is there anyway I could connect my receiver module to PORTC CCP module?
 

PIC18F452 is utilized with RA4 port is configured as input and T0CKI is configured to count when High to Low. But T0CKI is not able to count. What am I doing wrong?
we'll have to seethe code

How am I suppose to get the PWM output since there are no screw terminals? Are there other pins I can connect my Infrared Transmitter?
thats the problem with development boards... may be you can solder a wire out directly from the pin
 

I do not think the hardware design will work anyways.


What is the d/f or break ratio and rate of the optical interruption for RPM measurement? Is this like a mouse wheel? There may be better ways to do this with an IRDA receiver chip and basic IR LED with a black tube pointing at IR IRDA Rx then use the pulses for each interruption of light, drive a binary counter which you can read at regular time intervals to read RPM more accurately than in software.

The CHQ1838D would expect a burst rate to match the standard remote control protocol rates which match the mandpass filter of the chip
Width of BMP

FBW-3Db Band width = 3.5 min 6.0 typ, 8.5 max kHz

I doubt your object RPM would match this, THerefore the automatic threshold and AGC comparators will cause errors and accurate counting is impossible.


You need a high speed baseband receiver like the IRDA 1 Rx chip and not an ASK 38KHz carrier receiver. Have that drive a counter or PIC input for Time interval counting and averaging.
 
Last edited:

According to my project requirement I need to Transmit a modulated signal. My upper limit for RPM measurement is 20,000 RPM. Will TSOP1738 do good?
It doesn't really matter if the reading it not accurate because later on a correlation technique will be implemented in the software. But before that I need this up and running.

For the receiver side I am using CHQ1838D with its output directly fed into the microcontroller.
For the transmitter side I am using an IR Diode connected by the PWM signal at 38 Khz generated by the microcontroller PWM module.
Ofcourse I am going to use the reflection technique here to calculate the RPM.
 

Turns out I am using the wrong spec receiver so I decided to use a receiver which can receive continuous burst of 38 Khz signal that is "TSOP4038". That will probably give me accurate RPM readings. I will post my PWM code for PIC18F452 soon. I did like to know if its going to work that way.

- - - Updated - - -

Code:
void main (void){
     TRISC = 0;
     PORTC = 0;
     ADCON1 = 7;
     T2CON = 0;
     TMR2 = 0;
     PWM1_Init(38000); //38kHz
     PWM1_Set_Duty(128); // 50 % Duty Cycle
     PWM1_Start(); //Start PWM
     while (1){ //Loop forever
// Whatever else might be needed to be done while PWM is running
     }
}
 

For higher data rates search for IRDA receiver which I suggested that also can sustain continuous 20KHz no problem.

The 38KHz will not work. Reason. Band Pass filter = 5% = 1.9KHz Will not fit ASK or Tach design at 20,000 pps.

You need an IRDA receiver and IR interruptor or reflector design. If you are clever you can make a tunnel path to reflector to measure RPM up 10 m.

TFDU4300 (SIR, 115.2 kbit/s) or TFBS6614 (FIR, 4 Mbit/s). **broken link removed**

Otherwise you need a clean baseband reciever using daylight blocking IR photodiode and low noise OpAmp as a current or transimpedance amplifier with very low noise V+. It depends on your distance to target.

- - - Updated - - -

What is your distance and shape of object?
Are you planning to use reflection or transmission blocking method for light sensing of RPM

- - - Updated - - -

Look at your optical path. Is there a clear modulation of light? or does it leak around object and reflect off nearby objects. What is the signal to noise ratio or levels using a reverse biased PD or LED diode and scope probe choose a suitable R for RC bandwidth or signal which affects level so high gain is needed. We can not help unless you give details on physical and optical design.
 
Last edited:

Distance is not more than 20 cm and the shape of the object is circular. I am going to use reflection method for light sensing.
Its a simple project, IRDA receivers as you mentioned should do the job but I am having hard time finding them where I live.
 


I live in United Arab Emirates. :p
Mouser seems to be charging 75 USD for shipping.
Is there any other way I could achieve this? I don't really know how to build a IR photodiode that can receive modulated signal. :S
Let me know what you could think of. :)
 

I can mail it you. Mouser can mail it to you. Or you can wait 2 wks and order it now from RS electronics in UAE. Your choice. But warning RS may have a 1 reel MOQ. You can paypal me.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top