Electronics > Electronics

IR reciever TSOP1138 help

(1/3) > >>

Jak24:

I am a Robocup Junior soccer competitor,
http://rcj.robocup.org/soccer.htm
and I am currently in the process of selecting my ball sensor.
(The ball is an IR ball which emits pulsing infrared light.)
Now I found this article :
http://rcj.robocup.org/rcj2009/newball/cheapRCJ05sensors-RobotDemos09.pdf
And I ordered the TSOP1138 and connected it as the circuit in the document says I should with
a 100k resistor and a 1uF cap to get an analog reading.
And I am not getting any readings back besides 0.
So I did some further research and it turns out the ball actually outputs 40 khz instead of 38 which the sensor is set at,
but I should get at least some readings right even with the 2khz difference?
And also I don't suppose it's an issue but the capacitor I have is 1uf and 16v, would that be an issue?
Any advise appreciated, or if any one could suggest a better IR receiver !

waltr:
If the 40kHz LED is very close to the 38kHz sensor you might get a response but probably not. The receiver in those IR sensors are pretty good at discriminating against the wrong frequency. Look at the plot of response verse frequency in the data sheet to see.

Most makers of those sensors make them form different frequencies. Re-check the source for the correct sensor. A wild guess is that the part number will be: TSOP1140

In the mean time you could pulse on IR LED at 40kHz. A small processor (like a PIC12F509 or a AVR Tiny) would work. Then at least you can continue testing waile waiting for the 40kHz sensor.

Soeren:
Hi,


--- Quote from: Jak24 on December 01, 2012, 02:23:50 PM ---[...] I ordered the TSOP1138 and connected it as the circuit in the document says I should with a 100k resistor and a 1uF cap to get an analog reading.
And I am not getting any readings back besides 0.
So I did some further research and it turns out the ball actually outputs 40 khz instead of 38 which the sensor is set at,
but I should get at least some readings right even with the 2khz difference?
And also I don't suppose it's an issue but the capacitor I have is 1uf and 16v, would that be an issue?

--- End quote ---

38kHz is only ~5% less than 40kHz (and the frequency tolerance, or precision, on the center frequency is 5%). Even if it wasn't, a 5% discrepency in the frequency still gets you at least 80% of the range and given a range of 10..20m or so, you should hardly see any difference.

With no signal reaching the receiver when you apply power, you should see the voltage at the cap climb to close to 5V in around 0.6s.

Depending on the distance from the ball, the output of the TSOP will have duty cycle steps of 24%, 36%, 48% and 60% - the closer you are, the higher the duty cycle and the lower the voltage on the capacitor (which can have any voltage rating greater than what's applied).
The voltages you should see with the 100kOhm/1F is roughly 3.6V, 2.9V, 2.3V and 1.7V, so if you see 0.000V, you either have a dead receiver or, more likely, you connected it wrong.
Here's the pin-out for reference:


Integrating the signal for an A/D reading is very slow, as the cap charges through both the 100kOhm resistor in series with an internal 25kOhm resistor and discharges through the 100kOhm. Making the cap 10 times smaller will speed it up 10 times, a little ripple will be present, but since you just need to discriminate few steps, this will help, but it's still a slow read in a soccer game..

You get the fastest reading by using the other method suggested - by timing the pulse duration, as there's no delay, just the direct timing of the duration: 200s, 300s, 400s or 500s - much faster (>1000 times) than waiting a bit over half a second for each read, or, if sped up with a 100nF cap, around 60ms.

Jak24:
Thanks for the advise guys!

So turns out the two sensors I was working with were both duds.

--- Quote from: Soeren on December 01, 2012, 10:15:23 PM ---
Integrating the signal for an A/D reading is very slow, as the cap charges through both the 100kOhm resistor in series with an internal 25kOhm resistor and discharges through the 100kOhm. Making the cap 10 times smaller will speed it up 10 times, a little ripple will be present, but since you just need to discriminate few steps, this will help, but it's still a slow read in a soccer game..

You get the fastest reading by using the other method suggested - by timing the pulse duration, as there's no delay, just the direct timing of the duration: 200s, 300s, 400s or 500s - much faster (>1000 times) than waiting a bit over half a second for each read, or, if sped up with a 100nF cap, around 60ms.


--- End quote ---

Alright I'll try to get a smaller uf cap. But I would definitely need a analog output, because I'm not that great of a programmer and I wouldn't really know how to interpret the time durations .
Now as for the working sensors,
If they don't see the ball they output 1023 and If I turn the ball on literally no mater were I put the ball the reading is around 600-650.
Is this because the IR reflects all around my room?

--- Quote from: waltr on December 01, 2012, 04:38:44 PM ---If the 40kHz LED is very close to the 38kHz sensor you might get a response but probably not. The receiver in those IR sensors are pretty good at discriminating against the wrong frequency. Look at the plot of response verse frequency in the data sheet to see.

Most makers of those sensors make them form different frequencies. Re-check the source for the correct sensor. A wild guess is that the part number will be: TSOP1140

In the mean time you could pulse on IR LED at 40kHz. A small processor (like a PIC12F509 or a AVR Tiny) would work. Then at least you can continue testing waile waiting for the 40kHz sensor.

--- End quote ---

I'll definitely order a 40 khz sensor but at this point I would need one that is less sensitive, because so far atleast, no matter where I put it my room the reading is 600-650 until I turn it off.

Soeren:
Hi,


--- Quote from: Jak24 on December 02, 2012, 06:32:59 AM ---Alright I'll try to get a smaller uf cap. But I would definitely need a analog output, because I'm not that great of a programmer and I wouldn't really know how to interpret the time durations .

--- End quote ---
Wouldn't that be a great opportunity to learn then? :)
Depending on which controller you use and what programming language, it may be as easy as usng in-built commands or library functions.



--- Quote from: Jak24 on December 02, 2012, 06:32:59 AM ---Now as for the working sensors,
If they don't see the ball they output 1023 and If I turn the ball on literally no mater were I put the ball the reading is around 600-650.
Is this because the IR reflects all around my room?

--- End quote ---
No, but perhaps you just have a small room ;D
Try a distance of say 5m to 10m.



--- Quote from: Jak24 on December 02, 2012, 06:32:59 AM ---I'll definitely order a 40 khz sensor but at this point I would need one that is less sensitive,

--- End quote ---
The 38kHz IR-receiver is a less sensitive 40kHz sensor you may say, so getting a 40kHz sensor will just increase the sensitivity issue.

You could lower the sensitivity by placing a colored filter in front of it.
Filter may sound technical, but test different varietys of colored plastic from candy wrap and similar. Yellow/orange will only filter a little, blue/green will filter much more. If one layer won't do it, try adding 2, 3 or more layers.



On second thought..
Your numbers indicates that the receiver picks up the first two stages of the output waveform (the full power and the 1/4 of full power.
Up close it should pick up the 1/16 and 1/64 of full power as well, so if it doesn't, sensitivity is not the issue and you'll have to look at other causes - like how good are your soldering skills, are you sure everything is connected correctly?

Do you have a ball (or the equivalent circuitry) to test with?

Navigation

[0] Message Index

[#] Next page

Go to full version