3
\$\begingroup\$

Pat asks:

Accelerometer Breakout Board - ADXL193 +/-250g

could you tell me if this is correct.

Looking at the data sheet the mid sensitivity is about 8mv/G @ 5volts. If I use a 10bit adc @ 5volts then 5/1024=4.9 mV, so 1g=8mV so in bits 8/4.9=1.63 bits/g. Then if I have a zero adc reading of say 500 and I get a reading of 530, then

530-500- 30/1.63=18 g's.

Is that the way to calculate G's from this Breakout Board.

  • the data sheet says that voltage as low as 3.5 could be used and I was thinking of trying both 3.7v and see if 3.3v will work. Any idea what this will do for the calculations and that maximum range. I know the sensitivity is ratiometric so that will drop based on a lower input voltage.
\$\endgroup\$
  • \$\begingroup\$ +/- 250 G's?!? What are you measuring with this thing? The only things that I could imagine would be to mount it on a model rocket or a potato gun. \$\endgroup\$ – Kevin Vermeer Jul 26 '10 at 14:46
3
\$\begingroup\$

If you use a 10 bit a/d converter to digitise a voltage in the range 0 to 5V then each count will represent 5/1024 = 4.88mV

The sensor data sheet gives an output of 8mV per g acceleration.

In the case that you are stating then the offset from the zero reading is 30 counts. This equates to 30*4.88 = 146.5

at 8mV per g this is 18.3g

From a system level I would have a number of concerns (and these really depend upon the end application for which the device is being used)

  1. +/-250g is one hell of an acceleration. This sort of acceleration can only be seen for a very short time. In order to capture this you would have to have a fast A/D converter, but then the sensor has a 400Hz filter on the output which will remove the fast transients from the output.

  2. The resolution of the A/D only allows the determination of the acceleration to steps of 0.61g. Is this resolution sufficient.

  3. Any noise on the A/D input can give a 1 or 2 count error in the A/D conversion resulting in a large error in the measured value.

If you scale/amplify the output from the accelerometer and limit its value to to lie in the A/D converter input range then you can, at the cost of a reduced dynamic range, improve the sensitivity of yor device without having to increase the resolution and cost of your converter.

\$\endgroup\$
2
\$\begingroup\$

At 1024 steps (10 bit ADC) over a 5v range, that's 4.88mV per step. You can measure a range of 500 Gs (-250 to +250), so at 1024 steps you have (1024/500) = 2.048 units per G, or roughly 9.99 mV. Depending on your accuracy requirements, you can probably get away with assuming 2 steps per G. At +/-250G, you will be off by 12 steps, or 6G, and the error is linear across your readings. For example, if you assumed 2 steps per G, a reading of 1012 would be mistakenly read as 250G when the sensor is actually reporting closer to 244G.

Also, remember that you will undoubtedly be fighting noise and you can be inaccurate to a few units from that as well. This doesn't really play in to how to calculate readings, but is an important consideration when dealing with ADCs.

\$\endgroup\$
2
\$\begingroup\$

Best practice is to always drive ADC inputs with an op-amp.

If, hypothetically, a person were to be the kind of dare-devil hacker as to disregard that rule of thumb and (gasp!) directly connect the ADXL193 +/-250g output to a 10 bit ratiometric ADC, then yes, an ADC value of 30 counts above the "resting" value implies an acceleration of 30 * 5V/2^10 * 1g/8mV = 18 g.

Since the accelerometer is ratiometric and balances zero g near VCC/2, and assuming your ADC is also ratiometric, then after you drop your power supply voltage to 3.7 V, the "resting" value you read on your ADC should be roughly the same as before, and an 18 g acceleration will still produce the same 30 counts above the new resting value. However, as Lou pointed out, you're likely to get a worse signal/noise ratio with VCC at 3.7 V than with VCC at 5 V.

However, if you were to follow recommended practice and stick an op-amp between the accelerometer and the ADC, the picture would be slightly different. You have to pick some gain for the op-amp. I suppose you could pick a gain of 1, which would give you the same numbers as above, but there are better choices for the gain.

I would try to spread the entire range of expected g forces, plus some safety margin ("fudge factor") at the top and bottom of the range, over the ADC input range.

Lou assumes that you pick a gain such that the full-range output of the accelerometer exactly matches the full-range input of your ADC. That's a reasonable choice. However, I would probably sacrifice some of that range to get more precision.

