From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding 2 ADXL335 accelerometers to NI 6009 DAQ. Conversion from voltage to acceleration.

Hello,

 

I am working on a continuous data acquistion project using 2 ADXL335 accelerometers with the NI 6009 DAQ. Ideally, I would like to measure them as differential, but there are only 4 differential ports on the 6009, so I would be 2 axis short. Since there are 6 axis I am looking to measure, I have set each axis as an RSE port a0-A5.I am working with Visual C++ and coding in C. I have been working with the VC_TDMS_ContAcq_IntClk  example code to export the data to an excel spreadsheet, which works fine. However, since the DAQ cannot read the ADXL335 device as an accelerometer, I have each axis set as a voltage source. Therefore, my exported data to Microsoft Excel are data points that are voltage (v) and not acceleration (g). My voltage data points for each axis at rest with no vibration vary anywhere from 1.3 - 1.9 (see attached). a0 = X1, a1 = Y1, a2 = Z2, a3 = X2, a4 = Y2, a5 = Z2.

 

I have been trying to figure out how to scale the voltage to output acceleration. Max sensitivity for each axis is 330 mV/g. The analog outputs for the accelerometer is 3.3V. Zero g bias output is 3.3V/2 = 1.65 V. It is +- 3g analog out so -3g is at 0V and 3g is at 3.3V with full scaling in between.

 

I tried setting up a voltage task, with signal input range min = 0, max = 3.3V. Terminal configuration = RSE. The part I question is my custom scaling. I chose a Linear scale with a slope of 3.03 (since 1/330 mV/g = 3.03). I click run and I get data that is roughly 5 (see attached).  Any help would be appreciated.

 

Best Regards,

 

Scott

Download All
0 Kudos
Message 1 of 4
(8,436 Views)

You should decouple /filter the supply and analog output voltages (analog) and you should use some digital filtering...

If you look at fig.1 of the ADXL335 datasheet , what values did you use for the capacities? How close is the C_DC to the MEMS ?

What is the maximum frequency you want to measure?

How did you provide the power to the sensor, how did you exactly connect the sensor (all used wires and shields) 

Since these sensors provide  DC  signals, you can easily 'calibrate' your sensors by measuring the output voltage for each axis at -1g and +1g , the rest is simple math 🙂

and keep in mind that the sensitivity has a range (so try to calibrate) and is ratiometric to the supply voltage  ... 

 

And keep in mind that you have an offset at the output voltage, so your scaled value of 5 makes sense 🙂 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 4
(8,416 Views)

Hi Henrik,

 

Thank you for the reply. I didnt attach any capacitors yet. So far I am using two 9C / 22 AWG shielded cables, roughly about 15 feet in length each I stripped the wires on both ends and soldered one side to the accelerometer board, and the other end of the wires are inserted directly into the DAQ 6009. Power to the sensor is coming from the DAQ 5V port. There is an on-chip voltage regulator that scales it down to 3.3 V. Thank you for the advice on calibration. For each axis, I created a custom scale and took the voltage at +1g and -1g, then applied the slope formula to find the slope and y-intercept. Right now, I am trying to record the frequency of a paint shaker table. However, I read in some places on this website that the USB 6009 does not support frequency measurements. Is there a way for me to measure frequency? In signal express I can acquire the scaled voltages (now acceleration) with a 1k Sampling rate, add the Distortion step and it will tell me the fundamental frequency, but no other frequency values such as the average.

 

Best Regards,

 

Scott

0 Kudos
Message 3 of 4
(8,383 Views)

can you share me the mathematics of calibration? can you tell me how i can measure the displacement using ADXL 335 and NI USB 6003?

0 Kudos
Message 4 of 4
(2,002 Views)