MIKROE-2387

Diff pressure click
Diff pressure click
IC/Module MPXV5010DP
(http://www.nxp.com/files/sensors/doc/data_sheet/MPX5010.pdf)
Interface SPI
Power
supply
3.3V, 5V
Website www.mikroe.com/click/diff-pressure
(http://www.mikroe.com/click/diff-pressure)
Schematic also available in PDF (http://cdn-
docs.mikroe.com/images/0/0d/Diff_pressure_click_s
c
1
2
3
4
5
6
7
8
9
1
0
1
1
1
2
1
3
1
4
1
5
1
6
1
7
1
8
1
9
2
0
2
1
2
2
2
3
2
4
2
5
2
6
2
7
2
8
2
9
3
0
3
1
3
2
3
3
3
4
3
5
3
6
3
7
3
8
3
9
4
0
4
1
4
2
4
3
4
4
4
5
4
6
4
7
4
8
Diff pressure click
From MikroElektonika Documentation
Diff pressure is a mikroBUS™ add-on board carrying an NXP MPXV5010DP signal
conditioned, temperature compensated and calibrated pressure sensor with two axial
ports to accommodate industrial grade tubing. It is designed for comparing two
pressure measurements.
Features and usage notes
The two ports on Diff pressure
click are designated as Pressure
side (P1) and Vacuum side (P2).
The sensor is designed to operate
with a positive differential pressure
where P1 > P2.
The P1 and P2 ports are not marked
on the sensor itself, but according
to the vendor’s data sheet, P1 is on
the side of part markings. In the
case of Diff pressure click, that’s
the top half of the sensor.
The measurement range is from 0
to 10 kPa. In the temperature range between 0º and 85ºC, the sensor has a maximum
error rate of 5.0%.
MPXV5010DP IC has an analog output. The signal passes through the onboard 22-bit
ADC before being outputted through the mikroBUS™ SPI interface (CS, SCK, MISO).
Diff pressure click is designed to use either a 3.3V or a 5V power supply. It’s 3.3V by
default. To change it to 5V, resolder the onboard jumpers (zero Ohm resistors)
Programming
The following code snippet initializes SPI, UART and the Diff Pressure click and reads the difference between the two pressures to the UART terminal.
void main()
{
//Local Declarations
int32_t buffer =0;
char uart_text[20] = { 0 };
float difference =0;
status_t status;
//GPIOs
GPIO_Digital_Input( &GPIO_PORT_24_31, _GPIO_PINMASK_6 );
GPIO_Digital_Output( &GPIO_PORT_24_31, _GPIO_PINMASK_4 );
//UART
UART1_Init( 9600 );
Delay_ms(200);
UART1_Write_Text( "UART Initialized\r\n" );
// SPI
SPIM1_Init_Advanced( _SPI_MASTER_CLK_RATIO_4, _SPI_CFG_PHASE_CAPTURE_RISING |
_SPI_CFG_POLARITY_IDLE_LOW | _SPI_CFG_SS_AUTO_DISABLE |
_SPI_CFG_FIFO_DISABLE, _SPI_SS_LINE_NONE );
Delay_ms(200);
UART1_Write_Text( "SPI Initialized\r\n" );
//Diff Pressure Click
diff_pressure_init();
UART1_Write_Text( "Diff Pressure Click Initialized\r\n" );
while (1)
{
status = diff_pressure_read_adc( &buffer ); //Read ADC
if ( status == OK )
{
//Get Pressure Difference
difference = diff_pressure_get_kpa_difference( buffer );
//Write it out
UART1_Write_Text( "KPA Difference: " );
FloatToStr( difference, uart_text );
UART1_Write_Text( uart_text );
UART1_Write_Text( "\r\n" );
buffer =0;
}
else if ( status == OVH ) //Overflow High
UART1_Write_Text(
"Overflow happened\r\n" );
else
if ( status == OVL ) //Overflow Low
UART1_Write_Text( "Underflow happened\r\n" );
else //Data wasn't ready
UART1_Write_Text( "Not Ready\r\n" );
Page 1 of 2
4
9
5
0
5
1
5
2
}
}
Code examples that demonstrate the usage of Diff press click with MikroElektronika hardware, written for mikroC for ARM, AVR, dsPIC, PIC and PIC32 are
available on Libstock (http://libstock.mikroe.com/projects/view/1901/diff-pressure-click).
Resources
- Diff pressure click example on Libstock (http://libstock.mikroe.com/projects/view/1901/diff-pressure-click)
- Vendor’s data sheet (http://www.nxp.com/files/sensors/doc/data_sheet/MPX5010.pdf)
- MCP3551 ADC data sheet (http://ww1.microchip.com/downloads/en/devicedoc/21950b.pdf)
- mikroBUS™ standard specifications (http://download.mikroe.com/documents/standards/mikrobus/mikrobus-standard-specification-v200.pdf)
Page 2 of 2
9
/
15
/
201
6
http://docs.mikroe.com/Diff_pressure_clic
k

MIKROE-2387

Mfr. #:
Manufacturer:
Mikroe
Description:
Pressure Sensor Development Tools Diff pressure click
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet