Mpxv7025d understanding the data sheet

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Mpxv7025d understanding the data sheet

跳至解决方案
1,039 次查看
adrianforschner
Contributor I

Mpxv7025d sensor  datasheed, understanding.

i try to work out the formula for the pressuresensor so far I came up whit this based on the data of the attached page form the data sheet :

-------------------[code]-------/

float readPressureKpa(int16_t pin){
float pressureValue ;
float Voltage = (pin * 0.1875)/1000;
pressureValue = Voltage - 2.46;
float pressure=(pressureValue+0.5)/0.018;///0.000018 tranformation from kpa to pa
//float pressure=((pressureValue/1024.0)+0.5)/0.000018;

return pressure;
}

---------------------------/

 Is this code correct ?

i should mention that I attached a ads1115 adc because arduino is a bit to un precise.

then I discovered AN4325SW it has a few examples but I don't understand them:

---------------[code]-----------

//2.4635 is the voltage if nothing happens on the sensor no blowing or sucking.

float Flow = (2.4635 - Voltage)*136/10;
if (Flow > 4700){
Flowfactor = 0;
}else{
Flowfactor = ((4700-Flow)*100/2700);
// Serial.println(Flowfactor);

Flow = Flow + (Flow*Flowfactor)/100; // Instantaneous flow [l/s]
}
Volume = Volume + (Flow/100);

-----------------

where 136 came form is this the area of the mouthpice ?

what is 4700 where dose it come from?

where dose the 2700 come from ?

sorry for the eager long post but I really can't figure out and I'm kinda stuck, any help is appreciated.

im suffereing form the "I can't see the woods cuz of too many trees" syndrome.

Tanks in advanced 

adrian

标签 (1)
1 解答
832 次查看
adrianforschner
Contributor I

Hi Dario,

Well it started out because I was frustrated whit the peak flow meters that I have, the mechanicals ones.

so I thought to build my own, more precise digital one that puts data in my iPhone (building the app for it), and here we are, build a spirometer, it kinda "degenerated".

i found the PDF (that explains the spirometer)with all the formulas and what not.

but  I got stuck, but getting the pressure form the sensor.

once that this is done and I think that I can go on.

so I found the demo code but this confused me more because the data is not explained is just there......

Btw I using arduino as a platform.

i hope I answered your question.

thank you in advanced,

Adrian

在原帖中查看解决方案

0 项奖励
回复
3 回复数
832 次查看
darioarias
NXP Employee
NXP Employee

Hi Adrian,

I contacted the creator of the application note to figure out where does this values are coming from, and he explained me that most of the formulas and fixed values that appear on the code, are product of characterizing the part. Makes sense doing it like this because otherwise they would have to apply  fluid dynamics , static, measure the volume of the pipe, the diameter and some measurements and applied physics.

The method they use was quite simple, they used an insufflation machine. This machine allows you to control, volume, pressure and speed of the air it is expelling. So they adjusted the machine at a big variety of ranges and for each one measure the output voltage. With this information the build a table, where they get the values we discussed previously (4700, 2700, 136, etc.)

Regards,

Dario

0 项奖励
回复
833 次查看
adrianforschner
Contributor I

Hi Dario,

Well it started out because I was frustrated whit the peak flow meters that I have, the mechanicals ones.

so I thought to build my own, more precise digital one that puts data in my iPhone (building the app for it), and here we are, build a spirometer, it kinda "degenerated".

i found the PDF (that explains the spirometer)with all the formulas and what not.

but  I got stuck, but getting the pressure form the sensor.

once that this is done and I think that I can go on.

so I found the demo code but this confused me more because the data is not explained is just there......

Btw I using arduino as a platform.

i hope I answered your question.

thank you in advanced,

Adrian

0 项奖励
回复
832 次查看
darioarias
NXP Employee
NXP Employee

Hi Adrian,

I can see what you are stuck on this issue. There is very little information on the application note, specifically explaining how they got the parameters.

I ended up a bit confuse with your question, are you trying to make your own spirometer? or just to measure the pressure from the sensor?. If you are trying to do your own spirometer there are several others things that you need to implement in order to make it work, and that is well documented and explained in the application note that you mentioned, for instance, using a flow sensor that helps you retrieve the Flow Factor. On the other hand, if you are looking to measure just the pressure, your initial configuration seems to be good

I'd like to know more details about your question, and I look forward to help you up

Regards,

Dario