Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Building a pressure reader

Status
Not open for further replies.

Vlady

New Member
I am new to this forum.
I am currently working on a project that will be able to measure an outside pressure. Using Setra 270 Transducer that has a range of 800-1150HPA. Output voltage is 0-5vdc depending on pressure. This is a very accurate pressure reader as some of you might be familiar with.
Easy part is just having an A/D converter and have it displayed. But this sensor is not as linear as would like it to be. It has reference points. Just so you may have an idea here is example of it.
HPA Vdc(output)
800hPa -0.004Vdc
820hPa 0.2857Vdc
850hPa 0.7151Vdc
870hPa 1.0009Vdc
900hPa 1.4294Vdc
920hPa 1.7152Vdc
950hPa 2.1436Vdc
And so on……
So my question is what kind of circuit you would recommend as far as type of A/D converter that would be accurate to the 4th digit, Programmable microcontrollers and interface. The second part of my question is software. Is there any microcontrollers that can be programmed to take into account reference points? My weakness is programming.
I hope this makes some since….
Any help would be greatly appreciated
Thanks

Vlad
:?:
 
There are essentially two ways to do it in software, one is to implement a mathematical function that makes the readings linear - the other is to use a lookup table to correct the readings.
 
pressure reading

It is not an option of making it more linear as this will decrease the accuracy, and the point is to have this extremely accurate… But please fill me in on the lookup table what, and how? Is it possible with programmable micro controllers and if yes which one?
Thanks
 
According to the datasheet, it has the following specifications:

Accuracy* <±0.05% FS
Non-Linearity
End Point ±0.05% FS
Best Fit Straight Line ±0.03% FS
Hysteresis 0.01% FS
Non-Repeatability 0.01% FS


Are you trying to improve on this?
 
Improving then what is spec is not practical since it is not guaranteed. So to answer your question no, but I would like to make it as accurate as possible. So even so making it linear should not produce too great of an error I would like to stay away from the linear approach as much as possible. Only time I would consider linear approach is if other approaches are just too much programming and circuit is too big.
 
Vlady said:
Improving then what is spec is not practical since it is not guaranteed. So to answer your question no, but I would like to make it as accurate as possible. So even so making it linear should not produce too great of an error I would like to stay away from the linear approach as much as possible. Only time I would consider linear approach is if other approaches are just too much programming and circuit is too big.
Are you saying you don't think these specifications are guaranteed?
 
No that is not what I am saying. All I mean is in reply to your last post, that is I am not trying it to make it work better then spec. As far as a manufactured guarantee it is true to the last word. This is a very respectful company with great reputation on there product and it is used on just about anything that measure press/vac etc.
But anyways we are trailing away from the project…
All I want to know is not the specs of the unit or how it works but, what kind of circuit and program would be recommended for what I have described in my first post.
Prefer non linear option as what the Nigel Goodwin has posted “the other is to use a lookup table to correct the readings” I hope he can fill in more detail about this option and how to approach it.
Thank you,
 
No that is not what I am saying. All I mean is in reply to your last post, that is I am not trying it to make it work better then spec. As far as a manufactured guarantee it is true to the last word. This is a very respectful company with great reputation on there product and it is used on just about anything that measure press/vac etc.
But anyways we are trailing away from the project…
All I want to know is not the specs of the unit or how it works but, what kind of circuit and program would be recommended for what I have described in my first post.
Prefer non linear option as what the Nigel Goodwin has posted “the other is to use a lookup table to correct the readings” I hope he can fill in more detail about this option and how to approach it.
Thank you,
 
Vlady said:
Prefer non linear option as what the Nigel Goodwin has posted “the other is to use a lookup table to correct the readings” I hope he can fill in more detail about this option and how to approach it.

From what RonH has quoted from the datasheet it appears to be extremely linear already?, so there doesn't seem to be anything to correct?.

A lookup table is VERY simple, it's simply an array of data that you use the sensor reading to index into.

Assuming you use an 8 bit A2D to read the sensor, you can get a reading between 0 and 255, and this might, or might not, be linear. So instead of using the value directly, you use it as an index to a array of data that contains the correct value for every one of the 256 possible readings.
 
To take advantage of the inherent linearity, he really needs at least 12 bits, just to get .05% resolution (well, technically, 11 bits, but have you ever seen an 11 bit A/D?). It seems to me that to improve significantly on the linearity, he would need around 16 bits. That's gonna require a pretty big LUT. And how do you calibrate it? Does anyone make a more accurate sensor, or an adjustable pressure reference?
 
