Vehicle Control Unit

Central control unit for managing vehicle systems and communications

Vehicle Control Unit

Overview

The Vehicle Control Unit (VCU) is a central control unit for managing motor control, device power, and safety systems on the vehicle. Its main function is to read the user input from the pedals, and turn this into a torque command for the motor. Additionally, it manages the Power Delivery Modules on the car to control which devices are powered, and manage the startup sequence for safety devices.

Design

Hardware

The VCU is a custom PCB designed using Altium Designer. It features a STM32 H733 microcontroller, mainly chosen for its high performance and extra CAN peripherals. Along side this are efuses, CAN transceivers, and step down convertes for power supply.

Firmware

The firmware for the VCU is written in C using the STM32Cube HAL and tooling. It uses FreeRTOS for concurrent task management, and integrates with the DAQ for real-time data acquisition. The extra CAN line is used for the motor-controller, which interfaces over CAN.

At its core, it reads the two APPS (Accelerator pedal position sensors) and ensures they differ in angle measurement by no more than 10%. Additionally, it reads the BSE (Brake system encoder), to monitor brake system position and make sure the brakes and accelerator are not engaged simultaneously. If either of these or other failure conditions are detected, the VCU will request 0 torque from the motor controller until the issue is resolved or a hard power reset occurs.