Design and implementation of a truck voice alarm

Publisher:钱老李Latest update time:2012-04-20 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Automobile diagnostic technology is a method and means of testing the performance and checking faults of automobiles by instruments and equipment. It can test various working performance indicators of automobiles and find faults and their causes without disassembling the automobile or assembly. It is mainly used for diagnosis before automobile maintenance and quality inspection after automobile repair. Vehicle supervision departments also use it to conduct regular supervision and inspection of vehicles.

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.

Reference address:Design and implementation of a truck voice alarm

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

Latest Automotive Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号