Ron H said:
To take advantage of the inherent linearity, he really needs at least 12 bits, just to get .05% resolution (well, technically, 11 bits, but have you ever seen an 11 bit A/D?). It seems to me that to improve significantly on the linearity, he would need around 16 bits. That's gonna require a pretty big LUT. And how do you calibrate it? Does anyone make a more accurate sensor, or an adjustable pressure reference?

I agree, but a 12 bit A2D probably isn't going to be as linear as the sensor anyway?.

I think really he needs to explain why he thinks it's non-linear?, I suspect he may be misunderstanding the datasheet - assuming you've read it correctly of course? :lol:
 
Nigel Goodwin said:
I agree, but a 12 bit A2D probably isn't going to be as linear as the sensor anyway?.
I'm sure you're correct. That's the reason I mentioned 16 bits. Then if you have to have a full LUT, it will require (2*2^16) 128k bytes. :!: I sure would hate to have to enter that by hand!
 
OK this needs to be clarified more… Ron H did post correct data for it. This is what I would like to do.
HPA Vdc(output)
800hPa -0.004Vdc
820hPa 0.2857Vdc
850hPa 0.7151Vdc
870hPa 1.0009Vdc
900hPa 1.4294Vdc
920hPa 1.7152Vdc
950hPa 2.1436Vdc
Example:
Lets say it is reading current voltage of 0.14285Vdc so what I want it do is give me a read out based on looking only at 800 to 820hPa instead of the hole range of 800 to 1150hPa. So when it gets the voltage reading of 0.4932 it will give me corresponding readout based on looking only from 820 to 850hPa and so on… Does this make much since??
 
Now I'm really confused. I don't know what you are trying to do. And where did you get this table of data?
800hPa -0.004Vdc
820hPa 0.2857Vdc
850hPa 0.7151Vdc
870hPa 1.0009Vdc
900hPa 1.4294Vdc
920hPa 1.7152Vdc
950hPa 2.1436Vdc
 
This data table is provided with the sensor from the manufacturer when you purchase it.
 
Having played around with the data using MS Excel, there are some large errors there which are a lot worse than would be expected from the specification of the pressure transmitter.
How good was the calibration equipment you used to produce these data?

Edit Vlady gave the answer to this as I was typing.

If you are sure that you want to use this data, I can suggest two possible solutions, but if you are not good at software, you will not like either of them!

Both methods involve using an ADC to read the data into a microprocessor. It will have to be a 14/16 bit device (as suggested by RonH) to get the accuracy/resolution you require.

Method 1
Produce a linear equation (y=mx+c) for the data between each pair of calibration points. You will have six equations for your seven data point pairs.
Write the software, which will:
Read the ADC
Compare the voltage with the calibration points
Calculate the pressure using the appropriate equation
Display the pressure.

Method 2
Produce a polynomial equation which fits the data.
Write the software, which will:
Read the ADC
Calculate the pressure using the equation
Display the pressure.

To find a suitable equation for your data, have a look here:
https://www.xuru.org/rt/TOC.asp
There are some online calculators which will do it for you.

JimB
 
When manufacturer calibrates this they calibrate it to this pressure setting and the voltage readings at that pressure. Never mind this all I need to know how to program it so it will do:
“HPA Vdc(output)
800hPa -0.004Vdc
820hPa 0.2857Vdc
850hPa 0.7151Vdc
870hPa 1.0009Vdc
900hPa 1.4294Vdc
920hPa 1.7152Vdc
950hPa 2.1436Vdc
Example:
Lets say it is reading current voltage of 0.14285Vdc so what I want it do is give me a read out based on looking only at 800 to 820hPa instead of the hole range of 800 to 1150hPa. So when it gets the voltage reading of 0.4932 it will give me corresponding readout based on looking only from 820 to 850hPa and so on”

Does this makes much since??
 
Vlady said:
Does this makes much since??

Yes, I got the idea, this is almost a 1 to 1 interactive session!

JimB

Vlady, your English is very good, but he word is "sense", not "since".
 
Thanks Jim. Now we are getting somewhere you seem to understand what exactly I am saying….
I am going to look the websites that you have recommended and proceed from there. Software programming is something that is not me but I am willing to learn no matter how difficult it may be…. So if you don’t mind you seem to know programming I might need a hand on the programming part…

but he word is "sense", not "since

Thanks on my English and pardon my typo. I think you meant to say “the” not “he”
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top