Post Go back to editing

What are output units IIO oscilloscope CN-0540?

Category: Software
Product Number: CN-05450
Software Version: IIO Oscilloscope version v0.15-master, ADI Kuiper Image for CN0540 (https://wiki.analog.com/resources/eval/user-guides/circuits-from-the-lab/cn0540/de10-nano)

I want to be able to use IIO oscilloscope to take acceleration measurements that I can convert to m/s^2 but i don't understand the output units, what are the units, and are there any settings (shift voltage, input voltage?) that would impact the sensor output.

I have an accelerometer (https://www.pcb.com/products?m=350d02) attached to https://www.analog.com/media/en/reference-design-documentation/reference-designs/cn0540.pdf which is mounted to https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=165&No=1046#contents. I connect through a serial connection through Putty from laptop to de-10 nano and also an ethernet to pull the ADC data to IIO Oscilloscope.

I am able to collect readings and save out as a .csv, however I am not sure what the units are so that I can convert them to acceleration units (m/s^2). I tried multiplying the .csv array by the ad7768-1 voltage0 scale value (0.000488281) as i assumed that was the conversion needed to get units of millivolts, and since the sensor has range of -5000mV to +5000mV divided the resultant array by 5000 to get a scale of -1 to 1. Do check if this was correct I then compared these values to the values given from the .mat export from IIO oscilliscope with "scale to +-1" selected. The results were in the same ballpark but off by 15%. I also compared to results from the same sensor, but with a different DAQ, and the results were also different.

I also noticed that altering the "shift voltage" has a large affect on the scale of the output and I am not sure what it means. Could you explain what "shift voltage", input voltage", and "sensor voltage" under the "sensor calibration" heading mean?

Parents
  • FormerMember
    0 FormerMember
on Jan 18, 2023 3:08 PM

Hi jcolumbus,

So from IIO-Oscilloscope, the units are likely to give you raw codes out from the ADC of the CN0540 (AD7768-1).  In order to turn those values into accelerometer units you're going to need to do some math and post processing.  That math is going to include parameters from the shift voltage and the scale values to get to the final number.  At a baseline, the raw * scale values is going to give you the voltage output.  The shift voltage is something that comes from the DAC on the CN0540 and that is designed to shift the input of the sensor down into the range the converter can handle.(i don't think it directly impacts the ADC value read, just more of an offset)  Then you are going to have to take into consideration the sensitivity of your sensor (divide it by the sensitivity) to get the acceleration.  I believe all that math works out, but worth double checking me on it.

Cheers,

Brandon

  • Hi Brandon, thanks for taking the time to reply! It is helping me get to the bottom of it.

    I have confirmed that the .mat export with -1 to 1 option selected is just dividing the raw array by 8388608 which confirms "Raw" values would be the direct AD7768-1 dout integer values in the range of -8388608 to +8388608 (24bit). This makes sense to me. If i multiply the -1 to 1 value by 4096mV (AD7768-1 reference voltage), this gets me the scale value = 4096/8388608 = 0.00048828. Therfore the voltage the scale value calculates is the Ain+ - Ain- values. This makes sense

    What i am still not 100% sure of is how to go from the this Ain+ Ain- voltage to real world units using the sensor sensitivity. My sensor is 10g/mV. The sensor has a range from -5000 to 5000mV (-50,000g to 50,000g). Does the sensor signal just get cutoff at 4096mV in which case I just multiply the Ain+ value by 10 to convert to g's, and I can't measure anything above 40,960g, or does the 5v signal get scaled down to 4.096v, in which case I need to mulitply the Ain+ - Ain- voltage by 5/4.096 before applying the sensitivity.

    Thanks in advance for the help!

  • Reply
    • Hi Brandon, thanks for taking the time to reply! It is helping me get to the bottom of it.

      I have confirmed that the .mat export with -1 to 1 option selected is just dividing the raw array by 8388608 which confirms "Raw" values would be the direct AD7768-1 dout integer values in the range of -8388608 to +8388608 (24bit). This makes sense to me. If i multiply the -1 to 1 value by 4096mV (AD7768-1 reference voltage), this gets me the scale value = 4096/8388608 = 0.00048828. Therfore the voltage the scale value calculates is the Ain+ - Ain- values. This makes sense

      What i am still not 100% sure of is how to go from the this Ain+ Ain- voltage to real world units using the sensor sensitivity. My sensor is 10g/mV. The sensor has a range from -5000 to 5000mV (-50,000g to 50,000g). Does the sensor signal just get cutoff at 4096mV in which case I just multiply the Ain+ value by 10 to convert to g's, and I can't measure anything above 40,960g, or does the 5v signal get scaled down to 4.096v, in which case I need to mulitply the Ain+ - Ain- voltage by 5/4.096 before applying the sensitivity.

      Thanks in advance for the help!

    Children
    • FormerMember
      0 FormerMember
    on Jan 26, 2023 4:19 PM in reply to jcolumbus

    Hi jcolumbus,

    Sorry for the delayed response here.  If your input range is larger than the input range of the AD7768-1 than anything larger is just going to clip at the highest (or lowest) input code.  So any voltage larger than 4.096V is going to convert to a full scale digital value.  Now you'll want to make sure that you are not violating the absolute max input range of the AD7768-1, so have a look at the datasheet to figure that out AD7768-1 (Rev. A) (analog.com).  Based on the CN0540 schematic, AVDD1 is tied to 5V, AVSS is GND, so you need to adhere to those constraints.

  • Thanks! My sensor is limited to 5V max output, and I am operating in the lower end anyways, so that sounds like it is not a problem. So if i understand correctly, i just need to multiple the raw by (4.096/8388608) to get a result in voltage (V). With a sin input signal i get the following result which has a Vpp of around 0.005V and rms of 0.00186V.

       

    However, when I use a different DAQ, the MCC172 with the same sin input signal, and the exact same microphone, I get a Vpp closer to 0.02V and RMS 0.00677. 

    I have repeated these results and the ratio between RMS stays around 3.65. I am unsure why there is this discrepancy and it is very important to understand since it would throw off my measurements! I will be looking into the mcc172 side to see if there is anything wrong there, but I just would like to know if there is anything that you can think of that would account for this. 

    Thanks again! 

  •   As a follow up, I used a signal generator and have validated that the MCC172 input = output, however when using the CN0540 the input != output. I was specifically using a 3.5Hz sin wave signal where I varied the input Vpp between 2 and 8 volts with an offset of 5 volts and connected via the Vin and GND pins located at P1. I confirmed the Vin signal on an oscilliscope. My output voltage conversion was voltage = (24bit ADC output)*4.096/8388608. My results show that instead of being 1:1, my input Vpp was around 4 times larger than output.  Why are these results not 1:1? If the ratio was constant, I could at least I could mulitply my values accordingly, but since they are not consistant at different voltages I am in a bit of a pickle. My results for 4 different input Vpp are shown below, as well as an example waveform for input Vpp = 7.24V.

    As a side note, I am not sure what the proper settings are for using the P1 pins instead of the coaxial connector. Whether I take out the P10 jumper (which is supposed to be for testing without a current source) or disable the constant current in the IIO oscilliscope (which turns off the blue D43 LED, or both, I get the same results. Are these just methods to save power, or is there a correct setup I should be using when applying a signal generator.