Building Paul's Accelerometer/Gyroscope Board

By: scott_d

2010-08-19 22:53:30

At the last Monday meeting I picked up a gyro/accelerometer kit from Paul. This is a successor to his accelerometer board which several of us have built successfully. This new board is a more complex build, both because it has two LGA packaged sensors and also because it is pretty tightly packed and almost all of the discrete components are 0603 0402 (I thought they looked small....) packages. I used a couple of single package solder paste stencils (LGA 12 and LGA 16) to put paste down for the two sensor chips and put paste on by hand for everything else. I managed to lose one resistor (tweezer tips clicked together and sent the part zooming off to who knows where). And one capacitor tombstoned when the board was reflowed and I broke it while trying to rework it. So I got a couple of replacement parts from Paul and soldered them by hand. Since the accelerometer part of the board is essentially the same as the original accelerometer only board, I was able to test that part with the Teensy sketch I've used before (reading the values from the chip via I2C and displaying the values via an RGB LED). All three axes seem to be working fine. The gyro chip has analog outputs for the two axes. So I decided to try out Ward's Txtzyme Teensy program and JavaScope viewer. I pretty much followed Ward's example program and wired up each of the two analog outputs from the gyro to an analog input pin. Using the Txtzyme string '6d1o500{1sp16m600u}0o' I was able to collect and display the analog input from pin PF1 as I rotated the board back and forth. Here is an example output from one of the axes: [[Image:roll2.png]] The other axis looks similar so it appears that the gyro is probably working. According to the datasheet, the output for the gyro at rest is 1.23V so there is more headroom in one direction of rotation compared the the opposite direction as can be seen from the plot. Now to put this board to use. Maybe a balancing robot... --Edit-- I've recently gotten angle calculation working using a Kalman filter to combine the accelerometer and gyroscope data. I'll write it up shortly. In the meantime, ask if you are interested in learning more.
Back to archive index