In the 1940s, although some simple test instruments were used for automobile diagnosis, it still mainly relied on people's intuitive inspection and judgment. Since the 1950s, a variety of equipment that can conduct comprehensive diagnosis of automobile technical conditions has been developed, leading to the establishment of special automobile diagnosis sections or diagnosis stations. Japan, Britain, the United States and other countries have also established a system for annual or regular supervision and inspection of automobiles, and stipulated specific inspection items and contents. In the mid-1970s, semi-automatic diagnosis systems and fully automatic diagnosis systems appeared one after another. In automobiles equipped with fully automatic diagnosis systems, a central diagnosis socket is provided, and the test equipment is controlled by an electronic computer. The test data is obtained by the in-vehicle self-test circuit and displayed and evaluated. This diagnostic method has entered the practical stage. The truck voice alarm system
based on CAN bus technology designed by us can provide a safe driving environment for automobile passengers. The voice alarm system uses Motorola's M68HC908GZ16 microcontroller, which is small in size, has complete resources and is very cost-effective.
CAN bus bit timing
CAN bus uses synchronous serial communication. The characters in the data stream and the bits within the characters are synchronized. This requires both the receiver and the transmitter to use a synchronous clock to control the sending and receiving of data. To maintain bit synchronization in a fairly long data stream, the receiver must be able to identify when each binary bit starts, which is bit timing. Usually, in order to ensure that the receiver clock and the transmitter clock are strictly consistent, the receiver extracts the synchronization signal from the data stream through a demodulator, or the receiver and the transmitter use a unified clock. However, even so, it is still difficult to solve the problem of bus transmission delay. In response to the above problems, the bit timing of the CAN bus improves bit encoding/decoding.
The CAN bus bit timing consists of 4 parts: synchronization segment (SYNC_SEG), propagation segment (PROP_SEG), phase segment 1 (PHASE_SEG1) and phase segment 2 (PHASE_SEG2). The synchronization segment is used to synchronize the nodes on the bus, waiting for a jump edge in this segment; the propagation segment is used to compensate for the physical delay time in the network; the phase segment 1 and the phase segment 2 are used to compensate for the phase error. Read the bus level at the sampling point.
The M68HC908GZ16 microcontroller (see Figure 1) has a built-in CAN controller, which provides a baud rate control register; SJW (resynchronization jump width) determines the time quantum that a bit time is extended or shortened during a resynchronization; BRP is the baud rate pre-division coefficient; Spl (sampling mode bit) determines the number of times the valid bit is sampled.
Figure 1 Internal structure of MC68HC908GZ16
Bit timing is mainly used to define the communication rate of the CAN bus. The same communication rate should be defined for each node on the same bus, otherwise communication will not be possible. The calculation formula for the bus operating frequency of the CAN controller is as follows:
Where: BRP is the system pre-scaling factor, and its value range in the TSEG1 domain is 0 to 63; the values of TSEG1 and TSEG2 are determined by the bit timing register programming and meet 1≤TSEG1≤7, 2≤TSEG2≤15. The setting of the bit timing in the alarm defines the communication frequency as 250KB/s. Set DSC="BRP"=1, TSEG1+TSEG2=5, the system crystal frequency is 8MHz, that is, XTAL=8MHz, and the CAN communication frequency is calculated by the above formula to be 250KB/s.
The final bit timing setting result is: BRP=1, TSEG2=2, TSEG1=3.
Figure 2 Voice alarm system structure
Design Overview
The design goals of the truck voice alarm system are: low cost; powerful functions; suitable for daily applications; and can be applied to all types of vehicles. The system can achieve the following functions: first, use the CAN network to receive the truck fault code; second, identify the signal transmitted by the CAN system, process the signal to obtain the corresponding voice prompt, and connect with the voice chip to realize the voice playback alarm of the corresponding fault.
The voice alarm system is based on Motorola's MC68HC908GZ16 processor, and uses its rich interface expansion to use peripheral modules such as voice playback and CAN communication interface to make the product design more humanized. The MC68HC908GZ16 processor has the following advantages:
1. Rich hardware resources
MC68HC908GZ16 is a flash memory MCU with 16K FLASH storage space and 1K RAM storage space. It has a phase-locked loop circuit inside, which can make the bus frequency reach up to 8MHz when using a low-speed crystal oscillator. At the same time, it has up to 37 general I/O ports, which can be easily connected to other peripheral devices.
Figure 3 Truck alarm circuit schematic
2. Strong anti-interference ability
The CAN controller is integrated internally, and the strong anti-interference feature of CAN communication is used to ensure that the product can operate efficiently and stably under harsh environmental conditions.
This design uses CAN communication to complete the design of the truck voice alarm system, and the system structure is shown in Figure 2.
Data communication is achieved through the MSCAN08 module integrated on the MC68HC908GZ16. Using the I/O port of C68HC908GZ16, we used the ISD4002-120 digital voice chip of ISD, which is common in the market, in the design. The chip is powered by 3V DC and can record and save 2min of voice information. Its sampling frequency is 8kHz, and the information resolution can reach 200ms, which can reproduce voice, music, tone and effect sound very realistically.
Hardware Design
As can be seen from Figure 3, the truck alarm circuit is mainly composed of three parts: microcontroller MC68HC908GZ16 (internal integrated MSCAN08 module), voice chip ISD4002 and CAN bus transceiver TLE6250, ZJYS. The microcontroller is responsible for the initialization of the MSCAN08 module and realizes communication tasks such as data reception and transmission through the CAN module. The CAN communication control module mainly completes the CAN communication protocol. The CAN control module can complete all functions of the physical layer and data link layer, and is suitable for automobiles and general industrial environments. Using CAN communication can not only reduce wire connections, but also enhance diagnostic and monitoring capabilities. The
CAN transceiver TLE6250 is used to provide the driving capability for differential transmission and reception of the bus, and has the advantages of optimal matching of output signals CANH and CANL, lower electromagnetic radiation, and no standby mode. Two 25PF small capacitors are connected in parallel between CANH and CANL and the ground, which can filter out high-frequency interference on the bus and have a certain anti-electromagnetic radiation effect.
Software Description
Software programming mainly realizes two functions: using the bus to receive fault codes; realizing corresponding voice fault alarms by converting fault codes. Voice playback is designed according to its function. Most operations of the entire program are completed in the main program, while CAN reception is completed in the interrupt.
Previous article:Capacitive Sensing Basics and Applications in Automotive
Next article:Panasonic develops millimeter-wave radar detection technology that can distinguish between vehicles and people at night and in bad weather
- Popular Resources
- Popular amplifiers
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- The diameter of the four holes on the EK140 base plate
- This circuit is called a "lawn mower"
- In a single-chip computer, writing 1 clears it to 0, and writing 0 clears it to 0. What is the difference?
- How to monitor battery voltage with Arduino
- Image Algorithm Transplantation to DSP and Its Optimization Steps
- To advance in technology to a certain level, you just need to read more datasheets!
- Prize-winning live broadcast: Keysight’s Metaverse Test Series Seminar: Challenges in VR/AR Digital Interface Testing in Progress!
- 51 STM32 reference study manuals, one-click download without points!
- Microwave and RF Applications
- With the advent of 5G, what should we pay attention to when designing mobile phone antennas?