0 Introduction
As an important part of the vehicle information system, the vehicle positioning system uses GPS and other devices to achieve vehicle positioning with a certain accuracy, including vehicle posture information such as position, speed and driving direction. Following some countries, some scientific research institutes and universities in my country have also begun to study their own vehicle positioning systems, and the market is unprecedentedly prosperous. However, the traditional system has single functions and low integration. With the popularity of ARM processors around the world, 32-bit RISC embedded processors have become the mainstream of embedded applications and designs. At the same time, embedded Linux is a very good free operating system kernel with the characteristics of stability, good portability, excellent network functions, complete support for various file systems, and rich standard APIs. Therefore, this article provides a set of advanced and engineering practical vehicle positioning system overall solutions, which greatly improves the system's performance, integration and scalability.
1 System Hardware Design
1.1 Overall hardware design of the system
The vehicle information system in this paper consists of the following parts: main control part, positioning part, communication part, data acquisition part, and display part, as shown in Figure 1.
Figure 1 Overall hardware design of vehicle positioning system
The main control part uses Samsung's S3C2410 based on ARM920T and Linux embedded system platform to complete the control of the entire system. It mainly includes the design of power supply circuit, clock circuit, reset circuit, storage module circuit, JTAG interface circuit, serial port circuit, LCD interface, SPI interface and key circuit. The main control module is connected to the expansion module through the serial port, SPI interface and LCD interface to form the entire hardware system.
1.2 GPS module hardware design and production
The positioning part uses a self-designed and manufactured GPS receiver module based on the LEA-4S chip of Swiss U-BLOX Company. The overall design of the GPS receiver module is given here, as shown in Figure 2.
Figure 2 Overall design of GPS receiver module
The GPS part of u-blox is divided into two parts. The digital/analog separation design method is adopted to effectively improve the module's anti-interference ability. In the process of hardware design and production, it is also divided into two steps, namely the module part and the digital part. The analog part is mainly composed of the antenna access terminal and the antenna power supply part/detection circuit.
The antenna uses a 3v powered active antenna with a gain of about 27dB and a noise factor of about 1.5dB. The antenna access module is relatively complex. The signal frequency received from the GPS active antenna is high and selected as 1.575C, which belongs to the micro-wave range. The PCB design needs to meet the impedance matching of 50Ω from the antenna base to the module RF_IN end.
The module power supply voltage regulator circuit is a 5V to 3V five-pin LDO, which has a high voltage stability accuracy, requires the output ripple to be below 50mV, and the current to be about 150mA. Here, Seiko's SOT-23-5 packaged LDO S-1112 3.0V is selected to meet the power supply requirements. The backup 3V rechargeable micro lithium battery is used for data storage.
The selection circuit is the baud rate selection and speed selection. Or the startup speed and other selections, generally the default value can be used.
The digital hardware is relatively simple. LEA-4S has two TTL level outputs, with baud rates of 9600/11520, supporting the international GPS protocol NMEA and u-blox's UBX binary format. In this design, ASCII code is extracted through serial port O, and serial port data is converted to RS232 level through MAX232 level. In addition, the sending and receiving ends of the GPS module are cross-connected to the DB9 port after level conversion. [page]
Software platform constructionThe construction of the system's software platform is actually the transplantation of the embedded Linux operating system, which mainly includes 4 steps: establishing a cross-compilation environment, transplanting the boot program, compiling the kernel, and generating a root file system.
The cross-compilation tool is mainly composed of gcc, binutils and glibc. Since it is complicated and meaningless to re-establish a cross-compilation tool chain, this article uses the existing tool chain. Therefore, the process of establishing a cross-compilation environment is actually the process of unpacking the tool package cross-3.3.2.tar.bz2.
The bootloader transplanted in this article is vivi developed by Mizi Company in South Korea. First, create an armsys2410 directory in the root directory and execute the decompression command for vivi_armsys.tgz. After decompression, enter vivi_armsys. Execute the command makememmonfig, then select the "Load on Alternate Configuration File" menu, and then write arch/def-co-igs/smdk2410 to cut vivi. Execute the make command to compile and generate the vivi binary file in the vivi_armsys directory. Finally, burn it to Flash.
The kernel is compiled by using the command make menueorffig to configure the kernel; the command make dep is used to establish dependencies; the command make zlmage is used to build the kernel. The Linux kernel compressed image zhnage is obtained. Finally, the compressed image file zlmge is loaded into the flash memory by using the download command in the vivi command prompt mode.
Linux supports multiple file systems. cramfs is a file system written by Linus Torvalds that has only the most basic features. This article uses the mkcramfs tool to create and compress the existing cramfs file system in the host. Finally, it must be burned to the corresponding part of the flash.
3 GPS module driver development
Linux divides devices into two basic categories: character devices and block devices. Character devices perform sequential read and write operations in units of single bytes, usually without using buffering technology; while block devices store and read data in fixed-size blocks.
The GPS module driver is based on the UART driver and adds the parts for initializing the GPS module and processing the output data of the GPS module to build an independent driver module. When the navigation system enters the real-time navigation working mode, it is connected to the system kernel to realize the GPS function.
3.1 Initialize/Clear Module
In the initialization program segment, the registration of the GPS device, the creation of the device node and the initialization of the serial port related registers must be completed. Part of the code is as follows:
3.2 Two data structure definitions
The ultimate goal of the module driver is to obtain GPS information, so standardizing GPS data is beneficial to the reliability and speed of data transmission.
struct GPS_DATA{
unsigned int hour; //Hour, 24-hour system
unsigned int minute; //minute
unsigned long Second; // seconds, precision three decimal places
unsigned long latitude; //latitude
unsigned char southornorth; //Latitude belongs to the north and south sign code
unsigned long longitude; //longitude
unsigned char eastorwest; //longitude belongs to the east and west sign code
}; //It includes several important data required in the navigation system.
In addition, there is a definition of the driver module file operation structure. That is:
static struct file_operations gps_fops={ead:gps_read,
rite:gps_write,
octl:gps_ioctl,
open:gps_open,
elease:gps_release,
}; //Defines the device operation mapping function structure.
3.3 Driver module operation
When the navigation system enters the GPS navigation mode, the system first registers the GPS module to the operating system to implement the initialization process, and then opens the device through the gps_open function. In this process, the application for resources such as interrupts, buffers, and timers is completed to prepare for GPS data reading. Writing command words to the module through gps_write() is to autonomously select the working mode, and gps_ioctl() is to select the serial port transmission mode to match the GPS module transmission mode. The application will then create an independent process to read GPS data gps_read(). When there is no data, the process will remain in sleep mode waiting for data. When there is data, it enters the interrupt processing module, completes the data analysis, and generates the GPS_DATA data structure for navigation. This process is terminated with the switching of the navigation mode. At this time, in addition to closing the process, it is also necessary to use gps_release() to release all the resources applied for and close the device. [page]
3.4 Application Implementation
The GPS module outputs NMEA0183 statements through the serial port, and the application mainly completes the collection and analysis of GPS data. There are more than ten types of NMEA0183 output statements, and any positioning statement contains certain positioning data. Since the statement starting with "$GPRMC" contains all the positioning information required by this system, this system only needs to study this type. The meaning of each symbol bit of this type of positioning data is as follows.
Table 1 Description of the basic format of $GPRMC frame
The overall design process of the application is shown in Figure 3.
Figure 3 Overall block diagram of software design
As can be seen from Figure 3, after the system starts running, the first thing to do is to initialize the serial port, which is to initialize the GPS module, including setting the baud rate, data bit, check bit, etc., and then start receiving GPS data. That is, read data from the serial port. The read data is saved in BUF; then enter the data parsing and extraction stage. By checking whether BUF is not equal to "c", it is judged to be $GPRMC; if so, it starts to extract information such as latitude and longitude, time, etc. and store them in the structure GPS_DATA. Finally, it is displayed on the LCD.
4 Conclusion
This article presents a total solution for the GPS positioning system based on ARM9 and embedded operating system Linux. It includes the overall design of the system, the GPS module production plan, the development platform construction, and the design of GPS drivers and applications. Compared with the vehicle-mounted positioning systems on the market, this design has improved functionality, scalability, and stability. Based on this system, the next step of the vehicle-mounted positioning system will focus on the writing of applications, including algorithms to improve GPS positioning accuracy, and the development of a more friendly human-computer interaction interface.
References:
[1]. RISC datasheet http://www.dzsc.com/datasheet/RISC_1189725.html.
[2]. ARM920T datasheet http://www.dzsc.com/datasheet/ARM920T_139814.html.
[3]. PCB datasheet http://www.dzsc.com/datasheet/PCB_1201640.html.
[4]. TTL datasheet http://www.dzsc.com/datasheet/TTL_1174409.html.
[5]. MAX232 datasheet http://www. dzsc.com/datasheet/MAX232_1074207.html.
[6]. RS232 datasheet http://www.dzsc.com/datasheet/RS232_585128.html.
Previous article:ARM embedded automotive digital virtual instrument based on MB86R01
Next article:Design of Ultrasonic Car Parking Anti-collision Alarm Using MC68HC705J1A
Recommended ReadingLatest update time:2024-11-16 19:49
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- DSP5402 development board schematic diagram
- Please tell me the setting function of deep sleep
- Driver transplantation of pedometer bracelet based on F103 and X-NUCLEO-IKS01A3
- [Jihai APM32E103VET6S Development Board] Review 1. Unboxing
- Using LM339 to generate triangle wave
- Are there any homemade downloaders such as st-link and j-link?
- [2022 Digi-Key Innovation Design Competition] Project Sharing Post 2: Porting Emwin5.28 on the stm32f7 official development board
- PWM+RC Circuit Analysis
- Using BTool and CC2640R2 LaunchPad as Downloader
- EEWORLD University-How to use TI GaN in high-efficiency power factor correction (PFC)?