i need it to generate 38Khz ir for tsop....
[...] its range is getting variable..
at starting at particular calibration it detect obstacle only at 5 cm and after 2min it starts detecting obstacle at 45cm.. after some time it starts decreasing but at a low pace...
can any one help me what can be the problem?
First, you need to understand that TSOP (in capital letters) is just the prefix for a range of infrared receiver modules, which has different specs, so you need to be a bit more specific and give us the entire name of the module you are using. The rest of the name will reveal the working frequency and other important data.
Some of the members of the TSOPxxxx family has got ways of dealing with noise (which is just about any signal not being a regular modulated signal):
A quote from a manufacturer:
"in the presence of a disturbance signal, the sensitivity of the receiver is reduced to insure that no spurious pulses are present at the output.
Some examples of disturbance signals which are suppressed are:
• DC light (e.g. from tungsten bulb or sunlight)
• Continuous signals at any frequency
• Strongly or weakly modulated noise from fluorescent lamps with electronic ballasts"
be what causes your problems, so an exact module number is needed to see if this is likely.If
your module is one of those, you either have to get another type, or to modulate your signal in a noncontinuous way to counter the error correction, but another module will be the best option.
Some modules work down to 2.7V, other will cease working under 4.5V, so if you are running from a battery, this should be taken into consideration as well.
(I assume you made sure that ambient light could not be the cause of the problem).
Apart from the module number, please attach the schematic of the circuit you are working on (both receiver and transmitter end) as well.