3
\$\begingroup\$

a project of mine requires to detect how much current vibration / acceleration is in units of (G), the car will carry important instruments, and the driver will be notified if the vibration is over certain limit.

I got a sample of Analog Device ADXL345 from my friend, works but the readout is no very accurate (when stationary, I got a -0.98G on Z, and when fliped over, I got a readout of positive 0.9G, while should be around 1.0G)

After some research I got so many chips, and I don't know which one to pickup, Is there any another better chip around you guys know of?

Requirements:

3 axes 
Range >= +- 8g
Accuracy >= 10bit
Error <= 0.1g
Price: < US$ 50/chip

Thanks

\$\endgroup\$
  • 1
    \$\begingroup\$ I added a link to the part's datasheet. We're trying to make users aware of the importance of this, especially for less common parts, so that others don't have to go searching for it and that everybody is sure to be talking about the same thing. Just trying to cultivate good habits. \$\endgroup\$ – stevenvh Aug 3 '11 at 8:50
  • 1
    \$\begingroup\$ @c2h2 Pure shopping questions are not allowed on Stack Exchange. Fortunately for you Russell gave an answer that is very good. In the future, if you have a question like this, ask it in such a way that you are trying to figure out how to determine what part is the best. Essentially we are here to help you learn how to do it on your own, not just give you the answer an move on. \$\endgroup\$ – Kellenjb Aug 3 '11 at 14:02
8
\$\begingroup\$

You can't select a sensor with great confidence until you better understand the datasheets. You need to be comfortable with the main features involved.

Mechanical sensor is main error source: You need to read the datasheet of such devices VERY carefully. More so for parts like this than many others as much of the spread and offset in the data is due to the underlying mechanical sensor rather than the electronics per se.

Real requirement? Note that your requirement could probably be met with a quite modest spec device. I don't know what your peak g limit is, but say it was 0.1g. And imagine that you wanted to not be more than 10% wrong when you decided the boundary has been reached (0.09g to 0.11g). That's a 1:100 resolution of the actual data point so a device that was genuinely accurate to 8 bits = 1:256 would probably serve you well.

It's quite like that the ADXL345 that you have a sample of will do what you want but there are some things happening there that you need to be aware of.

Documented error sources:

The results you report seem to contain both scaling errors and an offset. Your reported range of -0.98g to + 0.9g = 1.88g suggests a mean value of 0.94g or 6% under (probable :-) ) g level where you are.

The centre value -0.04g or 40 mg (milli g).

Offset error: A look at the data sheet shows that the offset spread is about +/- 50 mg for X and Y axis, in excess of +/- 100 mg worst case for the Z axis and that the centre of Z axis is offset about + 20 mg at Vcc = 2.5V and -10 mg at Vcc = 3.3V. Wow! Clearly some calibration is required for a given IC and a stable Vcc looks like a very very good idea!

enter image description here

Gain error: Similarly (but not as severe) gain varies both with axis and between samples:

enter image description here

Nominal gain is 256 LSBs per g. This graph shows (apparently) that most common sensitovity bins are 254 and 256 LSBs/g but that samples of from 250 (-2.3%) to 260 (+1.6%) lsb's/g can be expected. Your 6% low value seems to be outside this spec

BUT there are various other things to consider as well. Rather than my wading through these at this stage, have a look at the data sheet and come back and ask questions.


How good can you get?: For interest, the 2 axis ADXL213AE(is the most expensive Analog Devices accelerometer ) as assessed by Digikey 1000+ pricing.($20.66/1. $14.33/1000). Looking at its specs should give some idea of what is able to be attained. Parameter spread is similar to the ADXL34 (about $8/1).

The dearest Digikey listing, the 2 axis +/- 4G $89 VTI SCA1000 does not have a detailed enough data sheet to make comprehensive comparisons, but the +/- 60 mg zero point error over temperature (-40 ~ +125C) is perhaps better than but similar to the ADXL units.


Frank mentioned the L1S3H, datasheet here.. This does not provide the detailed distribution graphs that the ADXL parts do, but it shows a +/- 40 mg typical zero offset, which is of the same order as what is seen in other parts.

\$\endgroup\$
  • 2
    \$\begingroup\$ Pure shopping questions aren't allowed here, but your answer is exactly what I like to see for questions like this... that is actually explain the process of what to look for when trying to buy something. \$\endgroup\$ – Kellenjb Aug 3 '11 at 14:00
  • \$\begingroup\$ I'd see this as a design question (but I'm aware that not all share my perspectives ;-) ). viz how do I achieve required accuracy, is this working how I expect (it wasn't), Is there abetter way of doing this (probably no, need to persevere ...) etc. . \$\endgroup\$ – Russell McMahon Aug 3 '11 at 15:42
  • \$\begingroup\$ The problem is that in the past questions like this produced answers like Franks. Although going with that specific part might help the OP, it is very narrow and may not work for a slightly different situation. By explaining like you did it allows someone in a different project to pick the best part for them. \$\endgroup\$ – Kellenjb Aug 3 '11 at 15:47
  • \$\begingroup\$ OK. I'm an "information junkie" - I like all input, so Frank's answer was fine by me :-) - one more data point to add to the mental heap. (Getting it out of the heap again can sometimes be harder :-). Sometimes not). My perspectives are biased by my 'Y'All come- but Y'All better bring information view :-)' \$\endgroup\$ – Russell McMahon Aug 3 '11 at 16:05
  • \$\begingroup\$ I can see how you guys didn't like my answer, I am still a newbie and next time I will provide the tech reasons. I actually didn't provide the necessary details but that is not what the question was asking for. He asked about which chip to use and I provided an answer and get punished for it. Sounds a bit unfair, such as life. \$\endgroup\$ – Frank Aug 4 '11 at 2:47
3
\$\begingroup\$

My experience with MEMs accellerometers says they should be calibrated. As part of the setup, do the stationary flip test to measure the output with -1, 0, and +1 g on each axis. Store these calibration values in the EEPROM of the processor and correct accordingly. Since you care more about values with high magnitude, you can probably get away with a two point calibration at the -1 and +1 g points and let 0g come out where it comes out.

Also keep it in perspective. This is accelleration of a truck. Does .1g really matter? You'll get more than that variation with the same driver trying to duplicate the same ride over the same road.

\$\endgroup\$
  • \$\begingroup\$ Calibration is standard procedure, the deviation of parts that are produced varies significantly if not calibrated. \$\endgroup\$ – Frank Aug 4 '11 at 2:48
2
\$\begingroup\$

The ADXL345 looks like a suitable part. Don't dismiss it because you get an odd reading. Was it placed perfectly horizontally, like in not holding it in your hands. Going from -0.98G (which looks right-ish) to +0.9G by flipping sounds very much like a reading error, not a device deviation.
That said, if you want to measure vibration you don't care about the static reading, you want dynamic performance. Since you already have a sample of the ADXL345 I would do some further tests with it. You could construct a miniature vibration table with a vibration motor from an old phone. Make measurements with the sensor in all possible positions. Placing it upside down should give you a mirror image of the upright position for the Z-reading.
You may want to do some DSP on it, like high-pass filtering, for instance with a 0.1Hz roll-off.

If you're not interested in a specific vibration direction your total vibration amplitude will be

\$V_T = \sqrt{X^2 + Y^2 + Z^2}\$

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.