Sensors Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sensors Knowledge Base

Discussions

Sort by:
Hi, The MPL3115A2, provides highly accurate pressure and altitude data with variable sampling rate capability. It has very low-power consumption, smart features and requires zero data processing, it is ideal for mobile devices, medical and security applications. Here is a Render of the MPL3115A2 Breakout- Board downloaded from OSH Park: And here is an image of the Layout Design for this board: In the Attachments section, you can find the Schematic Source File (.SCH), Schematic PDF File, Layout Source File (BRD), Gerber Files (GTL, GBL, GTS, GBS, GTO, GBO, GKO, XLN) and BOM for this Breakout-board. If you are interested in more designs like this breakout board for other sensors, please go to Freescale Sensors Breakout Boards Designs – HOME
View full article
Our pressure sensors are designed to be used with clean, dry air only. However, most of our customers ran their own tests to determine if the response of the sensor would be appropriated for their specific applications. I personally ran a test with an MPXV5700AP directly exposed to car coolant @25°C and 100PSI, zero failure was detected for almost a month. See attached .xlsx for detailed information. The error of the sensor was calculated comparing the output of the sensor with a mechanical manometer, however this was only an approximation since the mechanical manometer was used as the "true pressure value". In this kind of applications, we would recommend to use Parker O-lube silicone grease or DMS-T46 or T51. This type of grease is used by most of our customer without problems. In fact the basic recommendations are to use a silicone oil (or preferably grease) with high viscosity and high molecular weight. In this case the size of the molecules are big enough to limit the penetration of the grease inside our protective silicone gel which is over the die. In terms of contaminants, the silicon grease must be free of halogenures (Cl content < 50 ppm) to reduce the risk of bond pad corrosion. On the other hand, don't forget that whatever the material you will use, as soon as you put something on our gel you have a high probability to see some offset drift. This is coming from additional mechanical stress and/or gel swelling. The amount of gel and global mechanical design are usually also part of the offset drift.
View full article
My friend Matt Muddiman of Freescale gave this presentation as part of the MEMS Education Series (hosted by Arizona Technology Council and MEMS Industry Group) in Scottsdale Arizona earlier this week.
View full article
This time, I would like to share with you an example project using the MPL115A1, the NXP digital barometer.   The MPL115A1 is a simple barometer with digital output for cost-effective applications. It employs a MEMS pressure sensor with a conditioning integrated circuit to provide accurate pressure data. An integrated analog-to-digital converter (ADC) provides digitized temperature and pressure sensor outputs via serial peripheral interface (SPI), with bus speeds up to 8 Mbps.   You may find more information at: MPL115A: 50 to 115kPa, Absolute Digital Pressure Sensor.   I created this project using the FRDM-KL25Z platform and the MPL115A1 absolute digital pressure sensor. The complete source code is written in KDS IDE. You may find the complete project attached to this post.   This document gives you an introduction of the MPL115A1 pressure sensor as well as the different configurations and guides you through the initialization process and how to appreciate the demonstration.   Introduction to the example project This example is based on the application note AN3785 -How to Implement the Freescale MPL115A Digital Barometer. I recommend using it as a reference.   Through this example project, the MCU is configured to use the SPI interface and the PIT module. The local pressure is read every second.   There are MPL115A1 SPI commands to read coefficients, execute Pressure and Temperature conversions, and to read Pressure and Temperature data. The sequence of the commands for the interaction is given as an example to operate the MPL115A1. Initialization of the MKL25Z128 MCU.   Sequence flow chart. The MPL115A1 interfaces to a host (or system) microcontroller in the user’s application. All communications are via SPI. A typical usage sequence is as follows: Every stage of the flow chart is applied on this example and explained below.   Reading coefficient data These are MPL115A2 SPI commands to read coefficients. The coefficients are usually stored in the host microcontoller local memory but can be re-read at any time.   Reading of the coefficients may be executed only once and the values stored in the host microcontroller. It is not necessary to read this multiple times because the coefficients within a device are constant and do not change.   Read Coefficients: [CS=0], [0x88], [0x00], [0x8A], [0x00], [0x8C], [0x00], [0x8E], [0x00], [0x90], [0x00], [0x92], [0x00], [0x94], [0x00], [0x96], [0x00], [0x00], [CS=1] Once the coefficients are obtained, they are computed inside the MPL115A1_Read_Preassure function.     Data conversion This is the MPL115A2 SPI commands to start conversion.   This is the first step that is performed each time a new pressure reading is required which is initiated by the host sending the CONVERT command. The main system circuits are activated (wake) in response to the command and after the conversion completes, the result is placed into the Pressure and Temperature ADC output registers.   Start conversion: [CS=0], [0x24], [0x00], [CS=1], [13 ms Delay]     This is the MPL115A2 SPI commands to read raw temperature and pressure data.     Start Read raw data: [CS=0], [0x80], [0x00], [0x82], [0x00], [0x84], [0x00,] [0x86], [0x00], [0x00], [CS=1]   Compensated pressure reading Once the raw rata is obtained, the compensation procedure is applied as follow:     Local pressure   Once the steps mentioned above are followed, the MPL115A1_Read_Preassure function returns the local pressure value into the local_pressure variable. I recommend evaluating this variable in order to know the final result.     I hope you find the information useful and funny.   Regards, David  
View full article
Hi Everyone,   If you are interested in a simple bare metal example code illustrating the use of the accelerometer motion detection function, please find below one of my examples I created for the FXLS8471Q accelerometer while working with the NXP FRDM-KL25Z platform and FRDMSTBC-A8471 board.   The FXLS8471Q is set to detect motion exceeding 315mg for a minimum period of 40 ms on either the X or Y axis. Once an event is triggered, an interrupt will be generated on the INT1 pin:   void FXLS8471Q_Init (void) { FXLS8471Q_WriteRegister(FT_MT_THS_REG, 0x85); // Set threshold to 312.5mg (5 x 62.5mg ) FXLS8471Q_WriteRegister(FF_MT_COUNT_REG, 0x02); // Set debounce timer period to 40ms FXLS8471Q_WriteRegister(FF_MT_CFG_REG, 0xD8); // Latch enabled, motion detection enabled for X and Y axis FXLS8471Q_WriteRegister(CTRL_REG4, 0x04); // Motion interrupt enabled FXLS8471Q_WriteRegister(CTRL_REG5, 0x04); // Route motion interrupt to INT1 - PTD4 FXLS8471Q_WriteRegister(CTRL_REG1, 0x29); // ODR = 12.5Hz, Active mode }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍     In the ISR, only the interrupt flag is cleared and the FF_MT_SRC (0x16) register is read in order to clear the SRC_FFMT flag in the INT_SOURCE register and deassert the INT1 pin, as shown on the screenshot below.   void PORTD_IRQHandler() { PORTD_PCR4 |= PORT_PCR_ISF_MASK; // Clear the interrupt flag IntSource = FXLS8471Q_ReadRegister(FF_MT_SRC_REG); // Read the FF_MT_SRC register to clear the SRC_FFMT flag in the INT_SOURCE register EventCounter++; }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍       Attached you can find the complete source code. If there are any questions regarding this simple example code, please feel free to ask below.    Regards, Tomas
View full article
Hi Everyone, This tutorial is a detailed guide on how to import an ISSDK based example project (e.g. mma845x_interrupt) into MCUXpresso IDE, build and run it on the Freedom board (e.g. FRDM-KL27Z). If you intend to use another ISSDK example project/board, you can always follow this guide. A complete list of MCU boards, sensor kits and sensors supported by ISSDK is available in the ISSDK Release notes. 1. Download the FRDM-KL27Z SDK Open a web browser, navigate to the MCUXpresso homepage and select “Login to view configurations” to start a new configuration. You will be redirected to login to nxp.com. Enter your account information or register for a new account. Back on the MCUXpresso homepage, select the drop-down box to create a New Configuration. Select the board (FRDM-KL27Z) from the list and provide a name for the configuration. Select “Specify Additional Configuration Settings” to choose the Host OS, Toolchain (MCUXpresso IDE) and Middleware (ISSDK). Select Configuration Settings: Host OS (example: Windows) Toolchain/IDE (MCUXpresso IDE) Middleware (ISSDK) Once the configurations are set, select “Go to SDK Builder”.   Select “Request Build” to download the SDK. Once the build request is completed, download the SDK. Agree to Software Terms and Conditions. Unzip SDK to a folder (e.g. SDK_2.2.1_FRDM-KL27Z). 2. Import the SDK_2.1.1_FRDM-KL27Z into MCUXpresso IDE Open MCUXpresso IDE. Set the workspace directory of your choice and click on OK. Switch to the Installed SDKs view within the MCUXpresso IDE window. Open Windows Explorer, and drag and drop the SDK_2.2.1_FRDM-KL27Z (unzipped) file into the installed SDKs view. You will get the following pop-up so click on OK to continue the import.   The installed SDK will appear in the Installed SDKs view. 3. Import and build the ISSDK based mma845x_interrupt example project Find the Quickstart Panel in the lower left hand corner and select Import SDK example(s) Click on the FRDM-KL27Z board and then click on Next. Use the arrow button to expand the issdk_examples category, and then click the checkbox next to mma845x_interrupt to select that project. Then, click on Next. On the next screen, click the checkbox to Redirect printf/scanf to UART so that the terminal output gets sent out the UART instead of using semi-hosting through the debugger. Then click on Finish. Now build the project by clicking on the project name in the Project Explorer view and then click on the Build icon in the Quickstart Panel. You can see the status of the build in the Console view. 4. Run the mma845x_interrupt example project   Now that the project has been compiled, we can flash it to the board and run it. Make sure the FRDM-KL27Z board is plugged in, and click on Debug ‘frdmkl27z_issdk_examples_sensors_mma8451q_mma845x_interrupt’ [Debug] MCUXpresso will probe for connected boards and should find the OpenSDA debug probe that is part of the integrated OpenSDA circuit on the FRDM-KL27Z board. Click on OK to continue. The firmware will be downloaded to the board and the debugger started. Open a Terminal program (e.g. Tera Term) and connect to the FRDM-KL27Z COM port that it enumerated as. Use 115200 baud, 8 data, 1 stop, no parity. Start the application in the MCUXpresso IDE by clicking the "Resume" button. The application is now running and signed 14-bit accelerometer output values are displayed on the terminal. To modify the initial register settings of the MMA8451 accelerometer, find the mma845x_Config_Isr[] structure and change it according to your needs. Well done if you managed to follow along and get it all working. If there are any questions, do not hesitate to ask below. Your feedback or suggestions are also welcome. Regards, Tomas
View full article
Hello community, As continuation of the Different pin styles in pressure sensors post, I would like to add some useful information about the pin styles mentioned on the datasheets. Some pressure sensors shows the following pin style configuration: But… What do V1, V2 and VEx actually mean? How should I connect those pins? Answer: V1, V2 and VEX pins are used for factory trimming and it is recommended to leave these pins unconnected. So, in case of unibody package, you will require only pin #1 (Vout), pin #2 (Ground), and pin #3 (Vs) as follow: I hope you find useful this information. Regards, David
View full article
************************************************************************************************************* * This simple example code has been written for the NXP FRDM-KL25Z + FRDMSTBC-A8471 * boards and demonstrates how to use the embedded transient detection function * in conjunction with the auto-wake/sleep mode for reducing current consumption * of the FXLS8471Q. * * The transient threshold is set to 312.5mg (5 counts) on the X and Y axis. * Once this threshold is exceeded, the FXLS8471Q is waken up and an interrupt * is generated on the INT1 pin. If the acceleration is below this threshold * within the 1s period, the FXLS8471Q goes back to sleep mode and also * generates an interrupt on the INT1 pin. *************************************************************************************************************
View full article
Presented at Sensors Expo, 25 June 2014
View full article
Hi, The FXAS2100x, is a small, low-power, yaw, pitch, and roll angular rate gyroscope with 16 bit ADC resolution. The full-scale range is adjustable from ±250°/s to ±2000°/s. It features both I2C and SPI interfaces. Here is a Render of the FXAS2100x Breakout- Board downloaded from OSH Park: Layout Design for this board: In the Attachments section, you can find the Schematic Source File (SCH), Schematic PDF File, Layout Source File (BRD), Gerber Files (GTL, GBL, GTS, GBS, GTO, GBO, GKO, XLN) and BOM files. If you're interested in more designs like this breakout board for other sensors, please go to Freescale Sensors Breakout Boards Designs – HOME
View full article
Hi Everyone, I would like to share here one of my examples I created for the MPL3115A2 while working with the NXP FRDM-KL25Z platform and FRDMSTBC-P3115 shield board. It illustrates the use of the embedded FIFO buffer to collect either pressure/temperature or altitude/temperature data that are read from the FIFO using an interrupt technique through the I2C interface. The FIFO is set to store the maximum number of samples (32). Each sample consists of 3 bytes of pressure (or altitude) data and 2 bytes of temperature data. Therefore 160 bytes (32 x (3 + 2)) in total are read from the FIFO when the FIFO is full and the FIFO interrupt is asserted. The MPL3115A2 is initialized as follows. /****************************************************************************** * MPL3115A2 initialization function ****************************************************************************** void MPL3115A2_Init (void) { I2C_WriteRegister(MPL3115A2_I2C_ADDRESS, CTRL_REG1, 0x04); // Reset all registers to POR values Pause(0x631); // ~1ms delay I2C_WriteRegister(MPL3115A2_I2C_ADDRESS, F_SETUP_REG, 0xA0); // FIFO Fill mode, 32 samples I2C_WriteRegister(MPL3115A2_I2C_ADDRESS, CTRL_REG4, 0x40); // Enable FIFO interrupt I2C_WriteRegister(MPL3115A2_I2C_ADDRESS, CTRL_REG5, 0x40); // Route the FIFO interrupt to INT1 - PTA5 I2C_WriteRegister(MPL3115A2_I2C_ADDRESS, CTRL_REG2, 0x00); // Time step = ~1s I2C_WriteRegister(MPL3115A2_I2C_ADDRESS, CTRL_REG3, 0x00); // Push-pull, active low interrupt I2C_WriteRegister(MPL3115A2_I2C_ADDRESS, CTRL_REG1, 0x39); // Active barometer mode, OSR = 128 //I2C_WriteRegister(MPL3115A2_I2C_ADDRESS, CTRL_REG1, 0xB9); // Active altimeter mode, OSR = 128 }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In the ISR, only the interrupt flag is cleared and the FIFO_DataReady variable is set to indicate that the FIFO is full. /****************************************************************************** * PORT A Interrupt handler ******************************************************************************/ void PORTA_IRQHandler() { PORTA_PCR5 |= PORT_PCR_ISF_MASK; FIFO_DataReady = 1; }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Once the FIFO_DataReady variable is set, the STATUS register (0x00) is read to clear the FIFO interrupt status bit and deassert the INT1 pin. Afterwars the FIFO is read using a 160-byte (5 x 32 bytes) burst read starting from the OUT_P_MSB register (0x01). Then the raw pressure (or altitude) and temperature data are converted to real values. if (FIFO_DataReady) { FIFO_DataReady = 0; FIFO_Status = I2C_ReadRegister(MPL3115A2_I2C_ADDRESS, STATUS_REG); // Read the Status register to clear the FIFO interrupt status bit I2C_ReadMultiRegisters(MPL3115A2_I2C_ADDRESS, OUT_P_MSB_REG, 5*Watermark_Val, RawData); // Read the FIFO using a burst read for (i = 0; i < Watermark_Val; i++) { /* Get pressure, the 20-bit measurement in Pascals is comprised of an unsigned integer component and a fractional component. The unsigned 18-bit integer component is located in OUT_P_MSB, OUT_P_CSB and bits 7-6 of OUT_P_LSB. The fractional component is located in bits 5-4 of OUT_P_LSB. Bits 3-0 of OUT_P_LSB are not used. */ Pressure[i] = (float) (((RawData[0 + i*5] << 16) | (RawData[1 + i*5] << 8) | (RawData[2 + i*5] & 0xC0)) >> 6) + (float) ((RawData[2 + i*5] & 0x30) >> 4) * 0.25; /* Get temperature, the 12-bit temperature measurement in °C is comprised of a signed integer component and a fractional component. The signed 8-bit integer component is located in OUT_T_MSB. The fractional component is located in bits 7-4 of OUT_T_LSB. Bits 3-0 of OUT_T_LSB are not used. */ Temperature[i] = (float) ((short)((RawData[3 + i*5] << 8) | (RawData[4 + i*5] & 0xF0)) >> 4) * 0.0625; /* Get altitude, the 20-bit measurement in meters is comprised of a signed integer component and a fractional component. The signed 16-bit integer component is located in OUT_P_MSB and OUT_P_CSB. The fraction component is located in bits 7-4 of OUT_P_LSB. Bits 3-0 of OUT_P_LSB are not used */ //Altitude[i] = (float) ((short) ((RawData[0 + i*5] << 8) | RawData[1 + i*5])) + (float) (RawData[2 + i*5] >> 4) * 0.0625; } } ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Deassertion of the INT1 pin after reading the STATUS register (0x00). The auto acquisition time step is set in this example to the lowest possible value (1s), so the FIFO is read every ~32s. The calculated values can be watched in the "Variables" window on the top right of the Debug perspective. Attached you can find the complete source code. If there are any questions regarding this simple example project, please feel free to ask below. Your feedback or suggestions are also welcome.   Regards, Tomas
View full article
MEMS sensors are mechanical structure chips and easily damaged by shock or huge vibration. Sensor package trend is going to small size, and it is not easy to solder by hand on pcb to verify. In order to do sensor verification before FA process, it is necessary to use a tool to load the failed chips and use I2C/SPI to access sensor registers to check sensor function. This document introduces to use sensor fixture and toolbox for a simple sensor verify tool. It is easy to provide precise failed spec items by this tool and to speed-up FA process.
View full article
The attached is a copy of a presentation given 24 June 2014 at the Sensors Expo Conference in Rosemont IL.
View full article
All, We've had some problems with migration of Freescale blogs over to the NXP domain.  One set of listings that gets requested a fair bit are the postings on orientation representations.  The attached is a PDF version of the same material which will be contained in the upcoming Sensor Fusion Version 7.00 User Guide.
View full article
This is the 9 December 2014 build of Vibration Monitoring program written by Mark Pedley in the Sensors Solutions Division systems/algorithms team.  It is compatible with Freescale FRDM-KL25Z/KL26Z/KL46Z/K64F Freedom development platforms.  You can flash your board using the File->Flash pull-down menu.    The application contains an option for controlling motor bias and feedback via optional motor control shield to be discussed in an upcoming Freescale blog.  Use the View->Motor Controls pull-down to enable those functions.
View full article
For those of you who do not have access to Google Play, here is the latest .apk file for the Android version of the Sensor Fusion Toolbox.  This version should trap problems which caused previously reported crashes.  There are no visible changes to the functionality.   IF you have access to Google Play, we recommend that you use that as your default installer, as you can automatically get updates.
View full article
Current errata for ISF 2.1
View full article
Hi Everyone,   If you are interested in a simple bare metal example code illustrating the use of the magnetic threshold detection function, please find below one of my examples I created for the FXOS8700CQ while working with the NXP FRDM-KL25Z platform and FRDM-FXS-MULT2-B sensor expansion board.   The FXOS8700CQ is set to detect magnetic field exceeding 12.8uT (128 counts) for a minimum period of 100ms on the X-axis. Once an event is triggered, an active low interrupt will be generated on the INT1 pin:   void FXOS8700CQ_Init (void) { I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_X_MSB_REG, 0x00); // Threshold value MSB I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_X_LSB_REG, 0x80); // Threshold value LSB I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_CFG_REG, 0xCB); // Event flag latch enabled, logic OR of enabled axes, only X-axis enabled, threshold interrupt enabled and routed to INT1 I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_COUNT_REG, 0x0A); // 100ms at 100Hz ODR and magnetometer mode only I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_CTRL_REG1, 0x1D); // Max OSR, only magnetometer is active I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG3, 0x00); // Push-pull, active low interrupt I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG1, 0x19); // ODR = 100Hz, Active mode }‍‍‍‍‍‍‍‍‍‍     In the ISR, only the interrupt flag is cleared and the M_THS_SRC (0x53) register is read in order to clear the SRC_M_THS flag in the M_INT_SRC register and deassert the INT1 pin, as shown on the screenshot below.   void PORTD_IRQHandler() { PORTD_PCR4 |= PORT_PCR_ISF_MASK; // Clear the interrupt flag M_Ths_src=I2C_ReadRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_SRC_REG); // Read the M_THS_SRC register to clear the SRC_M_THS flag in the M_INT_SRC register and deassert the INT1 pin Event_Counter++; }‍‍‍‍‍‍       Attached you can find the complete source code. If there are any questions regarding this simple example code, please feel free to ask below.    Regards, Tomas
View full article
clicktaleID