Hack-a-Bat 101: Introduction

Gurus, Gyros, and IMUs

Hack-a-Bat 101: Introduction

Gurus, Gyros, and IMUs

Aug 06, 2008

The Goal of the Hack-a-Bat project is to model the motion and position of a baseball bat on a personal computer. At the surface this seems like an ambitious goal, but with solid research this project can be completed with a fundamental understanding of electrical circuits, physics, calculus, and data analysis software.

Introduction

There are several ways we can determine the orientation and position of an object (in this case a baseball bat) in space. Computer vision software could be used to capture this information, but would require several cameras, a high-end computer, and expensive computer vision software. This method would give us precise measurements and readings, but we want to create a system that is relatively inexpensive, and minimizes the components required for its operation. Inertial measurement units, or IMUs, are microelctromechanical systems or MEMS that detect the rate of acceleration as well as roll pitch and yaw. An IMU is perfect for our application because of its small size, low power consumption, durability, and ease of use. If I haven't lost you yet, read on...

Degrees of Freedom

A baseball bat, like any rigid body object exists in three dimensional space. The bat has translational displacement along each of the three axis. The bat also has circular rotation about each of the three axis. This amounts to a total of six degrees of freedom. Our goal is to model the bat in the 3-D space so we want values of both the displacement and rotation about the axis.

The diagram below gives you a rough idea of what movement within the cartesian coordinate system is like.

Hardware Components

Accelerometer

The Accelerometer is a MEMS device that is used to measure acceleration and gravity induced reaction forces. A triple axis accelerometer is used to measure direction and magnitude along each axis. The value you receive from the device is an acceleration value (e.g. m/s^2). Recall from your calculus course that to determine the position of an object in the continuous time domain, we perform a double integration on the acceleration with respect to time. Because we are working with electronic components, we are working in the discrete time domain. This means that our algorithm for calculating position will be performed using two consecutive first order approximations via the Trapezoidal or Adaptive Simpson's Method. We will further discuss this later.

Gyroscope

The gyroscope is another MEMS device that provides us with the angular rotation about an axis. Gyroscopes are used in devices such as aircraft to determain the orientation of the object in space.

Microcontroller

The combination of the two MEMS devices gives us enough information to determine how the bat is positioned in three dimensions. The data from the devices is processed by a microcontroller. The microcontroller can be thought of as a mini computer. Data is processed on clock cycles within the chip, and buffered, or stored temporarily, before it is transmitted to the remote computer. The frequency of the internal clock determines how quickly and how often data is processed.

Transmitter/Receiver

A wireless transmitter is connected to the microcontroller's serial port. Once the data is processed, it is sent out on the serial bus, or serial port. A receiver connected to the remote computer, is "tuned" to the same frequency, and listens for new data being sent. For example, when you connect a bluetooth handsfree device to your phone, it is paired with your phone and you can "send" your voice to the phone, and "receive" the audio from the person speaking.

Personal Computer

A Computer is setup nearby to receive the data from the bat. Software running on the computer can be configured to give us a visualization of the position of the bat throughout the duration of a swing.

In the next article, I will break down each of the components in the bat's internal circuit.

Posted by Guru Lloyd | tagged: Ryan Howard, accelerometer, hack, sports, Lloyd

1 comments

  1. Jim 2.0 Says:

    Aug 06, 2008 10:25 am

    Lloyd, I must admit, you lost me at "a fundamental understanding of electrical circuits, physics, calculus, and data analysis software." But then your cartoon bat won me back. ;)


    Seriously, though, terrific article -- I can wrap my head around these concepts the way you've written them, even without an engineering degree. Looking forward to Part 2!

ADD COMMENT

My Home 2.0: Powered by Verizon FiOS

LEARN MORE

Enter your 10-digit phone number to see if FiOS is available to you.
- -
Why you should want FiOS!

On Air!

Porter: Game On!
Nov 21, 2008 1:00 pm
FOX 55 - WFFT, Fort Wayne

More about Porter: Game On!

Today's 2.0 Tip

Use an iron to repair paperback spines

Click for more DIY and tips!

FiOS Wiki

Share your tweaks, tips and knowledge with FiOS users!

Check it out now!

Our Next Family

The Jaegers
Their dusty old photos are now a stunning digital Memory Wall!

Click for all the families

Casting Upgrade

Does your family need a tech makeover?
Audition now!

Have a family to recommend?
Click here!