Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
[...] 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?
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: 200µs, 300µs, 400µs or 500µs - 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.
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: TSOP1140In 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.
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?
I'll definitely order a 40 khz sensor but at this point I would need one that is less sensitive,
Hi,Quote from: Jak24 on December 02, 2012, 06:32:59 AMAlright 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 .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 AMNow 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?No, but perhaps you just have a small room Try a distance of say 5m to 10m.Quote from: Jak24 on December 02, 2012, 06:32:59 AMI'll definitely order a 40 khz sensor but at this point I would need one that is less sensitive, 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?
Do you have access to an O'scope? Use one to debug just the hardware part as in what is the sensor output really doing.As to the ADC part. have you connected just a pot to ensure your code for the ADC is working correctly?This is the 'divide and conquer' strategy. Debug and get each part working before trying them together.
I'm using the A/D converter with a 1uf cap when I get the 600-650 and with the straight readings I am only getting 0 and 1023 pulsating.and if it doesn't see the light i get 1023 only.
I am using the ball, but I don't have any extra IR emitters to spare .
I'm 99% sure It's hooked up right, the only thing the could be bad Is the sensor or my arduino.Any ideas?
Quote from: Jak24 on December 03, 2012, 04:21:42 AMI'm using the A/D converter with a 1uf cap when I get the 600-650 and with the straight readings I am only getting 0 and 1023 pulsating. and if it doesn't see the light i get 1023 only.What do you mean by "straight readings"? Is it without the cap? (That would make perfect sense of the numbers.
I'm using the A/D converter with a 1uf cap when I get the 600-650 and with the straight readings I am only getting 0 and 1023 pulsating. and if it doesn't see the light i get 1023 only.
Try a TV remote. Keep eg. the "Vol-" button pressed while reading the port, to see what numbers you get from that (If it's the Nec protocol, you'll only get the repeat code and this would integrate to a very low number).