Hello all, I have an adxl326 connected to an Arduino UNO with Vcc 3.3 volts, the resolution of the ADC is 10 bits, how can I convert to g's?
I understood your original question and thank you for providing the clarification on the supply voltage. There are a number of things that can influence this, which may require you to dig a little deeper than this. In your configuration, we only support the ADXL326, which provides a nominal scale factor of 57mV/g, but answering your question might require some detailed circuit analysis, some of which involves products that we do not support (Atmel, for example). I will take a look at this to see if the necessary information is easy enough to find, but there is a simple way for you to measure this:
Scale = 2g/(OUT1-OUT2)
For example, if you measure OUT1 = 536 code and OUT2 = 484, Scale = 2g/(536 codes - 484 codes) = 0.04g/code
Does that make sense?
Happy to help, but we are going to need more information than this. Can you post the link to your Arduino documentation? When I review the Arduino Uno, it appears to be powered by +5V, not +3.3V. Here is the link that I see: Arduino - ArduinoBoardUno
Also, are you directly connecting the outputs of the ADXL326 to the Analog Channel inputs?
I check from atmel web page (ATmega328P) for the complete datasheet, it is also possible to connect the atmega328 microcontroller to 3.3 volts. And yes I am connecting the adxl326 outputs directly to the microcontroller analog inputs.
Now I am recording acceleration signals with the atmega328 microcontroller, and get vales from 0 to 1023 bits(10 bits resolution). But I need to convert those values to g's. What is it the best way to convert from bits to g's?
Before I dig too deeply into the circuit analysis, I wonder if it would make more sense for you to use the ADXL345 or ADXL346, which provides a digital output that you can connect to your Arduino Uno through the SPI or I2C ports. It would seem to offer several performance advantages and depending on what I find in the Atmega ADC channel specs, it might save you from having to buffer the ADXL326 outputs.
Check out page 244 of the Atmega dataheet:
Summary: The ADC front-end has been optimized for source impedances of 10k-ohm or lower. The ADXL326's output impedance is 32 kohms so you might find that the scale accuracy has dependency on clock rates and your measurements may be more noisy than expected. I would tend to go with a digital accelerometer (ADXL34x) if you are looking for a simple solution.
This is as far as I can take the circuit analysis. I hope that my post in #3 is sufficient for answering your original question. If it does, we always appreciate Correct Answer recognition to help future reviewers and of course, we welcome additional dialog if this doesn't meet your needs.
If you look into other accelerometer options to simplify your interface, that would probably be worth starting another discussion for. I hope that this helps.
Hello Mark, thaks a lot for for your help. I will try the method you told me on #3.
Did this work OK? If it did, could you mark this with CORRECT ANSWER? If not, we look forward to clarification in future emails.
Retrieving data ...