I am trying to make an airsoft chronograph (a device that calculates the velocity of a projectile by measuring the time it takes for the projectile to trip two separate sensors that are a known distance apart) using two QRD1114 optical detectors that I acquired from Sparkfun. I hooked them up by following the instructions here: http://bildr.org/2011/03/various-proximity-sensors-arduino/ . They worked fine when I tested them on a breadboard, the analog value was around 50 with my finger touching the sensor and around 850 with nothing in front of it. I placed the two sensors in a 1/2" diameter piece of PVC pipe so that when a BB travels through the piece of PVC pipe it will travel in front of one sensor and then the other (with 4" between them).
The sensors were not behaving like I expected once I put them inside the pvc pipe. Inside the pipe, the analog values were reading roughly 350 on one sensor and 250 on the other with nothing in front of them. So I assume a base line of 240 and 340, with any value below those being shown as "tripped". When I test it by sticking a pencil in front of the sensors, the value with the pencil touching the sensor was 50, and with the pencil touching the opposite wall of the pipe from the sensor, the value was reading 500.
A value of 500 should mean that the object in front of the sensor is at a distance greater than the diameter of the pipe. What would cause this? Will this type of sensor not work with a curved surface?
I am thinking that I may get better results if I get a separate IR transmitter and receiver, so that I can put one on each side of the pipe to create a "beam". If this would be better, any recommendations for the IR transmitter and receiver I should use?
Thanks