-
Notifications
You must be signed in to change notification settings - Fork 0
Telemetry Board
BL-CZY edited this page Sep 4, 2026
·
1 revision
- Board used: STM32f767zi
- Function: The communication between the pod and the base station, the state machine, etc.
Within this board, the communication within tasks is done by channels (e.g.: PubSubChannel's in embassy-sync)
There are:
-
CAN_SENDandCAN_RECEIVE: When a CAN message is received, it will be put inCAN_RECEIVE, and when a CAN message needs to be sent, it will be put inCAN_SEND. -
EVENT_BUS: The state machine task will publish updates on this bus
CanMessage is used for all possible messages
#[derive(PartialEq, Debug, Clone, defmt::Format)]
pub enum CanMessage {
MeasurementReading(MeasurementReading),
Heartbeat(Heartbeat),
Emergency(Board, Reason),
// Electronics
StartPrechargeCommand,
StartDischargeCommand,
PrechargeStarted,
DischargeStarted,
PrechargeComplete,
DischargeComplete,
VoltageStatus {
voltage: Voltage,
},
PrechargeVoltageOK,
DischargeVoltageOK,
// Motor Controller
MotorControllerSetupCommand,
MotorControllerSetOperationalCommand,
OpenPrechargeRelaysCommand,
MotorControllerSetupComplete,
MotorControllerOperational,
// Relays
ShutdownCircuitryRelayOpen,
ShutdownCircuitryRelayClosed,
BatteryPrechargeRelayOpen,
BatteryPrechargeRelayClosed,
MotorControllerRelayOpen,
MotorControllerRelayClosed,
DischargeRelayOpen,
DischargeRelayClosed,
// Navigation
EndOfTrackBrake,
// Dynamics
UnclampBrakesCommand,
ClampBrakesCommand,
RetractLateralSuspensionCommand,
ExtendLateralSuspensionCommand,
BrakesClamped {
from: Board,
},
BrakesUnclamped {
from: Board,
},
LateralSuspensionRetracted {
from: Board,
},
LateralSuspensionExtended {
from: Board,
},
DynamicsStatus {
from: Board,
actuator_pressure_bar: Pressure,
},
// Propulsion
StartPropulsionAccelerationCommand,
StartPropulsionBrakingCommand,
PropulsionAccelerationStarted,
PropulsionBrakingStarted,
PropulsionStatus {
current_ma: Current,
velocity_kmh: Velocity,
temperature_c: Temperature,
voltage_cv: Voltage,
},
PropulsionForce {
force_n: Force, // calculated thrust force
},
}-
MQTT_SENDandMQTT_RECEIVE: The rest of the board can send and see received messages by sending/subscribing them
Read this for what the telemetry board does with the state machine
| task | function |
|---|---|
| mqtt | Sends and Receives MQTT messages with rust_mqtt. |
| can_sender | Sends messages |
| can_receiver | Receives messages |
| can_to_mqtt | Sends CAN measurement messages as MQTT to the base station |
| emergency_handler | Shuts down the pod |
| send_heartbeat | Sends heartbeat to boards |
| heartbeat_monitor | Checks if all boards are responding to heartbeat messages in the acceptable latency |
| mqtt_to_event_bus | Checks for operator commands from the MQTT messages |
| event_to_can | Sends some event bus messages to can messages |
| read_imd | Reads readings from the IMD |
| base_station_heartbeat | Heartbeat with the basestation |
| run | Runs the state machine |
| sensor | pins | address | wiring_photo | type | extra_info |
|---|---|---|---|---|---|
| IMD & the CAN bus | PD0, PD1 | - | - | CAN | - |