Accelerometer

    This is a small daughter board which is installed on the main microcontroller motherboard which provides two axes of acceleration, X & Y, allowing motion or tilt to be calculated.

Background:

This project started out with two independent sources for accelerometer boards. In two years, they are both gone. So, here is the new "Leaf Accelerometer" board, which is a direct replacement for the old "PicoTilt" board.

The Leaf microcontroller board expects an Analog devices ADXL202JE accelerometer chip which puts out a PWM signal for acceleration in two axes. While Analog is also phasing out this chip, I expect that it will be available as a replacement part for quite a few years (or so I hope). The backup for the future will be to go to a chip with analog outputs. Hence, the picotilt like version of the board was selected since it brings out the analog signals to pins to the microcontroller. Therefore it will be possible to use analog inputs on the microcontroller board also (with a couple jumpers and a "minor" software change) if it becomes necessary. However, the analog chips do not have as much resolution for reading the accelerometers as the PWM chips do, but should be good enough for computing tilt angles.

Design:

Note: for ADXL202 data sheet, go to: http://www.analog.com/UploadedFiles/Data_Sheets/53728567227477ADXL202E_a.pdf

The ADXL202 is a dual axis accelerometer. It requires 5 vdc (pin 8) and a ground (pin 3) for power. It has two analog outputs for the X and Y axes. It is possible to connect a capacitor (Cx,Cy) from each of these outputs to ground to filter the associated signals. The signal sensitivity on the analog outputs is only 312 mv/g and is not practical to use as an analog input since resolution is low.

However, Xout and Yout are PWM signals which can be read more accurately by timers on the Adapt9S12 microcontroller. The duty cycle is only 12.5 %/g but can be read accurately with an accurate timer. The period of the PWM output is determined by resistor R.

Resistor R is a 1.2M resistor giving about a 10 millisecond period. This period was selected to ensure a fresh data sample each time the microcontroller board reads it at a 16 msec rate.

Cx and Cy are 0.1 uf capacitors giving a bandwidth of 50 Hz. This value is pretty arbitrary as the microcontroller applies a 0.5 second filter in software to minimize noise.

Cp is a power supply bypass capacitor of 0.1 uf.

 

Parts:

The bare board can be procured using the expresspcb.com data files available here. Unfortunately, the circuit board design is for 21 boards at a time and will cost $60 or so with shipping. You can usually get single boards or kits from Alex Brown at rbirac@cox.net .  Ask about availability and pricing.

The accelerometer chip is available from analog.com and from digikey.com

1 10 pin header digikey.com WM6510-ND

1 1.2M resistor digikey.com P1.2MBACT-ND

3 0.1 uf cap digikey.com 399-2127-ND

Assembly and test instructions are here.