1. Introduction
GPS (Global Positioning System) is a navigation, positioning and timing system established by using the signals transmitted by 24 GPS earth satellites in the United States. At present, the GPS system is widely used in the fields of navigation, geodesy, precise timing, vehicle positioning and anti-theft.
GPS timing is one of its main functions. The accuracy of the time signal is directly related to people's daily life, industrial production and social development. In order to meet the needs of precise positioning and navigation, the GPS clock established its own dedicated time system at the beginning of system design and experiment. The system is abbreviated as GPST, which is kept and timed by the high-precision atomic clock of the GPS master station. Due to the development of related technologies such as computer technology, network technology, communication technology, GPS positioning technology, and the reduction of the price of GPS OEM boards, GPS clocks have the possibility of providing high-precision timing for various application fields.
This paper aims to design a high-precision clock system suitable for the need of precise timing by utilizing the precise timing function provided by GPS and using single-chip microcomputer technology, and display it through LCD.
2. GPS timing principle
The GPS time system is a time system defined and used by the GPS system. The satellite positioning system uses time as the basic observation quantity. Since the satellite flies at high speed, the time system must be very accurate, otherwise it will cause a large distance error. The GPS time system uses the atomic frequency standard as the time reference and takes 0:00 on January 6, 1980 as the starting point. It does not have leap seconds, and its time can be kept within 100 microseconds of the coordinated time. The error is announced regularly, and the satellite clock error published in the ephemeris file is the clock error relative to the GPS time system.
The basic principle of GPS timing is: the satellite continuously sends its own ephemeris parameters and time information. After receiving this information, the user calculates the three-dimensional position, three-dimensional direction, movement speed and time information of the receiver. Here, only the time information of the GPS timing system is needed. If (x, y, z) is the position of the receiver, (xn , yn , zn ) is the position of the known satellite, then solving the following equation can get x, y, z and standard time T:
(x-x 1 ) 2 +(y-y 1 ) 2 + (z-z 1 ) 2 =C 2 (T+ T-T 1 - 1 )
(x-x 2 ) 2 +(y-y 2 ) 2 + (z-z 2 ) 2 =C 2 (T+ T-T 2 - 2 )
(x-x 3 ) 2 +(y-y 3 ) 2 + (z-z 3 ) 2 =C 2 (T+ T-T 3 - 3 )
(x-x 4 ) 2 +(y-y 4 ) 2 + (z-z 4 ) 2 =C 2 (T+ T-T 4 - 4 )
Where △T is the time difference between the user clock and the standard time of the GPS master clock; Tn is the transmission time of the signal transmitted by satellite n; and is the time difference between the atomic clock on satellite n and the standard time of the GPS master clock [1] .
3. System composition and hardware and software implementation
3.1 Introduction to the GPS board used in this design
This design uses the A12 GPSOEM receiver board produced by THALES-NACIGATION. It uses advanced semiconductor design methods and has excellent characteristics such as small size, low power consumption, stable performance, and high cost performance. It can be used to easily and quickly develop various GPS application systems. Its main performance indicators are as follows:
Receiving channel: 12 channels of parallel reception, capable of tracking 12 satellites simultaneously;
Timing accuracy - less than 400ns, no cumulative error;
Data update time: 1s;
Size and weight: 39mm×60mm×10mm, approximately 40g;
Data output format: NMEA-0183 v2.0; RTCM-sc104 v2.0;
Ambient operating temperature: -30℃~+80℃;
Normal operating parameters: voltage 5 (1±0.05) V; current 70 mA.
Figure 1 GPSOEM board A12
The GPSOEM board provides hardware interfaces as shown in Table 1:
Pins |
Signal Type |
Function |
1 |
VCC |
power supply |
2 |
V_ANT |
Antenna power interface |
3 |
V_BACK |
Backup power supply |
4 |
GND |
land |
5 |
RTCM |
Receive signal port B |
6 |
RXD |
Receiving signal port A |
7 |
TXD |
Send signal interface A |
8 |
1PPS |
1 pulse output/second |
Table 1 GPS output interface definition
The output data logic level is TTL level, so it can be easily connected to the microcontroller. The format bit defaults to: baud rate 4800, 8 data bits, 1 stop bit, no parity bit. GPS output data is output in NME-0813 format, and the data code is ASCII code characters. This design uses the RMC format in NME-0813. The following is a set of data output by GPS: $GPRMC,140736.00,A,3800.9040,N,11226.5364,E,00.0,355.6,121106,04,W,D*3B, where 140736.00 represents 14:07:36.00, and 121106 represents November 12, 2006. According to system requirements, we need to extract this data. The time obtained by GPS is Greenwich Mean Time (zero time zone). To obtain Beijing time (Eastern Time Zone 8), you must add 8 hours to the extracted world time to obtain Beijing time.
3.2 System composition and implementation
The system uses ATmega128 microcontroller, which has rich external resources, and uses its USART1 to communicate with the GPS receiver:
Its overall hardware connection is shown in Figure 2.
Figure 2 GPS clock implementation structure
The LCD display uses a 3510i color LCD display with a controller S1D15G14. The S1D15G14 comes with an LCD driver with an LCD power drive circuit, which can achieve color display on a single chip, can display 4096 colors, and the resolution is 98x67. It is connected to the microcontroller ATmega128 via a serial port.
The main program extracts GPS data using the query method [2] ,
Figure 3 Program flow chart
GPS clock is implemented by software on ATmega128 [3] (where the LCD function is the display function):
if(USART1_Receive() == '$') // USART1_Receive() is the serial port receiving function
{ while((gps_data_buff[counter ++] = USART1_Receive()) != '*');
data = 1; j = 0; i = 0; //Receive data and put it into gps_data_buff[ ] array
for (i=0;i<69;i++)
{if(gps_data_buff[i] == ',')
{ data ++ ; j = 0;
}
switch(data)
{ case 1: break;
case 2: time[j ++] = gps_data_buff[i + 1];time[j] = '' ; break;
case 3: break;
case 4: break;
case 5: break;
case 6: break;
case 7: break;
case 8: break;
case 9: break;
case 10: day[j ++] = gps_data_buff[i + 1];day[j] = '' ; break;
default: break;
}
}
LCD_FillArea( 0, 0,98,67,COLOR_WHILE); // LCD screen refresh function
LCD_WriteSpecHZ_GPS_time(2,0,COLOR_BLUE); // LCD displays time in Chinese characters
LCD_WriteEnglishString(2,16,time,T_TS,COLOR_BLACK,0); //LCD display time
LCD_WriteSpecHZ_GPS_day(2,32,COLOR_BLUE); //LCD displays the date in Chinese characters
LCD_WriteEnglishString(2,48,day,T_TS,COLOR_BLACK,0); //LCD displays date
}
The final result is shown in Figure 4 below: The displayed time is 10:09:00.00 on December 15, 2006
Figure 4 GPS clock extraction and LCD display effect
4. Conclusion
The author's innovation is to use ATmega128 to extract GPS high-precision clock and realize the display of GPS clock on LCD, which has the characteristics of high accuracy, low cost and easy implementation. GPS precision clock is mainly used in important public buildings in cities, such as stations, docks, parks, traffic intersections, landmark buildings and other places, as well as mobile and fixed telephone timekeeping in the telecommunications industry.
References:
[1] Song Wenguang, Wu Chunxue, Jiang Qiongqin. GPS timing function and its application in inland waterway navigation[J]. Microcomputer Information, 2006, 9-1: 258
[2] Gui Chengkun, Wu Linda. Design and implementation of an automatic clock based on GPS time source. Shiyan: Journal of Hubei Automotive Industry College. 2004, 6
[3] Gao Xiang, Tao Wei. Design and implementation of GPS high-precision clock for DSP system. Beijing: North China Electric Power Technology, 2003, 8
Previous article:Application of AVR single chip microcomputer in multi-circuit data acquisition device
Next article:Design of intelligent voice system using ISD2500 and ATmega8 microcontroller
Recommended ReadingLatest update time:2024-11-16 20:57
- Popular Resources
- Popular amplifiers
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
- Ask about the SYN480R circuit
- TI C6748 chip PRU part assembly software package sprc940.zip
- The new issue of "Analog Dialogue" is online, free download!
- Is there any domestic chip factory that makes 74 series chips?
- Vias
- Do you know about energy storage emergency power supply?
- After adding shutdown and low power consumption, stm32 will run away after working for 8-9 hours
- [Silicon Labs Development Kit Review] +6-axis inertial sensor ICM-20648
- Welcome our new moderator, Azuma Simeng~~
- Thanks to all the staff of Electronic Engineering Forum