State Machine🔗

The firmware is based on a custom state machine designed in house. This page will discuss the overall system state machine.

States🔗

State Number

State

Description

0

Init

Awaiting Initialization of all Required Sensors and Interfaces

1

ReadyToSwitch

The controller is ready to actuate. Motor controller is disabled but has no faults.

2

ActivelySwitching

The controller is actively switching in some standard control mode.

3

Faulted

Some fault has occured and the motor controller should be in a disabled state.

4-7, 17-18

Reserved

These are reserved debug states.

The high-level state machine is depicted below. Detailed transitions descriptions are found in the table below.

        stateDiagram-v2
Init --> ReadyToSwitch: Initialized
ReadyToSwitch --> ActivelySwitching: Enable
ReadyToSwitch --> Faulted: Fault
ActivelySwitching --> Faulted: Fault 
Faulted --> ReadyToSwitch: Clear Faults
    

The transitions are described in greater detail here.

Transitions🔗

Transition Name

Description

Initialized

All sensors are setup and providing good data. Current Sense, Temperature Sense and Position Sense.

Enable

Valid Enable command is provided over CAN with a valid actuation command request.

Fault

The motor controller has detected a critical fault. Detailed fault descriptions are found below.

Clear Faults

The motor controller has received over CAN a ClearFaults message and has determined that the previous fault case is no longer applicable.

The faults are described here.

Faults🔗

Fault Name

Description

Over-Temperature

Detected over temperature on transistor. This is potentially hardware damaging.

Over-Current

Detected over current on phase output. This is potentially hardware damaging.

Missed Heartbeat

Failed to receive command packet in last 1s. Only applicable in ActivelySwitching state.

Current Comms Loss

Lost communication to current sense ADCs.

Temperature Comms Loss

Lost communication to thermistor sense ADCs

Neutral Point Balance Loss

The controller has failed to maintain proper balance across the neutral point, risking overvoltage stress to the transistors.