FAKHREALAM
Jul 17, 2009, 08:04 PM
AlamTech Airspeed sensor MPXV7002DP for $24.99 from The siliconhorizon.com
--------------------------------------------------------------------------------
Airspeed sensor MPXV7002DP
[airspeedbrea] $24.99
http://thesiliconhorizon.com/store
Air speed sensor with 12 bit ADC by Alam Tech
This air speed sensor has a built in 12 bit ADC that uses SPI to give you the data from the Freescale MPXV7002DP air speed sensor..
Specs:
+/- 2 KPa Airspeed sensor from Freescale MPXV7002DP
12 bit SPI ADC from Texas Instruments ADS7886
5 Volt input (3.3 V data compatible pins)
Applications:
UAV / FPV airspeed to over 100 MPH
Process control
Other pressure applications static or dynamic
Upto 1 MSPS ADC
Manual:
http://www.TheSiliconHorizon.com/images/airspeed.pdf
Attached Thumbnails Airspeed sensor MPXV7002DP $24.99 from thesiliconhorizon.com with 12 bit serial SAR ADC.
Hi
I just wrote formula for air speed calculation, its all in c. Its for free, use it and let me know, here is the code. U can use this with pic32. Its all working, need some cleanup.
#ifndef __AIRSPEEDCAL__
#include "airspeedcal.h"
#endif
#endif
float rv;
rv = calculate_air_speed_value_knots (0.0001, AIR_SPEED_IN_KNOTS);
rv = calculate_air_speed_value_knots (0.0001, AIR_SPEED_IN_MPH);
rv = calculate_air_speed_value_knots (0.0001, AIR_SPEED_IN_KMH);
#ifndef __AIRSPEEDCAL__
#include "airspeedcal.h"
#endif
#include <math.h>
#define DEFAULT_AIR_SPEED_IN_KNOTS 437555.79
#define DEFAULT_AIR_PRESSURE_AT_SEA_LEVEL_IN_KNOTS 1013.25
#define POWER_VAULE 0.285714286
#define KPA_TO_HPA_MULTIPLIER 10
#define KNOTS_CONVERT_IN_MPH 1.15077945
#define KNOTS_CONVERT_IN_KMH 1.852
static float cal_air_speed_in_knots (float pressure_in_kpa)
{
float air_speed;
double power_value;
double new_value;
power_value = pow((((pressure_in_kpa * KPA_TO_HPA_MULTIPLIER)/DEFAULT_AIR_PRESSURE_AT_SEA_LEVEL_IN_KNOTS) + 1), POWER_VAULE);
air_speed = DEFAULT_AIR_SPEED_IN_KNOTS * 5 * (power_value - 1);
power_value = sqrt(air_speed);
return power_value;
}
/* function calculate speed in knots/mph/kmh */
float calculate_air_speed_value_knots (float impact_pressure, Air_Speed_Unit pressure_unit)
{
float rv = 0;
switch (pressure_unit)
{
case AIR_SPEED_IN_KNOTS:
rv = cal_air_speed_in_knots(impact_pressure);
break;
case AIR_SPEED_IN_MPH:
rv = cal_air_speed_in_knots(impact_pressure);
rv = rv * KNOTS_CONVERT_IN_MPH;
break;
case AIR_SPEED_IN_KMH:
rv = cal_air_speed_in_knots(impact_pressure);
rv = rv * KNOTS_CONVERT_IN_KMH;
break;
case AIR_SPEED_DEFAULT:
default:
rv = cal_air_speed_in_knots(impact_pressure);
break;
}
return rv;
}
#ifndef __AIRSPEEDCAL__
#define __AIRSPEEDCAL__
typedef enum
{
AIR_SPEED_IN_KNOTS = 0,
AIR_SPEED_IN_MPH = AIR_SPEED_IN_KNOTS + 1,
AIR_SPEED_IN_KMH = AIR_SPEED_IN_MPH + 1,
AIR_SPEED_DEFAULT = AIR_SPEED_IN_KMH + 1,
} Air_Speed_Unit;
float calculate_air_speed_value_knots (float impact_pressure, Air_Speed_Unit pressure_unit);
#endif
Thanks.
Fakhre Alam
--------------------------------------------------------------------------------
Airspeed sensor MPXV7002DP
[airspeedbrea] $24.99
http://thesiliconhorizon.com/store
Air speed sensor with 12 bit ADC by Alam Tech
This air speed sensor has a built in 12 bit ADC that uses SPI to give you the data from the Freescale MPXV7002DP air speed sensor..
Specs:
+/- 2 KPa Airspeed sensor from Freescale MPXV7002DP
12 bit SPI ADC from Texas Instruments ADS7886
5 Volt input (3.3 V data compatible pins)
Applications:
UAV / FPV airspeed to over 100 MPH
Process control
Other pressure applications static or dynamic
Upto 1 MSPS ADC
Manual:
http://www.TheSiliconHorizon.com/images/airspeed.pdf
Attached Thumbnails Airspeed sensor MPXV7002DP $24.99 from thesiliconhorizon.com with 12 bit serial SAR ADC.
Hi
I just wrote formula for air speed calculation, its all in c. Its for free, use it and let me know, here is the code. U can use this with pic32. Its all working, need some cleanup.
#ifndef __AIRSPEEDCAL__
#include "airspeedcal.h"
#endif
#endif
float rv;
rv = calculate_air_speed_value_knots (0.0001, AIR_SPEED_IN_KNOTS);
rv = calculate_air_speed_value_knots (0.0001, AIR_SPEED_IN_MPH);
rv = calculate_air_speed_value_knots (0.0001, AIR_SPEED_IN_KMH);
#ifndef __AIRSPEEDCAL__
#include "airspeedcal.h"
#endif
#include <math.h>
#define DEFAULT_AIR_SPEED_IN_KNOTS 437555.79
#define DEFAULT_AIR_PRESSURE_AT_SEA_LEVEL_IN_KNOTS 1013.25
#define POWER_VAULE 0.285714286
#define KPA_TO_HPA_MULTIPLIER 10
#define KNOTS_CONVERT_IN_MPH 1.15077945
#define KNOTS_CONVERT_IN_KMH 1.852
static float cal_air_speed_in_knots (float pressure_in_kpa)
{
float air_speed;
double power_value;
double new_value;
power_value = pow((((pressure_in_kpa * KPA_TO_HPA_MULTIPLIER)/DEFAULT_AIR_PRESSURE_AT_SEA_LEVEL_IN_KNOTS) + 1), POWER_VAULE);
air_speed = DEFAULT_AIR_SPEED_IN_KNOTS * 5 * (power_value - 1);
power_value = sqrt(air_speed);
return power_value;
}
/* function calculate speed in knots/mph/kmh */
float calculate_air_speed_value_knots (float impact_pressure, Air_Speed_Unit pressure_unit)
{
float rv = 0;
switch (pressure_unit)
{
case AIR_SPEED_IN_KNOTS:
rv = cal_air_speed_in_knots(impact_pressure);
break;
case AIR_SPEED_IN_MPH:
rv = cal_air_speed_in_knots(impact_pressure);
rv = rv * KNOTS_CONVERT_IN_MPH;
break;
case AIR_SPEED_IN_KMH:
rv = cal_air_speed_in_knots(impact_pressure);
rv = rv * KNOTS_CONVERT_IN_KMH;
break;
case AIR_SPEED_DEFAULT:
default:
rv = cal_air_speed_in_knots(impact_pressure);
break;
}
return rv;
}
#ifndef __AIRSPEEDCAL__
#define __AIRSPEEDCAL__
typedef enum
{
AIR_SPEED_IN_KNOTS = 0,
AIR_SPEED_IN_MPH = AIR_SPEED_IN_KNOTS + 1,
AIR_SPEED_IN_KMH = AIR_SPEED_IN_MPH + 1,
AIR_SPEED_DEFAULT = AIR_SPEED_IN_KMH + 1,
} Air_Speed_Unit;
float calculate_air_speed_value_knots (float impact_pressure, Air_Speed_Unit pressure_unit);
#endif
Thanks.
Fakhre Alam