Hi Christian,

Have you considered a capacitive proximity sensor? You haven't said whether the bottles are full or how close you can place the sensor to the bottle but given the right conditions it might work better.

Your sample rate does seem excessive. You are sampling 100 times per second and would for example, sense a bottle 25 times if it took 1/4 second to clear the sensor. The problem with reflected light is the light could scatter differently depending upon how the bottle is rotated or whether you hit some dirt or a label. Also consider that the angle of reflection is different on the edge of the bottle than in the center of the bottle so your readings will probably not look like square waves.

If I were to use light I would first use the mote to collect raw sensor data at 10ms, tune my detect algorithm against measured data, then code the detect algorithm into the mote. Best of luck.

                                                        Chuck Kring
                                                        
www.finishlinesystems.com

At 02:18 AM 3/13/2006, Hoell, Christian (EXT) wrote:
Hi everyone,

I'm currently developing an application counting bottles on a
transportation system.
I'd like to use the photo sensors on the tmote.
But it's quite hard for me to detect a bottle passing by without using
an extra light.
I've also played with a white LED and try to trigger on the reflexion of
the bottles but didn't manage to count all the bottles or I got two or
more triggers per bottle.
My current approach lookes like that:
I'm sampling the photo sensor a 10ms the compare the last two values
with the current one and if the present is about 10% bigger than the
former one I'll set a flag (high flag) and the go on sampling and wait
for some value where the present value is about 10% smaller than the
former ones.
It works ok but as I was telling you before the results are not as good
as they should be.
Furthermore I think with sampling at 10ms there's also a lot of power
consumed by the microcontroller.

Could anyone propose a differet approach to me?

Thanks a lot

Greetings

Christian





_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to