Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Centre console is the board which contains the main state logic for the entire car’s electrical system. It governs starting the system and controlling the power states, as well as the drive state of the car. When the car is off (Main Battery disconnected), this board, along with pedal and power distribution are the only ones which are powered, so that they can be used to start the broader system.

...

The car is powered on when the power button is pressed. Initially this is “aux power”, which means that car is powered by a supply separate to the main batteries. This means minimal functionality is available, and is good for testing initial startup. If the brake is pressed and the power button is pressed at the same time, the car will enter the main power state, powered by the main electrical system, and full functionality will be available.

TODO:

  •  Find out if we want a parked state (Ebrake/parking brake, if manual will it have a sensor?) Not needed
  •  How are we handling ack messages?
  •  We should write a module to handle monitoring (ie. wait for a repeated event with a timeout)
  •  Do CAN messages remain the same or are they cleared after each cycle? They will remain the same unless manually cleared

Inputs

Buttons

  • Power Button

    • Used to control power state, along with pedal

  • P, R, N, D → drive state control buttons

  • Hazard button → Latching, sends message to power distribution to strobe turn lights

  • Regen Braking Enable:

  • DRL Lights?

Buttons will be handled as gpio interrupts, received as notifications to the relevant fsm tasks. Maybe can block on notifications taking place? (TBD)CAN messages. R, N, D will be registered to send notifications to the Drive state FSM. Power button will send a notification to the Power State FSM.

All others will be sent to the main task, and will be processed in the main loop.

CAN messages:

Received:

  • Pedal - Constantly monitor brake state to determine whether to enter main power state

    • Must receive value within 100MS (Could be certain number of cycles with new architecture)

  • MCI

    • Constantly monitor speed message - Must receive new message within 3 seconds

    • Send pre-charge and wait for complete message with a timeout

  • BMS - Heartbeat Message

    • If not received in 3 seconds, or has errors in message, a BPS fault has occurred

  • ACK messages from Power Distribution, MCI,

...