Differential pressure sensor code using pitot tube (total pressure)

Hello,

To anyone who can help me I will really appreciate.

Right now I'm in the process of desgining and axial compressor and to validate this I need to calculate the total pressure and static pressure using a pitot tube. I'm kind of new with this type of programming so I would really appreciate if anyone can help me.

Can anyone help me with the code ?

My differential pressure is the MPX4250DP.

Link: MPX4250DP Product Information|NXP

Here is the Transfer Function:
Vout = VCC × (P × 0.00369 + 0.04) ± Error
VCC = 5.1 Vdc
Temperature = 0 °C to 85 °C

Nominal transfer value: VOUT = VCC × (P × 0.00369 + 0.04) ± (Pressure Error × Temp. Factor × 0.00369 × VCC)

VCC = 5.1 ± 0.25 Vdc

I'm looking forward to be hearing for anyone who can help.

Thanks,

MPX4250D.pdf (500 KB)

I suggest you start with the analog read example and a variable resistor. (One end to +5, other end to 0 and wiper to the analog in you want to use.

Once you can display the voltage, rearrange your transfer function for P and use that to scale the voltage in.

Once that works, hook up the sensor.

Once you have some code to show, people can help point you in the right direction if you have made mistakes.

Gareth

Hello GarethMoffatt,

I have already done all the programming for my project. I successfully were able to program the pressure sensor (MPX4250DP.) Also, I was able to program on the same code a temperature sensor, a display an a pot for an ESCmotor. As soon as I can I will post my code to see if some improvements can be made.

P.D All the sensors were validated

Thanks,

Cris

can you provide the code for this project?