Abstract : With Microchip's PIC18F45K80 chip as the core, a design method for a practical and multifunctional automotive switch box with low cost and high scalability is given. In addition to the function of real-time monitoring of the vehicle startup process and driving status parameters, compared with other similar products, this switch box also pays more attention to the practicality and scalability of the product, and has the unique function of communicating with other automotive devices.
0 Introduction
With the continuous development and progress of modern automobile industry technology, the number of electronic devices installed on vehicles is increasing, so that a large number of control signals need to be exchanged in real time in the integrated control system of automobiles. As a reliable automobile computer network bus, CAN bus has been widely promoted to various application fields of automobile control systems. Applying CAN bus technology to automobile switch boxes can enable each automobile computer control unit to obtain the working data in the switch box through the CAN bus, and can accurately control each relay of the switch box, thereby achieving the purpose of reducing automobile wiring harnesses, improving communication reliability, reducing system costs, avoiding system function duplication, and improving system work efficiency.
1 Design of automotive switch box
This switch box adopts the design scheme based on the PIC18F45K80 chip produced by Microchip as the main chip. This chip not only has all the functions of a general single-chip microcomputer, but also integrates a 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, and no external chip is required, thereby reducing the product manufacturing cost; second, there is no need to write the SPI interface driver, which shortens the development cycle and improves the product competitiveness; third, this system uses mainstream PIC chips, which has strong scalability and high program portability.
PIC18F45K80 is the main control chip, responsible for the comprehensive transaction processing of the system.
The system functions are mainly divided into four parts, namely analog signal sampling, digital signal acquisition, control signal output and CAN module communication. The acquisition of analog signals includes power supply voltage sampling, temperature sensor and current sensor sampling, and digital signal acquisition of the on and off of each fuse. The output of the control signal is the control of the vehicle power relay K1, the starting power relay K2, and the starting motor relay K3. CAN module communication is the communication between the microcontroller 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 this system.
2 Hardware design of automobile switch electrical box
2.1 System main processor PIC18F45K880
The PIC18F45K80 series is a low-cost extension of Microchip's PIC18F8680, PIC18F4680 and PIC18F4580 enhanced CAN series. The microcontroller has a wide operating voltage range of 1.8~5.5 V, and a built-in 3.3 V regulator on the chip, which can be used as a power supply reference voltage. The operating temperature range is wide: -40~+125 ℃, suitable for automotive working environments. The operating speed is up to 64 MHz, with a maximum of 64 KB on-chip flash program memory, 1 024 bytes of data EEPROM, and 3.6 KB of general 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. It has three operating modes: Legacy mode (fully backward compatible with existing PIC18CXX8/FXX8 CAN modules). Enhanced mode. FIFO mode or programmable transmit/receive buffer. The message bit rate can reach up to 1 Mb/s, with 6 buffers that can be used as receive and transmit message buffers, 3 transmit message buffers with priority, 2 receive message buffers and 1 receive message combination buffer.
2.2 CAN interface circuit module design and implementation
This switch box uses the CAN bus transceiver chip TJA1050 from NXP Semiconductors as the interface between the CAN protocol controller and the physical bus.
TJA1050 can provide different transmission performance for the bus and different receiving performance for the CAN controller. TJA1050 fully complies with ISO11898 standard and has high transmission speed (up to 1M baud). It has good electromagnetic compatibility and low electromagnetic radiation (EME) performance, and has a differential receiver with a wide input range, which is resistant to electromagnetic interference (EMI).
Figure 2 shows the interface application circuit of TJA1050. A 120Ω resistor 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, or even communication will be impossible.
2.3 Signal acquisition and output control circuit design
The detection of various electrical working states of the car is one of the important functions of the switch electrical box, which is mainly composed of the fuse state acquisition circuit, the power supply voltage and temperature acquisition circuit, and the starter motor current detection circuit.
Working status detection of automobile fuses. In order to reliably and accurately detect the on-off status of each fuse, this system uses optocoupler isolation to detect the on-off status of the fuse. The electrical box has a total of 24 fuses, including charging fuses, heater 1~2 fuses, switch power fuses, normal fire power fuses, ON gear 1~10 fuses, and normal fire 1~8 fuses. The fuse detection uses optocoupler isolation detection to avoid interference from other electrical equipment on the vehicle to the electrical box system.
The switch box needs to monitor the power supply voltage in real time. High voltage is achieved through voltage monitoring. There are three abnormal alarms, such as low voltage and abnormal generator charging: the overvoltage alarm is when the voltage exceeds 32 V, the system voltage alarm is sent to the instrument through the CAN bus; the low voltage alarm is when the vehicle is not started, when the system voltage is lower than the set value of 23.5 V, a low voltage alarm is issued, and the main power switch is cut off for more than 4 minutes; the abnormal generator charging 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 (the power supply voltage exceeds 32 V or is lower than 26 V), an alarm is sent to the instrument through the CAN bus.
Since the voltage alarm only needs to detect 3 voltage values, in order to reduce system costs, this design uses a resistor voltage divider for detection.
The switch electrical box needs to detect the temperature inside the electrical box and send the temperature data to the instrument through the CAN bus. The system uses 3899 200K NTC (negative temperature coefficient thermistor) to detect the temperature, and samples the AD value after dividing the voltage with a standard resistor, and finally finds the actual measured temperature value according to the resistance-temperature table.
Another thing is the starter motor current detection. The car starting system converts the battery energy into mechanical energy, and the starter drives the engine to rotate and start the engine. When the car starts, the working current of the starter motor is very large, generally up to 300~600 A. In order to prevent the overcurrent of the starter motor from damaging the car battery and other circuits, a current detection circuit is added to the starter motor. BYD BLY2-IOV2M current sensor is selected in the system, and a metal copper sheet is used to pass through the current sensor cavity in the switch electrical box. The sensor adopts the measurement principle of the Hall effect and a completely isolated measurement method, with low power consumption and wide measurement range.
3 Software Design and Implementation of Automobile Switch Electrical Box
The switch box electrical software mainly consists of two parts, including user function definition design and CAN driver design. The overall program architecture is shown in Figure 3.
The user function definition program in Figure 3 mainly includes overvoltage monitoring, undervoltage monitoring, fuse circuit breaker monitoring, overcurrent monitoring, battery charge monitoring, module self-test, etc.
The main function of the SAE_J1939 protocol driver is to parse the CAN messages in the receive buffer of the CAN module and translate the CAN messages in the send buffer.
The data structure of the SAE_J1939 protocol is very different from the CAN message structure. It redefines the 11-bit standard frame and 29-bit extended frame of the CAN message, giving special meaning to each bit. Its structure is defined as follows:
Among them, PDUFormat is the PDU format, PDUSpecific is the specific field, SourceAddress is the device address, DataLength is the data length, Priority is the priority, and Data[J1939_DATA_LENGTH] is the data field of the SAE_J1939 protocol.
According to the position and role of the SAE_J1939 protocol in the entire system, this design provides a translation and parsing flow chart for receiving and sending messages based on the SAE_J1939 protocol as shown in Figure 4.
Before the CAN module works, it must be initialized.
The CAN driver is designed to enter the configuration mode of the CAN module at the entrance so as to configure the baud rate, mask, filter, etc. before the CAN module works.
4 Conclusion
The automotive switch box based on CAN bus is a networked automotive electrical control system, which is of great significance to the networking development of automotive electrical equipment. It can minimize the automotive wiring harness, transmit the working data of the switch box to each instrument in real time, has high data transmission reliability and installation convenience, and expands the functions of the car. At present, with the rapid popularization of CAN bus technology, more and more automobile manufacturers support the CAN bus standard, and the networking development trend of automotive electronic products is inevitable. The installation of automotive switch boxes based on CAN bus in vehicles will help improve the competitiveness of automotive products, and the increased cost will not be too much, so it is the future development direction of automotive switch boxes.
Previous article:Design and test of radiator for automotive electronic control equipment (50w)
Next article:Analysis of three types of LCD wide viewing angle technology
Recommended ReadingLatest update time:2024-11-15 16:34
- Popular Resources
- Popular amplifiers
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- EEWORLD University Hall----Live Replay: Using NI CompactDAQ and LabVIEW to Build a Sensor-Based Test System
- Problem with the second example in Chapter 10 of Zhou Hangci's book
- Application ends - [TI E2E community year-end benefits] CC3200-LAUNCHXL is given away for free, write a review and win a gift!
- Thermometer Disassembly
- The relationship between FPGA memories.pdf
- UC2845 power supply problem
- Burn files to the development board
- Basic classification of PCB boards. Does anyone know what FR-4 is?
- Please help me figure out how the following circuit can get these results.
- 【CH579M-R1】+ OTA method to save FLASH (method 2)