Design of Automotive Switch Electrical Box Based on CAN Bus and PIC Microcontroller

Abstract : Based on Microchip's PIC18F45K80 chip, it is low cost. A highly scalable and practical design method for a multifunctional automotive switch electrical box. In addition to the function of real-time monitoring of the starting process and driving state parameters of the car, the switch electrical box pays more attention to the practicability and expandability of the product compared with Other similar products, and has the unique function of communicating with other devices of the automobile.

0 Preface

With the continuous development and advancement of modern automobile industry technology, the number of electronic devices installed in the vehicle is increasing, so that a large number of control signals need to be exchanged in real time in the integrated control system of the automobile. As a reliable automotive computer network bus, CAN bus has been widely extended to various application fields of automotive control systems. Applying the CAN bus technology to the automotive switchgear box allows the computer control unit of each car to obtain the working data in the switch electrical box through the CAN bus, and to accurately control the relays of the switch electrical box to reduce the car. Harness, improve communication reliability, reduce system cost, avoid duplication of system functions, and improve system efficiency.

1 Automotive switch electrical box design

This switch electrical box uses a PIC18F45K80 chip manufactured by Microchip as the main chip design. The chip not only has all the functions of the general-purpose single-chip microcomputer, but also integrates the hardware CAN protocol module, and the CAN bus communication can be completed inside the chip. The adoption of this scheme has the following advantages: First, the hardware integrates the CAN protocol module, eliminating the need for an external chip, thereby reducing the manufacturing cost of the product; second, there is no need to write an SPI interface driver, which shortens the development cycle and improves product competitiveness; This system uses the mainstream PIC chip, which has strong scalability and high program portability.

The PIC18F45K80 is the main control chip and is responsible for the integrated transaction processing of the system.

The system functions are mainly divided into four parts, which are analog signal sampling. Digital signal acquisition. The control signal output communicates with the CAN module. The acquisition of analog signals includes power supply voltage sampling. Temperature sensor and current sensor sampling. The digital signal captures the on and off of each blown fuse. The output of the control signal is for the vehicle power supply relay K1. Start the power relay K2. Start control of motor relay K3. CAN module communication is the communication between the MCU and other devices on the vehicle through the CAN interface chip, which is also the focus of this system research. Figure 1 shows the overall block diagram of the system.

Figure 1 shows the overall block diagram of the system.

2 Hardware design of automotive switch electrical box

2.1 system main processor PIC18F45K880

The PIC18F45K80 family is Microchip's PIC18F8680. A low-cost extension to the PIC18F4680 and PIC18F4580 enhanced CAN families. The device operates over a wide voltage range of 1.8 to 5. 5 V and has an on-chip 3.3 V regulator that can be used as a power supply reference. Large operating temperature range: -40~+125 °C, suitable for automotive working environment. Works at up to 64 MHz with up to 64 KB of on-chip Flash program memory, 1,024 bytes of data EEPROM, and 3. 6 KB of general purpose registers (SRAM). There are 2 internal oscillators: INTRC (31 kHz) and INTOSC (16 MHz). With an extended watchdog timer (WatchdogTImer, WDT), the programmable period is 4 ms~131 s.

The PIC18F45K80 includes an Enhanced Controller Area Network (ECAN) module. The ECAN bus module complies with the ISO 11898-1 specification. There are 3 operating modes: Legacy mode (completely backward compatible with existing PIC18CXX8/FXX8 CAN modules). Enhanced mode. FIFO mode or programmable transmit/receive buffer. The message bit rate is up to 1 Mb/s, with 6 buffers for receiving and transmitting message buffers, 3 with priority message buffers, 2 for receiving message buffers and 1 Receive packet combination buffers.

2.2 CAN interface circuit module design and implementation

This switch electrical box uses NXP Semiconductors CAN bus transceiver chip TJA1050 as the interface between the CAN protocol controller and the physical bus.

