FW15 Center Console
Center Console is the only driver interface. It controls all power transitions, motor output and steering lights. It also displays BMS data, vehicle speed and has LED indicators. This board is always on when the car is on.
Rundown of Center Console Functions:
Buttons to change state
Drive, Reverse, and Neutral
Regen Braking button
Hazard Button
three 7-segment displays with the below quantities
Speedometer (speed in km/h)
When we BPS fault it will display the error code instead
Current Readings (Amps)
Aux Battery Voltage (Volts)
Indicator LEDs
One for each of the above buttons (D/N/R/Haz/Reg)
Left turn signal
Right Turn Signal
Cruise control enabled indicator
BPS Fault Light
AFE Loss of Communications
Buzzer to highlight events
Button Clicks
BPS fault
Pedal Position
Maps ADC reading from 0-1 for the Motor Controller
Stores pedal calibration data in flash non-volatile memory
Refer to FW15 Pedal Board Design for more documentation! This board has been merged to CC. It is almost the same, but it doesn’t use the MAX11600. It instead uses a pedal that we ripped off a car
Steering Stalk
Toggles Left/Right lights
Toggles Cruise Control
Refer to FW15 Steering Design for more documentation! This board was merged to CC so it hasn’t really changed
Centre Console Functionality
Module: cc_buttons
This module gets all button values. Buttons should be read in the fast cycle. They are connected to the pca9555 gpio expander, and must be read over i2c. This read function should send notifications to the requisite tasks.
Power Button, hazard, regen: send notifications to main task
R, N, D → Send notifications to Drive FSM
Module: update_dashboard
Static variables:
cruise_control_state
target_velocity
regen_braking_state
power_state_to_transmit
Functions (all called in medium cycle):
dashboard_init()
update_indicators()
Gets notification value from button presses, updates indicator lights and output can_messages
Hazard enabled:
when pressed, toggle static hazard state
update indicator and cc_power_control.hazard_enabled message based on stored value
Regen Brake:
when pressed, toggle static regen brake state
update indicator and drive_output.regen_brake_enabled message based on stored value
Lights left/right
update left/right indicator based on steering stalk position
Cruise Control Enabled:
update static cc state + indicator based on steering stalk ISR (Button click)
update drive_output based on cc_state + target_velocity
update_displays() [SEPERATE TASK]
Reads values from CAN messages, uses values for 7-seg:
Calculated speed using RPM to MPH → speed display (Top)
Current reading in Amps → current display (Middle)
Aux Battery Voltage → aux batt display (Bottom)
cruise_control_monitor()
Checks for cruise control inputs from steering stalk
Updates Cruise control target speed
Module: pedal
Module: steering
Drive FSM
The Drive FSM handles the control of drive state of the car. It receives the drive buttons (Neutral (N), Drive (D), Reverse(R)) and runs the preparations and checks needed to change the drive state of the car, and communicates this value with the motor controllers.
The initial/default state is Neutral. This is the mandated state of the FSM when we start the car up and are in POWER_IDLE state. In addition, any major faults should force the car into neutral.
The drive state is dependent on power_state. We expect to receive this message every cycle, and if we do not receive this message, we will record a fault after 3 cycles and enter neutral.
State Input Functions:
All the following must be met for a transition to happen from the following states
Neutral → Drive/Reverse
Button pressed (D/R)
Power state == POWER_DRIVE (received from Power distribution)
Speed == 0: All drive state transitions should happen when we are stopped
Actions:
Runs precharge, and closes motor relay
Transmit DRIVE/REVERSE state to MCI
Drive/Reverse → Neutral
Neutral button or forced because of fault
Transmit NEUTRAL state to MCI
Reverse → Drive OR Drive → Reverse
Since we are an EV we can do this easily! Transmits NEW_STATE to MCI