I kept my adxl335 breakout board flat In the table I got x-333, y-334, z-415. my prob is to convert the raw data to g value. I cant able to get the calibration details and conversion of ADC value to g value?
You got numbers 333/334/415. Nice thing - but from where are these numbers ?
Which unit ?
OK - I looked into the data sheet and can guess:
You got a 5 V / 10 Bit ADC - the LSBit equalling 4.88 mV. Maybe it is not perfect, as the conversion of you figures gives:
333 => 1.626 V
334 => 1.631 V
415 => 2.026 V
All these values are the 'nominal' 0 g values. "Nominal" in the sense that the z axis experiences a 1 g influence "downwards".
All values are beyond expectation for a 3 V supply.
Let me guess: you have a 3.3 V supply ?
To demonstrate more insight: if you are flipping your board (lay it top-down), x and y readings should not change. But the z reading in your current setup will change from 415 to something around 215 (=> 1.226 V) :)
It would be really nice if you followed all data sheet advices:
make ratiometric measurements ! That is: VRef of your ADC has to be the supply voltage of the ADXL.
Then you can follow the other advices in the data sheet (http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL335.pdf) regarding voltages, sensitivity, formulas etc.
These values are the raw digital values (V_reading). To get the g's value you've to refer to the datasheet. From the ADXL335 datasheet, we can see its output is ratiometric with Vs=-0.3V to 3.6V.
Assuming you’re using Arduino Uno with 10-bit ADC (2^10=1023), the actual accel_value = (V_reading * Vs)/1023.
However, the sensor has an offset even without any motion known as ‘’0g bias =Vs/2’’ which must be subtracted from the accel_value above. Also, using the 3.3V pin of Uno as the Vs, the sensitivity of the sensor =330mV/g. Thus, acceleration in g can be calculated as:
Accel. in g ={((V_reading * Vs)/1023)-(Vs/2)}/sensitivity
NB: The 0g bias for x,y,z may not always be the same, so it is better to re-calibrate the 0g bias before starting the system. I used to consider the accel_value of each axis at rest as the 0g bias. Thus, when the system moves, I will record its actual vibration.