Laser tripwire with timer between triggerings

Is this project possible?

Its to time the dogs in our flyball team (youtube it to see what this is). I have the R3 board along with all manner of sensors and components and am about to make a start when I get a few quiet days.

I do not need the code or anything else done, I am a programmer in .net and c# already and just want to build something for the team over the winter :wink:

I'd say it's possible and not that difficult to build. Just take care to get the right laser beams (buy locally and not in China then the probability to get a safe one is much higher), otherwise your dogs (and even team members) may get blind very fast. The power should be relatively low and it should be pulsed to keep the energy that may enter the eye as low as possible.

Easy project for an experienced developer - even when you're new to microcontrollers.

You may want to use two lasers to also distinguish the direction the dogs are running, as well as the speed :wink:

Regards from another C# developer :slight_smile:

Thanks both, knowing it can be done is the major thing here as I do not want to spend months attempting the impossible, and yes, I am really new to R3 coding having only just bought the microcontrollers.

Extensive flyball thread here

Extensive flyball thread here

Wow thanks, it always happens that nothing is never new, its all been done before :wink:

Get rid of the laser. You don't need the laser.

Set up a detector with a restricted view and you have your straight line beam from an ordinary led.
Get an IR detector and you can see how well a red led sets them off too, see what color let red led shows in a webcam... white!

Roll up a piece of flat black paper tight enough that the detector can fir snug in one end and point that at and away from light sources, see how long or not the tube must be to get your beam. Light travels direct, only the beams that make it to the detector get sensed.

A detector open to all sources detects those that impinge. You need to restrict the detector anyway just to prevent falsing. When you narrow the detection and the beam, that is how close both have be and stay aimed to work.

A little bit about using millis() and interrupts.

Milliseconds only change once in 1000 microseconds.

If your regular polling code loop() checks sensors more often than that, an interrupt that saves millis() won't get you closer data.

Are you trying to time dogs any close than hundredths of a second?

So just use micros() ?

Before you go "all you can", take a step back and think out "what you need".

Yes micros() is best when measuring seconds or less closely, millis() skips 6 values 4 times over every second.

So get the micros() value to do the math with but don't display every digit past the decimal point you can get, down below 1/100th of a second you begin to get tiny differences that should not be used to declare winning status, but could.

What I say is use the micros() values but round the output to not include very tiny differences. If a dog would be 1 mm/s faster, the difference has likely far more to do with body position than actual velocity. If you pick a practical scale you will use, that will avoid meaningless results.

I have a friend who got a cheap, 2mW laser pointer when they first came out. He was swinging the dot around watching the trails when the beam hit a small wide-angle mirror. The mirror was curved, it dispersed the beam. He was swinging the dot fast enough to make red lines on the wall so he got a very brief flash of dispersed weak beam in just one eye. That eye only saw red for over TWO HOURS.
So no, he didn't get blinded (so doesn't count?) but do that to someone else and you will likely need a lawyer.
Imagine a dog with a taste of that, even if it passes in 10 minutes you will hear about it far longer and never forget..

Thanks, already discounted using lasers, simply too dangerous for this.

I am looking at PIR sensors now placed in tubes / cones for restricted field of view. Thinking a series of them looking down so they do not catch humans :wink:

Decided the one built is fantastic, however the fun is in building something and learning....maybe even see it working with other teams.

Decided the one built is fantastic, however the fun is in building something and learning....maybe even see it working with other teams.

Great attitude! You may go far! Karma for you!