MPXV5004DP Sensor

Hi Guys,

I'm looking to use a MPXV5004DP sensor connected through a PIC to do certain things based on airspeed, in terms of the PIC and the ADC etc internally I kinda know what I'm doing, however, what I'm stumped on is the math used to get the airspeed from a ratiometric voltage, :-(

Obviously I have got it to work on my Ardupilot, however this was through the ArduPilot board, and to be honest I belive the credit goes to Jordi and Chris for this side as there was not much for me to do, :-)

Issue I have now is that I am able to stabilise the AN reading on the PIC (+-220 as a stationary reading from a 10 bit ADC on 3.00V), I have been able to translate this 0.6V which is what the datasheet shows as the stationary voltage. My question is, is anyone able to share the math on how to take this voltage output and translate it into a speed?

If it helps, the calcuation I have gotten to, although not giving the correct reading is:

[code]
'VelocityKPH = (AN_In-220)*36666 '220 used as a fixed offset for now)
'VelocityKPH = (AN_In)*36667
'velocitykph = div32 10
'VelocityKPH = SQR VelocityKPH
'VelocityKPH = VelocityKPH / 18
[/code]

I dont mind the syntax as I should be able to translate it back to the PIC's language, :-)


Many thanks to everyone for a great forum.

Kind Regards
Robert


You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Activity

Jose Araujo liked Jose Araujo's profile
Aug 29
spencer harvey liked spencer harvey's profile
Jul 9
More…