Skip to content

Software Sensor Module

Dylan Garner edited this page Jan 25, 2025 · 1 revision

Responsible for collecting and preprocessing data gathered from the 6 IMU sensors. The sensor team will develop a Sensor API which will serve as the interface between sensor hardware and software system. This API will standardize access to sensor data and provide key functionalities.

Assumptions:

  • The electrical team will be implementing the sensor drivers

Software Components

Integrating with Sensor Drivers

After electrical establishes drivers and communication between sensors and the microcontroller, we should be able to interface with those drivers, allowing us to read sensor values and bring them into the software ecosystem.

Data Processing & Filtering

After receiving sensor data we can apply various filters in order to ensure accuracy, consistency, and quality of data. We will also establish a standard format for sensor data, such that the main controller can read and send it through the our ML models.

Wrap all the above functionality into an API

All the features above should be internal to the sensor module and implementation details should be hidden from the rest of the modules in our software system. It should provide a clean interface for other modules to use, see the class diagram for primary attributes + methods

Hardware Components

In the first iteration of the suit, we will only be concerned with imu sensors, in further iterations other sensors may be added to the system (at very least pressure sensors).

Software Design

To ensure scalability and flexibility of our Sensor module in combination with the overall suit, this is our proposed design:

  • There should be a sensor interface, with a getValue() method that returns the current sensor values at this exact time. An IMU Sensor would then be a concrete implementation of the sensor interface, and the getValue method would be implemented for our specific imu's in this class. This will allow for additional sensors to be seamlessly added into the system.
  • To handle adding and removing various sensors + types seamlessly we propose an implementation of the observer (subscribe / notify) pattern. Background on the Observer Pattern. There will be a SensorManager class which maintains the list of Sensors and adds logic to add, remove, and get data from sensors. The SensorAPI class will have SensorManager as an attribute, and add the public api methods.

UML Diagram

sensor_architecture drawio