Hi,
 
thanks alot for the previous help.
 
The problem is that don't want to use a sending diode on the other side of the belt because sometimes there are no spacings between the bottles.
So for example 5 bottles would be detected as on.
The next problem ist the bottles come randomly and also with different speeds (from 10cm/s up to 50cm/s and a 4cm diameter of the bottle-> that's why I choose 10ms sampling rate ).
I've managed to detect the reflecting beam of a bottle but in some cases it doesn't count the bottle and in in other cases I get two or more counts per bottle.
I used to sample the values of the photodiode with the oscope application. Considering these sampeled values I've build my algorithm like that:
Save the last two samples in an array then compare if the current one is about 20% bigger than the last two -> set a high flag detection.
Then I'm sampling further on and wait until the current value is 20% smaller than the last two and then set a low flag and counter++.
That's how I did it but as already mentioned I sometimes get more counts than expected.
 
I need to implement a more robust algo but I don't know how.
 
Greetings
 
Christian


Von: Aditya Bhave [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 15. März 2006 18:43
An: Hoell, Christian (EXT)
Cc: tinyos-help@millennium.berkeley.edu
Betreff: Re: [Tinyos-help] Light barrier application

HI Christian,

Why dont use the same principle used in burglar detection.
Assuming your bottles are passing by on a conveyor belt for example, you could position two sensors, one on either side of the belt. One sensor continously sends an infrared beam to the other and when the passing bottle intercepts the beam, the receiving sensor will notice the interruption and record the bottle. After waiting for say t ms by which time the bottle should pass the sensors completely, the receiving sensor can once again wait for "beam intercepted" events.

Of course this may consume a lot of power since the sending mote is continously on. An alternative is to let the sending mote send the beam for t ms every T secs (say 100 ms every 1 sec) and sleep the remaining time. Of course this means some kind of time sync between sleeping and the time the bottles pass by on the belt. Do they pass by randonly or is there some measure of confidence?

This proj seems interesting. Please let me know how u finally do it.
On 3/13/06, Hoell, Christian (EXT) < [EMAIL PROTECTED]> 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
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



--
regards,
Aditya Bhave
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to