• Exercises recording instrument - 51rd based on the LPC2104 CPU automobile the Chinese electronic net

        Abstract: Introduction based on LPC2104 CPU automobile travel recording instrument. This recording instrument uses dodges the fast memory to take the memory carrier large capacity, realizes the second gap data acquisition and the memory using the timer interrupt mode, realizes with the advantage serial port interrupt mode with microcomputer’s data communication.

        Key word: Automobile travel recording instrument; LPC2104; Dodges the fast memory

    Introduction

    Along with automobile capacity’s increase, has traffic accident’s probability also to increase along with it, after having the accident, carries on the analysis, the judgment, the service with the traditional method to have certain difficulty. Thus, proposed to the people a question, is how prompt, the preparation analysis breakdown existence, analyzes accident’s responsibility objectively. From this relation to airplane upper garment “flight recorder”, once the aircraft accident, “the flight recorder” in material is judges the accident reason the important basis. Because its construction cost is high, the technology is complex, the use has certain difficult on the ordinary automobile. This article introduced that one kind of price is low, the function is complete, and can expand automobile travel recording instrument.

    This recording instrument uses brings ARM7 essence LPC2104 CPU to take master control machine, dodges the fast memory to take the memory carrier large capacity, has the precise clock circuit, transforms the simulation quantity using the high accuracy A/D switch gathering automobile sensor, and direct recording automobile signal light and so on each kind of switch quantity. Meanwhile realizes using the serial port with microcomputer’s data communication, saves the automobile travel record low information by binary file’s form to the hard disk on.

    1 system’s hardware design

    System’s overall frame as shown in Figure 1. Brings ARM7 essence LPC2104 CPU is the automobile travel recording instrument’s core, the overall system by the information acquisition module, the information processing and the storage module and the serial port connection module is composed.

    LPC2104 is a section of support real-time emulation which and track ARM7TDMI-S CPU Philips Corporation produces, the internal integration has with the internal memory controller connection ARM7 local bus, with the interrupt controller connection AMBA high performance main line (AHB) and the connection internal peripheral device function VLSI peripheral device main line (VPB, ARM, AMBA main line’s compatible ultra large scale integrated circuit), and has inserted 128KB the high speed Flash memory. LPC2104 the ARM7TDMI-S disposition for the small end (Iittle-endian) the byte order, has seals small, the power loss low, the many 32 timers, many kinds of bus interfaces and reaches merits and so on 9 external interrupt, very suitable achievement automobile travel recording instrument’s master control CPU. At the same time, LPC2104 also has 128 bit width memory interfaces and the unique acceleration structure, thus enables 32 codes to be able to move under the biggest clock rate.

    2 information acquisition module design

    Automobile travel recording instrument request real-time record vehicles travel each status messages, therefore this system divides into the information acquisition module the switch quantity data acquisition module, the simulation quantity data acquisition module, the clock data acquisition module.

        2.1 switch quantity data acquisition module

    This module expands 16 bit parallel input port using the 74LS165 parallel input 8 shift registers, its hardware circuit as shown in Figure 2. And using the LPC2104 3 I/O mouth line expansion is 16 input port lines, in the chart expands 16 input lines by 2 piece of 74LS165 series connection, CLK is the clock pulse input end, D0-D7 is the parallel input end, first level’s data out-port QH is connected with latter level’s signal input end SIN, when S/L is the low level, the permission parallel posts the data, S/L is when the high level permits the serial shift. Before like this about turn signal, headlight, enabling signal, brake lamp signal and so on 16 group switch quantities after electro-optical coupler isolation the parallel input to 2 piece of 74LS165, passes through the 74LS165 transformation after again, the serial output to LPC2104 carries on processing.

    2.2 simulation quantity data acquisition module

    When carries on analog data gathering, the water temperature, the water level and so on 8 group sensor gathering signal after the simulated signal recuperation link, its installation in A/D in the switch reference voltage Vref decision’s full scale input voltage signal, then carries on first after a/D switch a/D transformation. This module uses TLC0838 8 groups 8 which US Texas Instruments Company promotes to approach the mold, the number switch, the sampling frequency is 100kHz gradually, uses the SPI bus interface with the external communication. LPC2104 the SPI bus interface which and TLC0838 inlays through among them carry on the correspondence, its hardware circuit as shown in Figure 3. And SCK is the SPI main engine input or from machine the input clock, MOSI is the SPI main engine to from machine the data transmission, MISO is SPI from machine to main engine’s data transmission, SSEL is SPI from machine the choice.

    The automobile speed’s survey is the signal impulse which produces through the counting velocity generator realizes. This system counts the speed signal impulse using at89C2051 monolithic integrated circuit. This monolithic integrated circuit may establish one to defend the gauge to count the speed signal impulse, and transforms it automobile’s actual measuring range. Meanwhile may calculate automobile’s speed according to the traveling schedule and the time, and through serial port UART0 data transfer for LPC2104.

    2.3 clock data acquisition module

    For the record driving’s time, enables the travel recording instrument the real-time record automobile condition, uses the special clock module to provide the time signal, this system selects the DS12887 clock circuit. DS12887 was surmounts 2000 the clock circuit, used 4 figure expression year the calendar system. Electric circuit’s crystal oscillator, the oscillating circuit, the charging circuit and may charge the lithium battery and so on to seal together in the chip stop the side, composes integrated circuit module which thickens. DS12887 can deposit and withdraw and renew the current time automatically, LPC2104 may through read DS12887 the internal time indice register to obtain the current time and the calendar, may also enter the code or the BCD code initialization electric circuit’s 10 time indice register through the choice binary.

    3 information processing and storage module design

    Because the Flash memory structure being suitable is the solid state saves, the EPROM memory structure is suitable in the dynamic storage, therefore, this system according to the actual need, the useful Flash solid state memory and the EPROM dynamic storage unifies the way carries on the data storage and remembered, namely saves gathering with the Flash solid state the automobile condition data, with EPROM dynamic storage Flash newest memory sector number and memory address. Dodges the fast memory to select MX29F800BTC which the beautiful letter company produces, EPROM selects Microchip Corporation’s 24C32, simultaneously the I2C bus interface which and 24C32 inlays using LPC2104 in carry on the correspondence.

    When this system work, first reads the sector number which and the memory address by LPC2104 master control CPU from 24C32 Flash saved recently, then take this address as the reference, take this address’s address value as the Flash beginning address, take this address’s next address value as the Flash beginning address, carries on the memory according to the order. Flash needs to save the data has 16 group switch quantity information, 8 group simulation quantity information to have and the clock information. This system uses two bytes (altogether 16) to save 16 group switch quantity information, uses 8 bytes the storage spaces to save 8 group simulation quantity information. In order to save the storage space, the system each time saves when by no means the gathering data storage time symbol. Because the data acquisition carries on by the fixed second gap, therefore, the system is only when just started to move and each sector reference gathers and saves the clock signal to take the timer, then scolds to one’s face according to the acquisition time take these timer as the reference.

        The system saves software flow as shown in Figure 4. When this system rewiring electricity movement, needs start-of-record gathering the time information. Because the system power source is provides by the automobile power source, therefore starts the time which gathers is also the time which the automobile starts, starts the timer which by this as the automobile goes. In the program run, establishes an automobile by the master routine to start the symbol, before first time writes the data the automobile starts the sign to be effective, then first judges the current memory address whether to have some sector first address, if is, acts according to writes the sector the request to start place the memory current clock signal in the seventh byte, otherwise, starts in the current memory address place with 10 byte memory current clock signal, records starting time which the automobile starts to move, then eliminates the automobile to start the symbol. The sector starts the address place record time information whether is the starting time which the automobile starts to move, may act according to the preceding sector record the time information to carry on the judgment. If around two sector record’s data is continual, then the latter sector record’s time information is not expressed that the automobile starts the starting time which moves, otherwise the situation is opposite.

    4 serial port connection module design

    The computer may momentarily read the data which through the serial port the travel recording instrument saves. Between the travel recording instrument and computer’s serial port correspondence follows the RS232 agreement. When serial communication, LPC2104 in turn the data read-out which and saves Flash in sends out after the UART0 serial port, then gives the computer after the MAX232 level switch, receives this data again by the computer through the serial port.

    Figure 5

    5 concluding remark

    The automobile travel recording instrument use microcomputer through the serial port receive automobile travel’s data, and carries on the analysis processing to the data; 6.0 take the development kit using Visual C , compiles the microcomputer data analysis disposal procedure, the conformable display automobile moves the time condition; Using the graphical display various components’ profile, like the forward lamp switch situation, about the turn signal switch situation, opens the door the information, the brakes signal, the water temperature change situation (scope for 0℃~100℃) and so on. Installs this travel recording instrument on the automobile carries on the test, the result is also ideal, can satisfy the design requirements. Its test result as shown in Figure 5.

    Share/Save/Bookmark

    Friday, September 5th, 2008 at 11:02
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 2008 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3