Discussion in "General help Guidance and Discussion" started by    lucky6772    Mar 25, 2013.
Mon Jul 01 2013, 01:08 pm
#81

output is average of that


ok then how wil i suppose to detect the signal?
for me its useless then if i dont get a proper low signal how will my microcontroller to get indication that person comes in front of the sensors..?
its seems the "R n D" m doing from long time is not of my use..:(
Mon Jul 01 2013, 09:07 pm
#82


output is average of that


ok then how wil i suppose to detect the signal?

lucky6772


The low pulses are too short to read with a meter, but not too short for a micro to see.
Connect the output of the TSOP to the INT0 pin.( No pull-ups, LEDs etc.)

Write an interrupt handler that reacts to the pin going low.
Wed Jul 03 2013, 06:29 am
#83
can you tell me the time period here mention in datasheet 60ms iis it imp..? becze we havnt set time period 60ms n could u tell me how n what i do its bit confusing..! i almost produce the burst but is continous but here i suppos its mention dat burst wave should also have time period of 60ms..! how could i set dat..?
Wed Jul 03 2013, 08:19 pm
#84
The data sheet I read just says that the on time should be less than the off time.
I don't know what the 60mS period is for, but I don't think it is important.
Re-check your data sheet, it should explain.
Wed Jul 03 2013, 08:23 pm
#85
all the things mention in tsop1738 datesheet i have make my code according to dat n u urself seen my code is right..! but only doubt i amd getting is 60ms timeperiod..!check the date sheet i have attached..!
Attachment
Thu Jul 04 2013, 01:08 pm
#86
try to keep your burst shorter. A longer burst (continuous 38Khz signal) is considered as disturbance and is suppressed by TSOP. So that may be the reason you are getting IR output going high/low. A burst longer than 1.8ms should be followed by a gap of equal or more than duration of burst.
 lucky6772 like this.
Thu Jul 04 2013, 01:35 pm
#87
sir please tell me what change should i made in my code acc to u..! i am not getting dis thing..

#include <REG2051.H>

void delay1(void);
sbit mybit=P1^7;
int c, n;
void delay(unsigned int msec ) // Time delay function
{
int i ,j ;
for(i=0;i<msec;i++)
  for(j=0; j<1275; j++);
}

void timer0_isr () interrupt 1
{
        mybit = ~mybit;
}

void main ()
{
                P1=0x00;
        TMOD = 0X02;
                TL0 = 0xf4;
        TH0 = 0xf4;
        IE = 0x82;
   
     while(1)
      {                                          
           TR0=1;        
           delay(1);
           mybit=0;  //LED off
           TR0=0;                    
           delay(10);                                                                                      
           }

               
       
}
Thu Jul 04 2013, 10:25 pm
#88
The attached program will work if your hardware is okay.
I'll stake Ajay's reputation on it
It generates bursts of 40 cycles, at 60mS intervals and detects TSOP pulses on INT0.

On the simulation, the button and pull up resistor are for testing only.
Remove them in the real circuit.
Connect your 2n2222 to P.0


Have you tried a new TSOP38 ?

Move the LED from the 2n2222 emitter to the collector side.
Change the base resistance from 5k to 390 ohms.

Follow the diagram on the datasheet that filters the power supply to the TSOP.




Add extra smoothing capacitors near the LED to smooth out the pulses.
If possible drive the LED from a power supply other that the 5 volt supply.
What power supply are you using ?


Attachment




[ Edited Thu Jul 04 2013, 10:33 pm ]
 lucky6772 like this.
Fri Jul 05 2013, 06:52 pm
#89
@ experiment uk: there is something i need to share with the proteus circuit with the code u share and my code have both differenct output..?? did u make some changes in my code..???

ur code output:



my code output





:NOTE THE TIME DIVISION AND VOLTAGE DIVISION NOBE IS SAME IN BOTH THE CASES:


[ Edited Fri Jul 05 2013, 06:54 pm ]
Fri Jul 05 2013, 09:08 pm
#90


@ experiment uk: there is something i need to share with the proteus circuit with the code u share and my code have both differenct output..?? did u make some changes in my code..???

lucky6772


I included my source code in the zip file.
Have you looked at it ?

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Andyhet
Sat May 18 2024, 07:28 am
BrettTibre
Fri May 17 2024, 06:14 pm
Gordonfax
Fri May 17 2024, 10:28 am
Davidspils
Fri May 17 2024, 10:19 am
Patricknoind
Fri May 17 2024, 09:53 am
JeremyCycle
Fri May 17 2024, 09:46 am
FrabSeby
Thu May 16 2024, 07:31 pm
PeterGem
Thu May 16 2024, 06:27 am