Vehicle Control Unit (VCU) in a Formula Student - Sponsored by JLCPCB

by LART Formula Student in Circuits > Electronics

664 Views, 2 Favorites, 0 Comments

Vehicle Control Unit (VCU) in a Formula Student - Sponsored by JLCPCB

Imagem1 (1).png

The Vehicle Control Unit (VCU) is a crucial component of the car that controls the amount of power that should be delivered to the motor based on the data from the autonomous computer that runs the algorithms. It can limit or adjust the torque/RPM values the motor should produce at any moment. To have full control over the features and hardware of the unit, it was decided to develop our module from scratch.

The module can access the three CAN lines of the car (sensor bus, autonomous bus, powertrain bus), which means it can access all the necessary data from different sensors and actuators that are on the car. It also has a mechanism to detect and report any mechanical faults that may occur in the car.

An H-bridge was implemented to drive a DC motor or other load and two power MOSFETs to switch high-current devices (30V/27A).

Additionally, it has an SD card slot for logging some specific data.

The microcontroller, which is standardized in all our main modules that require a microcontroller, is the PIC32MK1024MCM064T.

The VCU being an in-house developed and manufactured module, the components could be selected in detail, so the microcontroller which was chosen is standardized in all our main modules that require a microcontroller (PIC32MK1024MCM064T). The PIC32MK platform is a microcontroller with many benefits, such as rich peripherals, a fast and efficient math engine, and a floating-point unit that supports single and double-precision calculations.

Supplies

• PIC32MK1024MCM064T MCU 

• 5x ADC inputs with filters

• 4x Can-FD lines at 1Mb/s 

• 4x Transceivers for high-speed CAN FD applications up to 8Mbps

• 1x Output H-bridge for driving a DC motor or other load (30V/27A)

• 2x Output power MOSFETs for switching high-current devices (30V/27A)

• 1x SDCard slot for data logging in SPI mode

• 1x USB-C port for data transfer and debugging (2.0 speeds)

Hardware Architecture

Schematics.png
Regulators.png
Transcievers.png
Connectors.png
Mosfets.png

In this section, it will be described the design and implementation of the VCU module, which consists of a microcontroller, a power supply, four CAN FD transceivers, and an external board with an H-bridge and two MOSFETs. The schematic diagrams of the module are shown in Figures 1 to 5.

Figure 1 shows the microcontroller that was selected for the VCU module: the PIC32MK1024MCM064. This microcontroller has a high performance (120MHz), a fast and efficient math engine, and a Floating-Point Unit that supports single and double-precision calculations.

The microcontroller is programmed using an ISCP connector, which is a Microchip standard for loading code into its microcontrollers. However, the department is working in a bootloader so that allows programming by USB to do that it was added a micro-USB connector coupled to a USB-UART transceiver (MCP2221A). Also, was implemented an SD card connector in SPI mode to enable data logging if needed. Furthermore, exists four LEDs for debugging purposes when developing the firmware.


Figure 2 illustrates the power supply components of the VCU module. The module receives 24V from the PDM and needs to step it down to 5V and 3.3V. Switching regulator was used such as  (R-78E5.0-0..5), which has an efficiency of 82% and provides an output of 5V and 500mA, which is sufficient to power the entire board. To power the microcontroller, it will be used another DC-DC converter, an LDO (MIC5239-3.3YS), which is a linear regulator that converts 5V to 3.3V.


Figure 3 displays the four transceivers of the module, which are MCP2542FD devices designed for high-speed CAN FD applications up to 8Mbps communication speed. A dipswitch exists to enable or disable the end-of-bus resistors.


Figure 4 presents the two connectors from TE (1-776087-4) to the external board and the filters for the ADC inputs, which help us to eliminate unwanted noise on the board.


Figure 5 depicts the H-bridge and two MOSFETs for the external board. The H-bridge is driven by a driver (MIC4604), which is an 85 V Half Bridge MOSFET gate driver, along with two P-type (DMP3028LK3-13) and two N-type (NVD5C478NT4G).

The driver and the MOSFETs work together to control the direction and speed of a DC motor (actuator) or other load. The H-bridge can handle loads up to 30V/27A.

The two MOSFETs for switching high-current devices are controlled by a dual 4.5 A MOSFET gate driver (MCP1405), which is compatible with the same P-type MOSFETs (DMP3028LK3-13) used in the H-bridge. These MOSFETs can also operate at a maximum of 30V/27A, but they will not reach these values in our application.

PCB Design

Front 3D View.png
Back 3d view.png
Layers.png

The 3D design of the module is illustrated in Figures 6 and 7, while Figure 8 presents the 2D design of the board.

The PCB was fabricated with a copper layer of 1oz and a thickness of 1.6mm. The board was designed to be as compact as possible. The tracks on the board were made narrow to save space. The module has a final size of 100*100mm.

Firmware

Firmware.png

In this figure it can be seen the flow chart of the code developed for the VCU, as previously stated, FREERTOS was used, and tasks were created which are executed at chosen time intervals.

Task1 is executed at 5hz, and sends the wake status of the VCU to the can bus, Task2 is executed 100Hz and logs if needed some variables used in the VCU, task2 is executed without delay and have two modes: in the autonomous driving mode a data request is sent to the autonomous driving computer, in pilot drive mode it is aquired the data of the voltage and capacity of the battery pack and take the reading of the brake pedal and the APPS, then the algorithm is run to create the settings to send to the inverter, the data will then be corrected and sent to the inverter.

Reception of the PCB

Imagem12.jpg

In this picture we have a top view of a bare PCB of the VCU sent by JLCPCB. As you can tell, this plate has been precision made.

Preparation Process for Solder Paste Application

Imagem13.jpg

In this picture is shown the preparation process of the PCB for the solder paste application.

Applying the Thermal Paste

Imagem14.jpg

Here we are applying the solder paste to the PCB with the proper technique and materials, and relying on the Stencil that JLCPCB made.

Implementing the ICs

Imagem15.jpg

This image shows the implementation of the ICs on the PCB, done with a lot of caution and detail.

Taking the PCB to the Oven

Imagem16.jpg

After the IC’s are placed, the PCB is put on the oven with our thermistor to control the soldering temperature to have the perfect solder joints.

Semifinished PCB

Imagem17.jpg

After we take of the PCB from the oven, we have our semifinished PCB ready for the first round of debugging and testing.