This project was just recently completed and though the electrical side is finished and working, the mounting still needs alot of work. The basic motivation for this design was to provide a way for an average recreational golfer (like myself) to characterize their swing in a convenient and cost effective way. For anyone who has tried to golf, replicating a good swing is almost impossible--not to mention adjusting swing speed for the distance required on each shot.
Block Diagram:
The design is entirely controlled by the Arduino Duemilanove microcontroller board. For those of you who are knew to electronics or appreciate solid libraries and compiling environment I highly recommend these boards. This board had 5 analog and something like 13 digital pins, more than enough for this project.
My overall goal was to measure the swing and ball speed accurately (within 5%) and be able to adjust to any club chosen by the user. In order to measure the swing speed, I bought two red laser pointers off of ebay to be used as a sort of tripwire. The idea was that as you swing the club through the path of the lasers, the Arduino would log the break time and compute the corresponding velocity over a fixed distance.
Summary, What it does:
- Measures and displays swing speed with any club
- Allows you to remotely input club selection using TV remote
- Based on club selection, calculates and displays predicted ball speed
My lasers:
These are simple 3.2VDC 5mW AIXIZ 630nm modules. The power output is more than enough for my design, and the external leads provided for easy soldering to a single throw toggle switch and battery pack. I originally bought $2 pen laser pointers but after discovering that the negative terminal was the paint coated casing decided to ditch them. Keeping a solid solder joint on the casing was next to impossible, and even when possible resulted in huge intensity loss. Bottom line, AIXIZ lasers are legit.
My photodetectors:
Two OSRAM 570nm Phototransistors that I bought off of digikey provide the optical link with the lasers. The selection of photodetectors is perhaps the most crucial part of the electronics portion. The most common choices for optical sensors are photoresistors, photodiodes or phototransistors. For most applications photoresistors will suffice but they are painfully slow and won't work with this application. Phototransistors and photodiodes are much faster and for me it really came down to finding a sensor that had maximum sensitivity closest to my laser wavelength of 630nm. These OSRAM detectors still have about 85% sensitivy at 630nm--the best I could find on digikey. Also their dark current (current draw when not excited by light) was just a few microAmps--which will save some battery juice.
Semi -Finished product:
I put "semi-finished" because the mounting was thrown together last minute. Notice the Safeway aluminum tupperware mounts for the electronics as well the the LCD stapled to the frame. This will be fixed soon. The IR remote used to select golf club can be seen as well.
Laser Housing:
The modules are currently held in place by.....wood glue. Tons of it. It was all I had before the deadline and also explains why they are wrapped in heat shrink (for better adhesive-ness). Each has a seperate battery pack that a soldered toggle switches to for convenience. Aligning these bad boys took about 2 hours and almost caused me to throw my phone at the wall. IT IS IMPORTANT TO KNOW THE EXACT DISTANCE BETWEEN BOTH BEAM PATHS. Or else your measurements will be wrong, period.
Detectors/LCD:
Same story for the phototransistors, aka wrapped in heat shrink with wood glue. These also were a pain to align, but I won't drag on much longer. I have a serial conversion module on the back of that LCD from Sparkfun--highly recommended if you are working with parallel LCDs. It is a backlit, blue on white, 16x2 character display.
Some of the electronics:
I hate breadboarding, so I refused to leave the project on some bulky POS breadboard. Although it does look like a rats nest right now, those jumpers will be fitted for connectors. You can see the photodetector wires in the back rising up towards their respective holes. TSOP1140 IR detector is on the right-- I still got over 180 degree capture range with it mounted in this fashion. I have a couple passive filters for the power supply noise as well as some other junk. This is part of the electronics.
Schematic:
Some notes...collector resistances on the phototransistors will depend on your specific model. However I suggest between 10k - 100k Ohm for maximum sensitivity with reasonable accuracy. The RC filter on the IR detector is not essential --- but again highly recommended for disturbances.
If you would like to see the code feel free to shoot me an email-- I did not include it here to keep this short and sweet. A video will be coming soon so stay posted!