Motivation and Audience:Motivated by one of the article from circuit cellar, I want to trace the author's steps to see how the G-Force machine work. The author wrote an article on how to build a machine, that measure acceleration using a PIC 16F84 and a acceleration sensor.

ADXL202AE is a 2-axis accerlerometer with analog or digital output. The digital sifnals whose duty cycles (ratio of pulsewidth to period) are proportional to acceleration. The duty cycle can be measure by using a microprocessor counter. Algorithm is posted later in this tutorial. The duty cycle period is adjustable from 0.5ms to 10ms by adjusting the resistor attach to Rset.

Acceleration experienced by the ADXL202 may be calculated by the following formular:
Acceleration(g) = (Duty Cycle -Duty cycle at Zero(g)) / (Duty Cycle per g)

if the nominal duty cycle output of the ADXL202 is 50% at zero g and 12.5% duty cycle change per g. Therefore to calculate acccerlation from the duty cycle:

Duty Cycles: think of this as a square wave, the longer the pulse of the wave is, the higher is that value. And have a counter count how many time of certain interval that the pulse stay high and low will give us the value.

The duty cycle = (pulse interval) / (period).
The period is set using a resistor at T2 (Rset)

Voltage Regulator LM78L05:

The voltage regulator will ensure a correct level of voltage supply to component.Figure2 and Figure3

The LCD: We are using a DCM-16L207 LCD. This LCD has 2 line, 16 character per line display. The x207 has capability of displaying ASCII characters.

Note: The Lcd has port 1 -> 14, the circuit use port 14 -> 11 for 4 bit data transfering, port 6,5,4 for LCD control, port 2 for drive voltage and port 1 for ground. Missing from the circuit is port 3 which drop through a resistor or a potential resistor to controll the contrast of the LCD. Missing this resistor will leave the LCD blank and you won't see anything. I use a 3.5K Ohm for this, anything near it will be ok.
insert picture of LCD here

Building the circuitFigure4Copy right of Ross Tsukashima, Circuit Cellar Magazine, issue 154 May 2003

Building the circuit require time and determination. Since the ADXL202 sensor is very small, having a mounted board for this chip will make work easier. I didn't think of it when I build this circuit so you can see that my board is kind of messy. But as long as I have the sensor oriented correclty, this won't affect the performanceFigure5Note: As you can see, I have made mistake not connect any resitor to pin3 of the LCD, it take me some delay to figure out this mistake. When debug your circuit, all part are significant. I kind of take that for granted and didn't check the LCD carefully.