This blog demonstrated out of box demo for NXP’s development board and describes the NXP LPC54102 Sensor Processing/Motion Solutions(SPM-S The LPC54102 Sensor Processing/Motion Solution(SPM-S combines the LPC54102 MCU and a range of MEMS sensors in a two board set complemented by a software framework optimized for always-on sensing applications The hardware consists of an LPCXpresso54102 board and Sensor Shield Board(SSB developed by NXP for flexibility and ease of use The solution can be used with a wide range of development tools including the NXP’s LPCXpresso IDE Keil uVision and IAR EWARM
NXP has partnered with Bosch Sensortec to offer an integrated solution that makes it easy to incorporate motion/inertia and other sensor data into a variety of end applications.
The solution includes commercial and development licenses for Bosch Sensor Fusion (BSX Lite). The software combines motion-sensor data to get accurate, sensor signals or derived sensory information with minimal memory requirements.
The LPCXpresso54102 SPM-S includes the following features:
LPCXpresso54102 development board with:
- Built-in Link2 high-speed USB based debug probe
- Connectivity for external debug probes
- Tri-color LED
- Target Reset, ISP and WAKE buttons
- On-board 1.8/3.3V or external power supply options
- Built-in MCU power consumption and supply voltage measurement for LPC54102 device and sensor board
- UART, I2C and SPI port bridging from LPC54102 target to USB via Link2 device
- FTDI UART connector
- LPC54102 in LQFP64 package
Sensor Shield Board with:
- Bosch Sensortec sensors: BMI160 inertial measurement unit (BMI055 on earlier boards), BMC150 digital compass, BMM150 magnetometer, BMP280 pressure/temperature sensor
- Murata pressure/temperature sensor
- MAX44000 ambient light and proximity sensor
- ACKme AMS001 (or AMS002 on earlier production units) Bluetooth LE module
- IR remote control driver/receiver
- Dual Knowles digital microphones
- Headers for easy prototyping of additional SPI and I2C sensors
- Free NXP Sensor Framework
- Free Bosch Sensortec BSXlite sensor fusion library
The SSB is mounted on the expansion connectors of the LPCXpresso54102. The boards are configured for the default operation of the Sensor Framework software and its operation with the Bosch BSX Lite library.
The flash memory of the LPC54102 MCU on the SPM-S is pre-programmed with an example application to show operation of the BSX Lite sensor fusion library within the NXP Sensor Framework. The example application streams board orientation information over the LPC54102 I2C port, via the on-board Link2 debug probe device’s USB port, to a host computer (running Windows 7, 8 or 10). The example renders a 3D teapot from the OpenGL library to represent orientation and movement of the board, using accelerometer, gyroscope and magnetometer data processed by the BSX Lite library.
If you have not installed LPCXpresso IDE version 7.8 or later, and have not installed LPCScrypt on your computer, download and run the LPCXPresso Link2
USB driver package driver installer from: http://www.lpcware.com/content/nxpfile/lpcxpresso-link2-usb-driver-package.
Ensure JP5 is open (no jumper installed) on the LPCXpresso54102 to make the Link2 processor boot from internal flash memory. The factory-programmed Link2 flash image includes I2C to USB bridging support required to support the demonstration
To run the example application follow below instruction:
Connect the host computer to the LPC54102 SPM-S board set at connector J6 using the supplied micro USB cable. Allow about 30 seconds for the board devices to enumerate the first time you connect it
Download the Sensor Demo application available from the LPCOpen section of the lpcware website at this address: http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc5410x-packages
Or direct download link:
Run the sensor demo from the below folder
A 3-dimensional rendition of a multi-colored teapot will be displayed. The board’s location and movement will be represented by the teapot’s orientation. By pressing the “s” key on your computer the orientation can be reset to match the board’s orientation. Note that the board’s orientation can be affected by magnetic and electrical fields.
This all-in-one solution, based on the ultra low power LPC54102 microcontroller, provides everything needed to bring sensor-based motion and other sensor-processing applications to market quickly.
The system listens to, monitors, and aggregates data from several sensors and processes this data using complex sensor-fusion software, included in the solution.
The SSB incorporates four Bosch Sensortec sensors: BMI055 or BMI160 inertial measurement unit, BMC150 eCompass, BMM150 magnetometer and BMP280 pressure/temperature. All of these sensors are connected to the same I2C bus (I2C0 signal) and all have interrupt output lines to the LPCXpresso54102 board except the BMP280.
LPC54102 solution diagram
LPC54102 application software
Add 6- or 9-axis motion sensors to your application Integrated sensor fusion middleware and portable sensor fusion framework Sensor Fusion APIs allow users to easily create applications that use motion sensors Additional digital sensors (pressure/temperature, ambient light, proximity) Software development tools for a quick start to writing, compiling, and running sensor-based applications Gives end-product designers access to a rich set of reference design materials, including documentation, porting guide, and schematics
Stackable hardware to support more sensors or add plug-in modules Large set of pinouts for measurement and prototyping On-board debugger included Low power
Software for LPCXpresso LPC54102 Sensor Processing/Motion Solution Boards can be downloaded from below link:
You can watch the video output execution in which it displays Accelerometer, magnetometer, Gyroscope, light sensor, pressure sensor, temperature sensor, proximity data’s are shown
Video execution is as shown below:
The Teapot Demo using the Sensor Hub Framework on LPC54xx consists of 4 major parts as shown in the figure below:
- Teapot PC App: This is the OpenGL based tool that displays the teapot movements, based on the rotation vector calculated by the BSX Lite Library. This app talks with the Link Processor through USB.
- Serial IO Bridge: The serial IO bridge firmware runs on the Link Processor and translates USB commands from PC app to I2C/SPI commands.
- Sensor Hub: The sensor hub firmware runs on the LPC54xx, it receives I2C/SPI commands from Link Processor through the I2C/SPI Slave channel. The commands tell which virtual sensor to enable/disable. The firmware then decides the physical sensor that needs to be enabled or disabled, and talks with the sensors through I2C master channel and activates/deactivates the corresponding sensor. Sensor Data is also read by the I2C master channel and provided to the BSX Lite Library to process and calculate the rotation vector which is then transmitted by the I2C/SPI Slave channel to the Link Processor. The Host IRQ line is used to indicate that data is available to be read by the Host/PC App.
- Sensors: LPC54xx talk with the sensors through the I2C master channel, the sensors are I2C slaves. The DRDY IRQ lines are used to indicate that new data is available in the sensors to be read by LPC54xx. Currently the BMC150 is used for Acceleration + Magnetic data and the BMI055 is used for Gyro data