Arduino based laser stopwatch.

Some of you may know that I play curling. Luckily for you this post won’t be about that. It is enough you know that having good control of your slide speed is very important since it enables the player to make consistent shots.

Therefore in training and also during games someone will time the time from when the stone crosses the tee line(some teams use the back line) until it crosses the first hog line. From this time the throwing player will know if he hit the speed he wanted and the sweepers can include this data into their decision about the sweeping.

Timing this with a regular stopwatch has some drawbacks. One is that it introduces some error because it is hard to be completely accurate. It is also a bit impractical during training where one could train slides by themselves but has to have someone to do the timing.

Therefore it is great to have a device that can do this on its own. Such devices do exist [*], but $1500 + whatever a big LED display costs is not something we could justify spending. In Slovenia most of the expenses we have are payed from our own pockets. Therefore I decided to go the DIY way. For a long time now I wanted to play with the Arduino and this was the perfect opportunity.

I ordered an Arduino from a Chinese retailer on Ebay. It cost the staggering amount of $4. Using the Arduino is actually quite easy if you have any programming knowledge. It basically enables you to write programs in C that are compiled and can run on the device where they have access to the ports on it. The community around the Arduino is quite big and helpful. Anyone interested should start on the Arduino homepage.

To make the micro-controller do interesting stuff I had to attach something to it. From the beginning I decided I wanted to use a laser that shines on some kind of sensor and when the light beam is interrupted I can read that in my program. Since I didn’t have a clue how exactly to do that I searched the internets for example projects. So my first version of the laser trip-wire was based on this instructables. It is really simple and it does its job without an micro-controller. But since I had the Arduino and there were also ideas to make it wireless I only used the resistance divider idea and feed the output to one of the Arduinos’ analog inputs.







And that was basically it. I built two sensors, put them in plastic boxes connected them with UTP cable and calculated the time between the beam interruption on the first and second sensor. To display this I also soldered together 3 7-segment LED displays. How to do that I learned here This kind of worked, but the readings on the sensor were really sensitive to changes in ambient light and therefore it was hard to calibrate the reading so I could know when the laser really was interrupted. To mend this I wired the laser to and Arduino port and periodically turned it on and of(very fast). Now I could mostly discard the changes in lighting and only search for the periodic change. If the change would be absent it meant that the laser beam is interrupted. This approach had a lot of potential but I got to learn that a photo-resistor is not the best element to use. It has some memory effect and therefore when the laser goes of the reading is not instantly lower but it kind of fades. After researching the matter it was obvious that I would be better off using a photo-transistor. The response time of these devices is faster(a lot). After doing this my first prototype worked mostly as expected.

I should also mention that since I put the laser on the same side as the sensor I needed to reflect the beam back to detect it. First I tried to use a mirror but that was a nightmare to set up and aim the reflection at the sensor. In a quick chat with Musti he told me that I could use a regular bike reflector. Those things are designed to reflect light in the direction it came from. That really worked much better than I would have expected. I did also learn that using IR light would probably be better but I made it work with lasers and lasers are cool:)



The problem with this design was, that the cables made it a bit impractical and the display was to small to see it from bigger distances. After some persuasion from my teams skip I decided to research how to send data wirelessly from an Arduino.

As it turns out a cheap wireless transceiver for it exists. The nRF24L01 based component can be bought for less than $2 on Ebay. It sends and receives data on the 2.4GHz band(same as WiFi). It has basic error correction and most important, there is an Arduino library for it.

To make the whole system wireless I needed two more Arduinos and three nRF24L01 transceivers. I bought them again form China. The components work and are cheap. The only downside is that every order takes 2 to 3 weeks to come in.



Since every trip sensor now needed its own batteries I bought bigger plastic housings. The new display was even bigger so the housing for it was the biggest one. Actually wiring up the Transceivers was easy. The sensor boxes with the Arduinos are really simple in design. The few components are all wired together on a simple prototype board.

The new bigger display is a bit more complicated but luckily I found an insructable that explained exactly what I needed. The LED displays I use are 5.7cm high and need around 10V to turn on. For powering the display I use a rechargeable 12V Li-ion battery also made in China.







I am very happy with the way it all came together in the end. Except for a glitch(mostly programing related) here and there it works like a charm and I hope that it will help us with our training.

The C code used on the three Arduinos is available on GitHub. It is probably not the most readable but I will still be happy if I get bug reports:)

Since the main reason to go this way was to save money I think I succeeded. It cost me less than 150€ to built it and I have learned a lot about how to work with the Arduino.

This is probably not the end. I am thinking about how to save the times during training and later evaluate our progress.









[*] I’ve found a simpler, cheaper version, but there is no way to attach a big display and I can’t find any testimonials on how good it really works.

Please enable JavaScript to view the comments powered by Disqus.

Disqus