The following project design is for an ARM based digital IP using an STM32F051-microcontroller. This design aims to retrieve, compress and encrypt data from an Inertial Measurement Unit (IMU) sensor. This type of sensor includes an Accelerometer, a Gyroscope, a Magnetometer and a Barometer. This design will be implemented as a buoy installed on an ice 'pancake' in the Southern Ocean to collect data about the ice and wave dynamics.
This data will then be transmitted using the Iridium communication network, which is a global satellite communications network. However, this is extremely costly and therefore the data would need to be compressed to reduce its size. The data is also encrypted for security purposes.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
ICM-20948 is 9-axis IMU sensor.
TAG - ICM-20948
AK09916
SPI
STM32 HAL
Axis | Not Recommended for New Designs | Recommended for New Designs |
---|---|---|
6-axis | MPU-6050 |
ICM-20602 |
9-axis | MPU-9250 |
ICM-20948 |
- Read sensor data
- Offset cancellation
- STM32CubeIDE
- STM32 HAL driver
- STM32F411CEU6
- ICM-20948 module ( SparkFun 9Dof IMU Breakout - ICM-20948 (Qwiic) )
- SPI1, PA4 (CS Pin)
/* User Configuration */
#define ICM20948_SPI (&hspi1)
#define ICM20948_SPI_CS_PIN_PORT GPIOA
#define ICM20948_SPI_CS_PIN_NUMBER GPIO_PIN_4
- only contain relative things
#include "icm20948.h"
// variables to store sensor data
axises my_gyro;
axises my_accel;
axises my_mag;
int main(void)
{
// initialize
// Modify the inside of init function for personal setting.
icm20948_init();
ak09916_init();
while (1)
{
// raw data
icm20948_gyro_read(&my_gyro);
icm20948_accel_read(&my_accel);
ak09916_mag_read(&my_mag);
// or unit conversion
icm20948_gyro_read_dps(&my_gyro);
icm20948_accel_read_g(&my_accel);
ak09916_mag_read_uT(&my_mag);
}
}
To get started working on this project, the following hardware is required:
Hardware | Quantity |
---|---|
ICM-20649 Module | x 1 |
STM32f051 Discovery Board | x 2 |
FTDI Adaptor | x 1 |
Micro-USB | x 1 |
Mini-USB | x 1 |
Male-to-Female Jumpers | x 10 |
Male-to-Male Jumpers | x 10 |
Computer to Code | x 1 |
Hardware | Quantity |
---|---|
python | - |
STM32 Cube IDE (Or equivalent such as VS Code) | x 1 |
Serial Port Monitor (Putty on Windows) | x 1 |
The pins on the FTDI adaptor that need to be connected to the STM32f051 are the following:
FTDI Adaptor | STM32f051 Pin |
---|---|
GND | GND |
5V | 5V |
TX | PA10 |
RX | PA9 |