Skip to content

cgem-experiment/Accelerometers

Repository files navigation

Accelerometers

  1. AD7177_H723ZG_20250218_v2
    This folder is the firmware to be flashed onto the STM32H723ZG through STM32CubeIDE. Note that it is mostly autogenerated CubeMx. The only autogenerated file which has been changed by me is main.c, found by navigating to Core/Src/main.c. I have also defined registers for the AD7717-2 in AD7177_registers.h, found by navigating to Core/Inc/AD7177_registers.h.

  2. v2_UDP_Socket.py
    This script is used to listen for UDP packets sent over Ethernet and logs the raw data from the AD7177-2 into a CSV file.

  3. Import_and_display_data.ipynb
    This is the notebook I used to read the CSV files and display data.

  4. Calibration2_Import_data.ipynb
    This notebook was used to calibrate the raw offset and gain values of the ADXL354B.

  5. runUDP.ipynb
    This notebook can be disregarded. I have issues with Python on my laptop and I just use this notebook to run v2_UDP_Socket.py.

  6. .ipynb_checkpoints
    This can be disregarded.

The accelerometer system includes an ADXL354 accelerometer, AD7177-2 ADC and an STM32H7 microcontroller. The system is configured to sample 3-axis acceleration data using SPI (mode 3) with DMA and transmit it over UDP at ~815 Hz per channel. The ADXL354 operates in ±4g mode with a 1.8 V reference $V_{\text{1p8ana}}$ , which also serves as the ADC’s REF+. Calibration procedures have been performed to determine accurate gain and offset values for each axis. For more information on the system, see "Accelerometer System Report" in the document library, added on August 12th, 2025.

The firmware should be flashed onto an STM32H723ZG using STM32Cube IDE. If reconfiguring anything in CubeMX (ioc file), there are some changes that must be made to the autogenerated code in main.c. In the MX_GPIO_INIT function, remove "HAL_NVIC_EnableIRQ(EXTI9_5_IRQn)". This is the last line of the function. Additionally, remove "MX_LWIP_INIT()" from "startDefaultTask()".

Below are the main system hardware components. There is also a doclib entry containing all the datasheets.

Here is a wiring diagram of the system: Accelerometer System Wiring Diagram

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published