mswger001 / EEE3097S_TSHTHA094_MSWGER001

Group repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Group Project For EEE3097s

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.

(back to top)

Getting Started

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.

(back to top)

stm32_hal_icm20948

Brief

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

Library Feature

  • Read sensor data
  • Offset cancellation

Dev Environment

STM32CubeMX

image

SPI

image

GPIO

image

Example

icm20948.h

  • 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

main.c

  • 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);
    }
}

Required Hardware

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

(back to top)

## Required Software As well as the above mentioned hardware, the following software/tools are needed:
Hardware Quantity
python -
STM32 Cube IDE (Or equivalent such as VS Code) x 1
Serial Port Monitor (Putty on Windows) x 1

(back to top)

## Connecting the Hardware

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

About

Group repository


Languages

Language:C 51.4%Language:Python 48.4%Language:Makefile 0.2%