-
Step 1
Step 1Make a hole in your bat
You’ll need a place to put the electronics. Using your spade bit, bore out a hole at the end of your bat, two and a half inches deep, and one and a half inch in diameter. -
Step 2
Step 2Drill holes for LED lights
Drill 8 quarter-inch holes around the bat. The LEDs will light up during your swing. -
Step 3
Step3Assemble the circuit
Test the circuitry on a breadboard, according to data sheets for each component. Connect them to the computer with a USB serial converter, and check that they are delivering data.
Solder header pins to the transceiver and the accelerometer and gyroscope sensors. Use wire wrap on header pins to make the connection. Insulate the connections with hot glue. Now connect the microcontroller to the IC socket, and connect the header pins from the microcontroller to the header pin socket that is connected to the LED light array. Wire-wrap the pins on IC socket so that microcontroller can be removed from the socket.
The microcontroller processes information from the accelerometer and gyroscope, and sends that to the transceiver, which sends it wirelessly to the computer. -
Step 4
Step 4Protect the electronics
Take the anti-static bag and place it around the electronic components, which should shield it from any electrical noise generated throughout the swing. Place the foam padding around the anti-static bag, and stuff them into the bat. Then insert the battery. -
Step 5
Step 5Cap the bat
Cap off the end of our bat, and seal it up with hot glue, and we’re ready to swing away. -
Step 6
Step 6Present the 2.0 Bat to Ryan Howard
If you don’t have a 2006 National League MVP on hand, present the bat to a young future MVP. -
Step 7
Step 7Track swing with data visualization software
The Hack-a-Bat software is an application from guest gurus Joel Murphy and Marcus Pingel. They wrote it in the C++ programming language using the Xcode Developer Tools on a Mac. It was created using the openFrameworks C++ library version 0.05. openFrameworks is a great opensource project actively developed by Zach Lieberman and Theodore Watson along with help from the OF community. For more information check out open Frameworks (http://www.openframeworks.cc/).
First we established serial communication between the microcontroller reading the data from the accelerometer and gyroscope and the Hack-a-Bat software running on the computer. Then we wrote a program to visualize this data.
The Microcontroller in the LED display receives a signal from the Visualization software on the laptop. Upon receiving the signal, the Microcontroller retrieves the wireless data transmission from the bat. Then it sends that data to the Visualization software. The Visualization software requests data 60 times per second, in time with the video frame-rate.
The blue line is the y-axis of the accelerometer. The green line measures the swing speed. An elevated green line indicates a faster peak swing speed. The yellow and red lines, taken from the gyroscope, show how the position of the bat changes during the swing. They provide a graphic of the swing style.









