How does it work?
Altitude 4 Click uses the NovaSensor NPA-201 , a digital output absolute pressure sensor that provides low power consumption and compact size. With a miniature 2.0×2.5×1.0mm HCLGA package, it is ideally suited for portable electronics and space-constrained applications. Low power consumption of 20nA during Sleep Mode is ideal for battery and other low-power applications. A wide operating temperature range from -40°C to +85°C fits well with demanding environmental requirements. Equipped with a MEMS pressure sensor with a signal-conditioning IC, Click Board™ provides accurate measurements from 260 to 1260 mBar. Thanks to ASIC’s inner structure, the measurement results are not only compensated but also temperature corrected and calibrated with an internal sensor. Digital compensation of the signal offset, sensitivity, temperature and non-linearity is accomplished via an 18-bit internal digital signal processor (DSP) running a correction algorithm. Calibration coefficients are stored on-chip in highly reliable, nonvolatile, multiple-time programmable (MTP) memory. The measurement and corrected bridge values provided at the digital output of the chip are routed to Mikrobus I2C reserved pins SCL and SDA.
This device offers the possibility to change the I2C slave address. NPA-201 sensors are supplied with the slave address set to default value. This address is stored within the sensor’s internal EEPROM memory. By modifying the specific bits, the sensor is put into a special programming mode following the instruction sent by the master in order to change the slave address. Before attempting this procedure, users should familiarise themselves with the datasheet provided by the manufacturer. Care must be taken to ensure that only the specified data bits are changed. Writing data to other locations may cause the sensor to become permanently unusable. The address can be changed up to 3 times, after which no further memory changes are possible.
Altitude can be determined based on the measurement of atmospheric pressure. The greater the altitude, the lower the pressure. A pressure altimeter is mostly used in aircraft vehicles but can be also found in skydiver’s wrist-mounted versions for similar purposes. Hikers and mountain climbers use wrist-mounted or hand-held altimeters, in addition to other navigational tools such as a map, magnetic compass, or GPS receiver.
The following calculation expresses the hypsometric equation where P0 is the pressure at sea level, P is the measured pressure, h is elevation or altitude of measured data and T is the measured temperature in Celsius. The calculation for altitude is based on the difference between current atmospheric pressure and pressure at sea level. Every 8.8 meters atmospheric pressure drops by 1mBar. If the altitude is more than 11km high above sea level, the hypsometric formula cannot be applied because the temperature lapse rate (0.0065 °C/m) varies considerably with altitude.
This Click Board™ uses the I2C communication interface and is designed to be operated only with a 3.3V logic level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with different logic levels.
Specifications
Type
Altitude,Pressure
Applications
Pressure sensor for mobile devices, indoor and outdoor navigation, enhancement of GPS navigation, altimeter and barometer for portable devices, weather station equipment, leisure and sports, Hard Disk Drive (HDD), weather forecast.
On-board modules
Altitude 4 Click uses the NPA-201 IC, an absolute pressure sensor with digital output for low-cost applications, from Amphenol Advanced Sensors.
Key Features
Barometric pressure sensing applications for sports activity identification, mobile indoor/outdoor navigation, altitude-hold and stabilization in drones, and other
Interface
I2C
Compatibility
mikroBUS
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Altitude 4 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
Altitude 4 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.4 | 3.3 | 3.63 | V |
Pressure Accuracy | -1 | – | 1 | %FSO |
Full Accuracy Temperature | -30 | 80 | °C | |
Current Consumption |
– – |
35¹ 20 |
– 250² |
µA nA |
Operating Pressure Range | 260 | 1260 | mBar |
Remark:
- Read time = 500ms
- Sleep State, Idle Current, <85 °C
Software Support
We provide a library for the Altitude 4 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library provides functions for communication with device via I2C protocol.
Key functions:
void altitude4_generic_read ( uint8_t reg_adr, uint8_t *rx_buf, uint8_t buf_len )
– Function for reading data from devicevoid altitude4_generic_write ( uint8_t reg_adr, uint8_t *tx_buf, uint8_t buf_len )
– Function for writing data to deviceuint8_t altitude4_read_sensor ( altitude4_sensor_t *sensor_data )
– Function for reading sensor data
Examples description
The application is composed of three sections :
- System Initialization – Initialization of I2C module
- Application Initialization – Maps I2c on Mikrobus 1 and sets device slave address
- Application Task – Logs sensor data every second
void application_task ( ) { altitude4_sensor_t sensor_data; char demo_txt[ 30 ]; altitude4_read_sensor( &sensor_data ); FloatToStr( sensor_data.altitude, demo_txt ); mikrobus_logWrite( " - Altitude: ", _LOG_TEXT ); mikrobus_logWrite( demo_txt, _LOG_TEXT ); mikrobus_logWrite( " m", _LOG_LINE ); FloatToStr( sensor_data.pressure, demo_txt ); mikrobus_logWrite( " - Pressure: ", _LOG_TEXT ); mikrobus_logWrite( demo_txt, _LOG_TEXT ); mikrobus_logWrite( " mBar", _LOG_LINE ); FloatToStr( sensor_data.temperature, demo_txt ); mikrobus_logWrite( " - Temperature: ", _LOG_TEXT ); mikrobus_logWrite( demo_txt, _LOG_TEXT ); mikrobus_logWrite( log_degree, _LOG_LINE ); mikrobus_logWrite( "_________________________________________", _LOG_LINE ); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.