SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By muzz_cistel
#178999
Hello Developers,

I have connected an adxl335 accelerometer to an mbed microcontroller (LPC1768). The accelerometer is powered using the 3.3V pin from the LPC1768. The accelerometer is connected to a breadboard using long centered pins (https://www.sparkfun.com/products/12693). I have the following 2 questions:

1) What is the expected output from the x, y and z pins when the microcontroller is flat? I expect the x and y pins to be approximately 0 and the z pin to be 1g (0.1V?)

2) A lot of the time when I am moving the accelerometer I start to get output values that make no sense. And sometimes I get different results when the accelerometer is in the same position (for example after rotating 360 degrees the reading are no longer the same as before)? Could this be caused due to the method I have connected the accelerometer to the breadboard? How can I fix this problem (solder the pins to the accelerometer)?

Thanks
By Mee_n_Mac
#179005
If powered by 3.3V, the zero G levels should be Vcc/2 or about 1.65V. The output voltages then go up or down w/positive or negative Gs. The sensitivity (nominal) is listed at 300 mV/G but with Vcc = 3V. The output is ratiometric meaning it scales up/down w/the supply voltage. So with 10% higher Vcc, the sensitivity should be 10% higher, about 330 mv/G.

So the X and Y axes should read about 1.65V and the Z axis 0.33V above (or below) 1.65V when the accelerometer is "flat".

Is that what you're seeing ?

https://www.sparkfun.com/datasheets/Com ... dxl335.pdf

ps - Yes, flaky non-consistent readings could be a result of intermittent connections due to your non-soldered pins. Try some kind of clip lead if you don't want to solder.
By waltr
#179184
What are you using to measure the output Voltage?
The analog outputs on the adxl335 have an impedance of 32k Ohm and will not properly drive a ADC input. A high impedance DVM is ok but an op-amp buffer (Voltage follower) is required for any ADC including the ones inside of micro-controller chips.
By Mee_n_Mac
#179198
waltr wrote:The analog outputs on the adxl335 have an impedance of 32k Ohm and will not properly drive a ADC input.
Well the timing may have to be a bit longer but I think the Arduino analogRead() is "long" anyway.

From the 328 PDF ...

The ADC is optimized for analog signals with an output impedance of approximately 10 kΩ or
less. If such a source is used, the sampling time will be negligible. If a source with higher impedance
is used, the sampling time will depend on how long time the source needs to charge the
S/H capacitor, with can vary widely. The user is recommended to only use low impedance
sources with slowly varying signals, since this minimizes the required charge transfer to the S/H
capacitor.