The TJA1050 provides different transmit performance for the bus and provides different receive performance for the CAN controller. The TJA1050 is fully compliant with the ISO11898 standard and has a high transfer speed (up to 1M baud). A differential receiver with good electromagnetic compatibility and low electromagnetic radiation (EME) performance with a wide input range for immunity to electromagnetic interference (EMI).

Figure 2 shows the interface application circuit of the TJA1050. A 120 ä¿š oyster 9 in the circuit plays a very important role in matching the bus impedance. Otherwise, the anti-interference and reliability of data communication will be greatly reduced, and even communication will not be possible.

Figure 2 shows the interface application circuit of TJA1050.

2.3 Signal acquisition and output control circuit design

The detection of various electrical working states of a car is one of the important working functions of the switch electrical box, mainly by the fuse state collecting circuit. Power supply voltage and temperature acquisition circuit. Start the motor current detection circuit.

The working status of the car fuse is detected. For reliability. Accurately detect the on and off of each fuse, the system uses the optocoupler isolation to detect the on and off of the fuse. The electrical box has a charging fuse. Warm air 1~2 fuse. Switching Power Supply fuse. Normal fire power fuse. No. 1~10 fuses in the ON position. There are 24 fuses for constant fire 1~8 fuses. The fuse detection adopts the detection mode of optocoupler isolation to avoid interference of other electrical equipment on the vehicle to the electrical box system.

The switch electrical box needs to monitor the power supply voltage in real time. High voltage is achieved by voltage monitoring. Three kinds of abnormal alarms such as low voltage and abnormal generator charging: The over voltage alarm is when the voltage exceeds 32 V, the system voltage is over alarmed to the meter through the CAN bus; the low voltage alarm is when the vehicle is not started, when the system voltage Below the set value of 23. 5 V, a low voltage alarm is issued, and the main power switch is turned off for more than 4 minutes; the generator charging abnormal alarm means that after the vehicle is started, if the charging is normal, the current power supply voltage should be greater than 26 V. If the charging is abnormal (power supply voltage exceeds 32 V or lower than 26 V), an alarm is issued to the meter via the CAN bus.

Since the voltage alarm only needs to detect 3 voltage values, in order to reduce the system cost, this design uses the resistor voltage division method for detection.

The switch electrical box needs to detect the temperature inside the electrical box and send the temperature data to the meter through the CAN bus. The system uses the 3899 200K NTC (negative temperature coefficient thermistor) to detect the temperature, the AD value is sampled by dividing it with a standard resistor, and finally the actual measured temperature value is found according to the resistance-temperature table.

The other is to start the motor current detection. The car starting system converts battery power into mechanical energy, which is driven by the starter to start the engine. When the car is started, the starting current of the starting motor is very large, generally up to 300~600 A. In order to prevent damage to the car battery and other circuits caused by the overcurrent of the starting motor, a current detecting circuit is added to the starting motor. The BYD BLY2-IOV2M current sensor is selected in the system, and a metal copper piece is used in the switch electrical box to pass through the current sensor cavity. The sensor uses the Hall effect measurement principle, a completely isolated measurement method with low power consumption. Wide measurement range and other characteristics.

The main control unit of the equipment is PLC and the HMI (Human Machine Interface) is 7" LCD colorful touch screen. The equipment has varieties of operating modes, and can automatically record and save working status.The complete set of equipment is easy to operate, reliable in working, complete in protection and high in automation.

It has the features of high reliability, high pulse symmetry, strong anti-interference ability, quick reaction, as well as the advantages of no heat-generating, constant current, energy-saving which is compared with the discharge with the electrical resistance.


Agv Battery Charger And Discharger

Battery Charger Discharger,Charging And Discharging Of Battery,Intelligent Battery Charger And Discharger,Agv Battery Charger And Discharger

Xinxiang Taihang Jiaxin Electric Tech Co., Ltd , https://www.agvchargers.com