LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sensor and Temperature Calibration in LabView

Solved!
Go to solution

I am trying to use LabView for Data Acquisition using a combustion gas detection sensor. The sensor is in a Wheatstone circuit, so the output measured is the voltage change. At the same time, we have a temperature sensor on the same PCB board because change in temperature affects the sensitivity of the Gas Detection sensor. So we have to calibrate the sensor against the temperature sensor.

 

My question would be, will I be able to do the calibration in LabView? If yes, how? And will I be able to do it i the base version of LabView?

 

Thank you.

0 Kudos
Message 1 of 11
(6,163 Views)
Solution
Accepted by topic author tingggggg

Hi nmc,

 

will I be able to do the calibration in LabView? If yes, how?

At first you should draw your "calibration algorithm" on a sheet of paper. Yes, paper…

Once you figured out how you can calibrate your sensor (do you have a datasheet, manual, whatever?) you can start to code that algorithm - that's the usual order of things…

 

And will I be able to do it i the base version of LabView?

Sure. Maybe you need to program some functions, which are only available in better LabVIEW packages, as subVIs - but all the usual math functions are available!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(6,125 Views)

Thank you for answering. We know how to do all the calibration because we have the manual. As long as the math functions are available in the Base Version, we are good to go. 

 

Thank you again.

0 Kudos
Message 3 of 11
(6,104 Views)

I am reading a voltage signal from a sensor that is affected by temperature changes. So I have placed a temperature sensor right next to the sensor. Now I want to calibrate the voltage signal live according to the live temperature readings. I do have the temperature performance data, so I can apply a calibration function. I am just not sure how to do that in LabView. 

 

I appreciate any help. Thank you.

0 Kudos
Message 4 of 11
(6,094 Views)

Explain what you know of the process to properly compensate for temp changes if you were to do it manually. I have seen a zillion approaches so narrow our challenge in helping you down to the case you need.

 

Ben

 

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 11
(6,069 Views)

Hi Ben,

 

Thank you for replying. So basically, I have a combustion gas sensor that I am using, and the manufacturer has provided me a graph of the effect of Temperature on Methane Signal. Methane is the main gas that I am trying to detect. The functions of the temperature effect is close to linear so i think I can derive a simple linear function to apply the temperature readings of the thermistor (next to the sensor on the PCB board) in order to correct the readings of the sensor signal.

 

I am not sure if I have explained this correctly. Please let me know if this is still confusing.

 

Thank you.

0 Kudos
Message 6 of 11
(6,063 Views)

Hi thorting,

 

The functions of the temperature effect is close to linear so i think I can derive a simple linear function to apply the temperature readings of the thermistor (next to the sensor on the PCB board) in order to correct the readings of the sensor signal.

So you do have problems to apply a simple linear function on a signal in LabVIEW?

Something simple as "Y = aX+b"???

 

(Btw. you could even apply scales directly on DAQmx channels! Read the help for DAQmxCreateChannel function…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 11
(6,054 Views)

@thorting wrote:

Hi Ben,

 

...

 

I am not sure if I have explained this correctly. Please let me know if this is still confusing.

 

Thank you.


It is.

 

You have described what seems to be a Concentration which is a function of delta V and temperature.

 

So...

 

Figure out what the formula is to do the conversion or if you are not sure of the math, share the document that describes how to do the conversion. As Gerd posted early in this thread...

 

"

At first you should draw your "calibration algorithm" on a sheet of paper. Yes, paper

"

 

If we can not describe the conversion on paper manually, then there is only a snowballs chance in hell of telling a computer how to do it. Silly computers!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 11
(6,041 Views)

Hi Ben,

 

Sorry that I am confusing you so much. Please understand because this is my first time using LabView and I am in the early stage of my career, so I am confused as well.

 

I am attaching pictures of the temperature performance data below. And this is the only temperature calibration information they provided me. The math is easy, but do I just apply a scaling function in the DAQmx Create Channel VI?

 

Thank you for your patience.

Download All
0 Kudos
Message 9 of 11
(6,026 Views)
Solution
Accepted by topic author tingggggg

I do not think scaling in DAQmx will do what you are asking because the linear scaling depends ona fix "m" and fixed "b" as in;

 

Conc. = m(Delta V) + b

 

Those images show that both "m" and 'b" are a function of temperature.

 

So start out simple and just write a VI that will let you enter a "delta V", a "m" and a "b". Get that to work first.

 

Then take a look at a pair of functions on the array palette;

 

Threshold 1d array

and

Interpolate 1d array

 

Read the help on those and play with them until you figure out how to use them together. They will let you develop code that works as follows...

 

1) Search an array of temperatures (that you will enter based on those graphs) based on temperature value (your measured temp). It will return a factional index that represents where in the array of the temps you entered your measured temp would be found.

 

2) Use the fractional index to interpolate an array of "m"s that you enter based on the graph.

 

Use the "interpolated "m" to drive that simple VI you started with.

 

Repeat step #2 above but this time use an array of "b" values and use the interpolated "b" to drive that same sub-VI.

 

If you code it right, enter the value from your graphs correctly (i.e. you should have one temp value for every "m" value and "b" value in your arrays) you should have a VI that scales the "Delta V" and adjusts for temperature.

 

If you have trouble, post the code and someone should be able to give you a hint.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 10 of 11
(6,023 Views)