PDA

View Full Version : Propeller and the ADXL202



Brianmcm
01-15-2009, 01:10 AM
I'm new to the Propeller Chip and was wondering if anyoneˇhas integrated the Analog Devices ADXL202 accelerometer with the chip. I researched the Object Exchange and found info on the Memsic 2125; would the information be similar? I have a little project that I'd like to utilize the ADXL202 and had one of the Evaluation Boards; using it with a BS2. Any assistance/guidance would be greatly appreciated.

Thank you
Brianmcm

Beau Schwabe
01-15-2009, 01:45 AM
Brianmcm, (http://forums.parallax.com/member.php?u=41052)

Should be ok.... looking at the data sheets (see attached) the output formulaˇis the same for both.ˇˇOn the ADXL202, it looks like T2 will need to be set with an external resistor value.ˇ If you are looking at the "ro" and "theta" values produced by the Memsic 2125 object thenˇtheˇtime units are arbitrary, but if you are looking at the RAW x and the RAW y values, then a precision trim-able resistor might be necessary for the ADXL202.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Leon
01-15-2009, 02:37 AM
I've used it with an AVR assembler program, the software was quite simple.

Leon

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle

Brianmcm
01-15-2009, 02:50 AM
When you mentioned a precision trimable resistor what you recommend? Using the ADXL202EB with the BS2 was direct connect, no additional components necessary. "T2" was established through the code; see below.

FREQ VAR WORD
T2 VAR WORD

COUNT 8,500,FREQ

T2=25000/(FREQ/20)

Axis acceleration was calculated by

Xaxis=8*T1x/T2
Yaxis=8*T1y/T2

Thus the reason for the component recommendation.
Thank you so much for your help

Brian

Beau Schwabe
01-15-2009, 03:11 AM
Brianmcm,

With the Memsic 2125, T2 is fixed to 10ms and the formula you posted is correct.
However with the ADXL202, T2 is adjustable by an external resistor. You might get close to 10ms, and if so the formula would still work.

The ADXL202 datasheet provides information on how to calculate the appropriate resistor value for T2.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Post Edited (Beau Schwabe (Parallax)) : 1/14/2009 7:17:40 PM GMT

Brianmcm
01-15-2009, 09:47 PM
Beau,
Thanks again for the guidance!
Now for some experimentation.
Very Much Appreciated!
Brian