Society of Robots - Robot Forum
Software => Software => Topic started by: silo_xtreme on November 29, 2009, 04:43:28 PM
-
Hey all,
Im taking measurements from a home made Ir pair. With my measurements I'm taking the average and comparing averages. I also find that increasing the sample size does not solve my problem.
My problem is as follows:
sample size 100 . I take 6 averages.
They are: 0.579, .50, .16, .14, .63, .58
sample size 200 they are:
.81, .755, .655, .305, .685, .305
my concern are the large drops in the measurement average between sets. Could there be that much noise?
Any thoughts would be great!
Mike
-
Ok, we need a good bit more information.
What are you actually measuring?
What is the circuit?
-
Hi Waltr,
my IR pair is very similar to the schematic found in the tutorials on this website in the electronics section. I am measuring Volts from the Collector. I measure in integers and then convert the sum to float in order to take the average.
-
How are you illuminating the IR sensors?
Are there florescent lights in the room?
Incandescent lights (50/60Hz)?
The IR sensor is sensitive to many light sources.
Try putting the IR emitter/sensors in a metal enclosure (IR passes through many plastics).
-
Thanks for the reply, but I don't think that's the problem. We also added a h/w filter.... Lights on lights off same problem
-
A 10 bit ADC will give you numbers in the range 0-1023. You average a load of these numbers and always get values less than 1? This suggests most of your ADC readings are zero or one (of 1023). That seems very consistent. You could easily have that much noise, it is not excessive. It looks like the real question you should be asking is where is the input signal?
I would suggest taking a careful look at the raw ADC data to confirm that the majority of your samples have the value zero or one.
What is the output voltage swing on your sensor output between IR LED off and IR LED shining directly on your receiver?
-
Hey hopsink great questions! Your right about the raw data, lots of 1's and 0's , assuming the test distance is about 22 inches. At 9 inches we get more 1's than zero, at too close we get numbers above 6500. I've seen numbers as high as 10 in the raw data. I wish I could find a way to chart it .... Silly avr studio.
-
Just a gut feeling, but 22" seems like a long range for a sensor like this. You say
...the test distance is about 22 inches. At 9 inches we get more 1's than zero, at too close we get numbers above 6500.
This suggests that even 9" is too much for the sensor and it is still not getting enough reflected light to begin to operate and it always outputs 0V.
There should be a range of distances where as measured distance falls the voltage from your sensor starts to ramp up until it maxes out. This will be the sensors operating range. From what you say above it sounds like this will be somewhere between 9" and 'too close'.