The kinds of accelerations I'm interested in are much smaller -- roller coasters and other amusement rides, hand-held tilt and shake and drop sensors, etc. I've been told that highly-trained fighter pilots wearing anti-G suits black out around 9 g, so amusement rides will have much lower g forces. I'm guessing around roughly +- 20 g is far more than enough. To get +-20 g to map to the 0 to 5 V range of the ADC, I need a gain of Again = 5 V * 1/40g * 1g/8mV = 16. We'll probably round this to some convenient hardware value, and fix up the exact ratio in software.

With an op amp between the accelerometer an the ADC, an ADC value of 30 counts above the "resting" value implies an acceleration of 30 * 5V/2^10 * 1/Again * 1G/8mV.

With the gain I've chosen, those 30 counts represent 30 * 5V/2^10 * 1/16 * 1g/8mV = 1.1 g.

This additional gain gives me an order of magnitude more resolution (I can distinguish between several different small accelerations that would have previously all been lumped into "zero acceleration), at the sacrifice of an order of magnitude of range. Using an op-amp will definitely give you a better signal/noise ratio than no op amp at all. Using a gain of 10 or 30 or 100 may also give you a slightly better signal/noise ratio than a 1:1 op-amp.

\$\endgroup\$
2
\$\begingroup\$

Others have done a good job with the descriptions of how to use the device and calculate your G's, so I'll just focus on your last bullet point.

I'm assuming that you want to connect the sensor with a micro running at 3.3V. There are several ways of doing this. I'll list them from worst to best:

0 - Power the sensor off of 3.3V. This will cause it to run out of spec and possibly behave erratically. Would not recommend without extensive testing (Compare with one running at 5V) and contacting the manufacturer for possible pitfalls.
0.1 - Power the sensor off of 3.5V and connect directly from the sensor to the micro, without level conversion. Technically, you're within the maximum pin voltage ratings. You do loose your upper 200mV of range, so you can only read from -250G to +160G or something like that.
1 - Use a voltage divider. You need to step down from 5 to 3.3, not the other way, so just stick in one 100k and one 196k resistor. Your micro now can read the full range of the sensor with its built in ADC. You are aware of the decreased resolution caused by this change, Also note that your output from the sensor is limited to 100uA, so you'll need large resistors, which makes for noisy signals. Also, measuring rapidly changing signals will be hard, because pin capacitance will take a long time to charge. You want an output impedance of less than 10k for most onboard ADCs.
1.1 - Buffer the output of the sensor through an opamp, so that you can use 1k and 1.96k resistors and get less noise and faster conversions.
1.2 - Buffer the output through the opamp, and use it in an amplifier configuration to eliminate the voltage divider as an input, and instead connect the output directly to your ADC. This just eliminates a little more noise.
2 - Use a separate ADC, powered at 5V, and interface with it over some 1k resistors to protect your 3.3V input pins. Note that you'll need to do level conversion of some kind to send data from your micro to the ADC if necessary. This will give you the most accuracy, because you're not limited to the 10-bit ADC on your micro. This will also free up processor time.

\$\endgroup\$
1
\$\begingroup\$

I once tried a similar SFE breakout board for another accelerometer and found it to be unusable, because of the noise it picked up due to the long connections. I designed my own PCB with the accelerometer close to the MCU ADC inputs, and all the noise disappeared.

\$\endgroup\$
1
\$\begingroup\$

Thanks for your help.. one other question about the voltage, the data sheet says that voltage as low as 3.5 could be used and I was thinking of trying both 3.7v and see if 3.3v will work. Any idea what this will do for the calculations and that maximum range. I know the sensitivity is ratiometric so that will drop based on a lower input voltage.

Thanks, Pat

\$\endgroup\$
  • 1
    \$\begingroup\$ If you use supply voltage as the ADC reference then the ADC is ratiometric as well, so everything should continue to work the same (more noise perhaps) as the voltage goes down. Somewhere below the published minimum rating the circuit will cease to work of course. \$\endgroup\$ – markrages Jan 14 '10 at 23:34
  • \$\begingroup\$ Well, your noise probably won't scale down as your readings will, so your signal to noise ratio will probably decrease. In effect, you will be reading more noise and less signal, making your readings less accurate. If the IC is rated for those voltages (iirc it is) then yes, all of the calculations will scale down but the maximum range should remain +/-250g (check the data sheet to be sure). Running it at the highest voltage possible usually increases your SNR and gives you better results. \$\endgroup\$ – Lou Jan 15 '10 at 13:14

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.