...
Electrical General Documentation
Make a branch on the following GitHub:
Name it lastfirst-DAQSTARTER
The Data Acquisition System for Longhorn Racing Solar can be divided into the following subsystems:
...
Even if your role focuses on just one of these technologies, it's crucial to have a solid grasp of the overall system. This knowledge not only enhances collaboration with your teammates but also allows you to integrate your work with theirs, ensuring a cohesive design.
Development Environment
Ensure you have properly setup the following software packages before continuing:
...
If you are unfamiliar or want to get more comfortable working within a Linux environment, check out: https://missing.csail.mit.edu/
Objective
Develop a real-time telemetry system that captures, transmits, and analyzes data from an Inertial Measurement Unit (IMU) connected to an STM32 microcontroller, visualizes the data through a web dashboard, and performs dynamic simulations using the PyChrono library for mechanical analysis.
Acquisition
Hardware
The first step in the data acquisition pipeline is digitizing the target signal—in our case, vehicle positional information. We use the LSM6 IMU, an always-on 3-axis accelerometer and 3-axis gyroscope to achieve this. Since there are several revisions of this IMU, it’s essential to ensure that the datasheet you reference corresponds to the specific version you're working with. Below is the link to the datasheet for the IMU you are likely using for this project:
...
We will be using KiCad for our PCB prototyping/design, and I have provided a KiCad project folder in the starter project GitHub. The project already contains the appropriate symbols for the design. Using the data sheets, it is your job to make the correct electrical connections on the schematic and PCB between the different peripherals. (Clue: we are using SPI to communicate from the IMU to STM32, and UART to communicate from the STM32 to the USB).
Checkout page 38 for tips on reading a datasheet:
https://drive.google.com/file/d/1ncT20jXJit8rNf8lYBwRSi9BwHNnSHLV/view?usp=drive_link
Some helpful pages:
...
Firmware
...
Code Block |
---|
uint8_t LSM6DSL_AccReadID(void) { /* IO interface initialization */ SENSOR_IO_Init(); /* Read value at Who am I register address */ return (SENSOR_IO_Read(LSM6DSL_ACC_GYRO_I2C_ADDRESS_LOW, LSM6DSL_ACC_GYRO_WHO_AM_I_REG)); } |
However, the SENSOR_IO_Read is a generic function, and it is your responsibility to replace it with the proper STM SPI communication function.
Make sure you understand what the function is doing, and verify you are sending the correct packages to the IMU. Check out section 9. Register Mapping to verify the packages.
Want some more practice or another introduction to electrical work?
check out: PCB Starter Project - Fan Board
Display
10/05/24
Ahead of Schedule?
...
https://drive.google.com/file/d/1WcelXRpiBJWYGkKvwAVdFLVyTp6dLY5V/view
Analysis
10/12/24
Ahead of Schedule?
...