TI's vehicle controller solution design makes your design easier.[Copy link]
In electric vehicles, VCU is the core control component. TI provides the design scheme of the vehicle control unit (VCU) and the related schematic design reference. Friends who are engaged in the development of new energy vehicles can refer to it, which is very helpful for the development of new products. First, take a look at the overall block diagram of VCU as shown in Figure 1.
Figure 1、Figure 2、Figure 3、Figure 4、Figure 5、Figure 6、Figure 7 In Figures 8 and 9, the specific reference design schematics of the red-framed parts are shown in the attachment
tidrs34b.pdf(1.24 MB, downloads: 30)
2018-10-10 18:23 上传
点击文件名下载附件
, and the specific design contents in the attachment are shown in the following pictures. Have a feel for how it makes your design much simpler.
The part with a red frame in Figure 10 is the input protection design part. For the specific design schematic, see the attachment
tidrop5.pdf(405.76 KB, downloads: 24)
2018-10-10 18:37 上传
点击文件名下载附件
. Note that the design supports 12v and 24v power inputs. For the specific schematic, see Figure 11.
I would also like to share a vehicle controller program written for TI's TMS320F28069 shared by netizens on github. I hope it will be helpful to everyone. Let’s take a look at the main program first //#################################################################// // Vehicle Control Unit V1 // // Created by Caner Alp // // 13.06.2018 // // // // The Project is for the electric vehicle car Mediterranean Shark // // by Team ADA // // Electric Vehicle Development Center // // Eastern Mediterranean University // //#################################################################// // // Libraries // #include "DSP28x_Project.h" #include
#include
#include "settingsGPIO.h"
#include "settingsCAN.h"
#include "settingsUART.h"
#include "mspControl.h"
#include "settingsPWM.h"
#include "math.h"
#include "settingsCla.h"
#include "IQmathLib.h"
//#define RAM
//#define _FLASH
//*****************************************************************************
// defines
//*****************************************************************************
#define maxSpeed 95 // Max Speed KM/H
//
// Disable Interrupts
//
DINT;
//
//
//
InitPieCtrl();
//
// Disable CPU interrupts and clear all CPU interrupt flags:
//
IER = 0x0000;
IFR = 0x0000;
//
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
// This will populate the entire table, even if the interrupt
// is not used in this example. This is useful for debug purposes.
// The shell ISR routines are found in f2802x_DefaultIsr.c.
// This function is found in f2802x_PieVect.c.
//
InitPieVectTable();
//
// Interrupts that are used in this example are re-mapped to
// ISR functions found within this file.
EALLOW;
PieVectTable.ECAN1INTA = &ecan1intA_isr;
PieVectTable.TINT0 = &cpu_timer0_isr;
/* * * * * * * * * * PWM * * * * * * * * * */
// This is needed to write to EALLOW protected registers
PieVectTable.EPWM1_INT = &epwm1_isr;
PieVectTable.EPWM3_INT = &epwm3_isr;
PieVectTable.EPWM4_INT = &epwm4_isr;
/* * * * * * * * * *SCI* * * * * * * * * */
// PieVectTable.SCIRXINTA = &sciaRxFifoIsr;
PieVectTable.SCIRXINTB = &scibRxFifoIsr;
#ifdef _FLASH
// Copy time critical code and Flash setup code to RAM
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart
// symbols are created by the linker. Refer to the F28069.cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart,
(Uint32)&RamfuncsLoadSize);
pwmInit();//Initialize PWM Pins
//
// Initialize GPIO, and assign the output to deactiveted position
//
gpioInit();
//
// Initialize PWM, and set 0 not cause any power drain immedately
//
pwmInit();
pwmWrite(0, HORN); // duty cycle is 0
pwmWrite(0, LIGHTS); // duty cycle is 0
pwmWrite(0, WIPER); // duty cycle is 0
//
//Initialize SPI to communicate with MSP430
//
spiInit();
//
// Reset MSP to wake up and clear the device
//
resetMsp();
//
// Initialize CAN-BUS for Motor Control Boards, BMS and SMPS.
//
canBusInit();
// gpioInterruptSetup();
uartInit();
//
// enable interrupts
//
// sendSpeed(0);
//
// Enable TINT0 in the PIE: Group 1 interrupt 7
//
PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block
PieCtrlRegs.PIEIER9.bit.INTx6 = 1; // Enable ECAN1INTA in the PIE: Group 1 interrupt 7
PieCtrlRegs.PIEIER1.bit.INTx7 = 1; // Enable TINT0 in the PIE: Group 1 interrupt 6
PieCtrlRegs.PIEIER1.bit.INTx4 = 1; // Enable PIE Group 1 INT4, FOR XINT1 GPIO0, UP BUTTON
// PieCtrlRegs.PIEIER1.bit.INTx5 = 1; // Enable PIE Group 1 INT5, FOR XINT2 GPIO15,DOWN BUTTON
PieCtrlRegs.PIEIER9.bit.INTx3 = 1; // Receive interrupt for SCI-B
// for PWMS
// M_INT9 For CAN-BUS
// M_INT2 for PWM
// M_INT1 for Timer0
IER |= M_INT9 | M_INT2 | M_INT1;
//
//
//
// Enable global Interrupts and higher priority real-time debug events
//
EINT; // Enable Global interrupt INTM
ERTM; // Enable Global realtime interrupt DBGM
//
// Initialize UART for LCD and RF transiciver
//
// delayms(1000000);
// delayms(1000000);
CpuTimer0Regs.TCR.all = 0x4000;
while(1)
{ // The modes will be controlled by the switch
switch(driveMode)
{
case NORMAL_MODE: // Normal Drive Control loop
// When speed up button pressed
if(!GpioDataRegs.GPADAT.bit.GPIO0 && GpioDataRegs.GPADAT.bit.GPIO15)
{
while(!GpioDataRegs.GPADAT.bit.GPIO0 );
// DELAY_US(5000);
// increase the speed
if(setSpeed < maxSpeed) // if it reaches its maximum, assign maximum speed
setSpeed += 1;
// sendSpeed(setSpeed);
}
// When Speed down button pressed
if(!GpioDataRegs.GPADAT.bit.GPIO15 && GpioDataRegs.GPADAT.bit.GPIO0)
{
while(!GpioDataRegs.GPADAT.bit.GPIO15);
// DELAY_US(5000);
// decrease the speed
if(setSpeed > 0)
setSpeed -= 1;
// if it reaches its mininum, assign 0
// sendSpeed(setSpeed);
}
reversePressed();
hornPressed(); // Check Horn Button
lightsPressed(); // Check The ligths Switch
controlFan(maxTemperature); // Check the Temperature, if exceeds then turn FAN on.
controlFlash(maxTemperature); // In case fault, activate FLASH
//
// There is no wiper input specifically
// the extra input is used, GPIO19
//
wiperPressed();
//
// There is no output for br ake,
// The brake ligth must be connectted manually, directly to the switch
// When foot brake is pressed the motors will do the action
// based on the situtation
//
brakeSwitchPressed();
tempTemperature = _IQtoF(maxTemperature);
/* if(tempTemperature > maxTemperatureThreshold)
{
driveMode = TEST_MODE;
setSpeed = 0;
}
*/
break;
case AUTONOMOUS_MODE: // Autonomus Drive Control Loop
break;
case TEST_MODE: // Test Mode Loop, Will test the all components - Alarm Mode
if(directionMotors == FORWARD)
direction = DIRECTION;
else
direction = 0;
// Get the Steering Angle
steeringAngle = getSteeringAngle();
angle = steeringAngle;
if(!GpioDataRegs.GPADAT.bit.GPIO1)
{
// Calculate the outer side angle
// Calculate the angle of the outer tire so Left tire angle will be calculated
if(angle < (steerZero - 5.0)) // Steering is turned to RIGHT
{ // SPEED for LEFT
angle = steerZero - steeringAngle;
angleIQ = _IQ(angle);
angleIQ = calculateTireAngle(angleIQ);
angle = _IQtoF(angleIQ);
calculateDifferential(angle, speed, &innerSpeed, &outerSpeed);
leftSpeed = outerSpeed;
rightSpeed = innerSpeed;
}
else if (angle > (steerZero + 5.0)) // Steering is turned to LEFT
{ // Right tire will be OUTER
// Speed for RIGHT
angle = steeringAngle - steerZero;
angleIQ = _IQ(angle);
angleIQ = calculateTireAngle(angleIQ);
Yes, Freescale’s chips were used to make complete vehicle solutions, but now TI has also done it. TI provides a lot of reference design information, making development easy.
Details
Published on 2018-10-11 09:25
Yes, Freescale’s chips were used to make vehicle solutions. Now TI is also doing it. TI provides a lot of reference design materials, which makes development easy.