Sensor Module Software Design

Introduction

The sensor module is responsible for taking telemetry from the environment, logging it to storage and reporting those measurements to other modules.  

This page reflects the software design for the second revision of the sensor module

Data

NameDataTypeSize (bytes)Sample Rate (Hz)
MS5611

Pressure

Temperature

float

float

32

32

100
BMP388

Pressure

Temperature

float

float

32

32

100
LSM6DSL

Accel X

Accel Y

Accel Z

Gyro X

Gyro Y

Gyro Z

float

float

float

float

float

float

32

32

32

32

32

32

100
LIS3MDL

Mag X

Mag Y

Mag Z

float

float

float

32

32

32

100
ADXL375

Accel X

Accel Y

Accel Z

float

float

float

32

32

32

100
TMP117Temperaturefloat3210


*** Note that noted sample rates are somewhat placeholders and subject to change. Refer to Backplane PDR on data budget for more accurate numbers. 

*** Some sensors also are not going to sample at exactly 100 Hz. Some sensors do sample at 104 for example 

Tasks

NameResponsibilityPriority
100 Hz TelemetryRead in sensor values sampling at 100 Hz and placing it on a queue for consumptionHigh
10 Hz Telemetry Read in sensor values sampling at 10 Hz and placing it on a queue for consumptionLow
Ethernet TransmitTransmit sensor data to other modulesMedium
Data Logging Log sensor telemetryMedium

Callbacks

NameResponsibility
Ethernet ReceiveReceive data from Ethernet. This will mostly likely be notifications from radio module that liftoff occurred to serve as redundancy in case lift off detection fails

Ethernet Communication

  • To keep it simple, port numbers correspond to the data rate of telemetry being broadcasted.
    • This would be the base port of the sensor module + the data rate.
  • If multiple sensors use the same data rate, telemetry should be bundled under one packet
  • Ethernet should send a notification packet for liftoff, apogee and landing over port 9999