I'm having a hard time designing a PCB for a sensor array that need to detect if there is a small reflective object (3-20 mm section) in the way. That object can slowly rotate around a shaft.
I have tested several sensors,sharp GP2Y0A21YK0F, EE-SY410, HSDL-9100-021... and all have some zones where my uC is unable to detect if there is an object or not because most of the light is reflected. I still have to test opb9000 (not done yet because of the communication protocol) and vl530x (TOF sensor), but I expect to get similar results.
With the custom PCB i have used discreet emitter/receivers. The emitter is optoisolated with a small barrier. There is some crosstalk but I can detect in most of the cases if there is a key with a decent threshold. I'm able to do analog measurements and filter it on software, buy I prefer to make my life easier and pulse the IR emitter at 10 kHz, make an analog narrow bandpass filter and recover the signal without the DC component, induced noise and amplified to the full range of my ADC.
Now the questions: Someone can recommend me a cost/effective layout to detect the object without adding sensors in a different plane? I know that there is some math and optics involved to get it exactly right but some layout ideas might help. I can pulse up to four IR emitters independently.
Shall I try a different sensing method? I think that the bandpass is quite nice method to improve noise immunity at low cost.
Image to help to understand the question. When the small side of the object is in the red area the sensor fails to determine if the object is in there. (The measurement is too close or the same that the one without the object)