LeapSecond.com :: Lab Notes
MG1613S GPS Receiver



The following is a brief performance report of the "MG1613S Bluetooth/RS232/USB UART GPS Module Demo Board", a GPS receiver with 1PPS output recently offered by Sure Electronics (CN).

The receiver appears to track position to within a couple of meters and the 1PPS output is stable to about 22 ns RMS (60 ns peak-to-peak). More technical details below.


The fully assembled demo board comes well-packed in a unique 6-sided hand-made box and includes a GPS antenna and USB cable.

View of top and bottom of board. The smudge on the bottom is soldering residue.

GPS chip is Skylab SKG16B, RS232 chip is Sipex SP232ECN.

74HC00D, 74HC04, USB chip is SiLabs CP2102.

Some views of less than pretty PCB workmanship.

Power (+5 VDC) comes from USB. NMEA output is available through either or both the USB (virtual com) port and the DB9 serial port (9600 baud 8N1). The 1PPS output is idle until the board has GPS lock. See the five bright LEDs and nine well-labeled input/outputs (easy to install 0.1 inch headers). Although the board is factory new, it appears to have been built to a lower than usual standard.

The demo includes GPS patch antenna and USB cable. The board worked the first time. USB power is very convenient. There are no jumpers and no software configuration. No OS drivers are required for the serial or USB interface. Indoor signal acquisition was quick. All this for $40. Wow.

Position Stability

NMEA data is available from either or both the USB (virtual com) port and the DB9 serial port (9600 baud 8N1). The four sentences output are: GPGGA, GPGSA, GPGSV, and GPRMC. Refer to the manual (or most any GPS manual) for details on NMEA GPS formats. Here is a sample output burst during each second.

The following position and timing analysis was made using 3 days of data (3×86400 = 259200 points). The GPGGA messages give a lat/lon/alt estimate each second. Note the resolution of NMEA lat/lon is 0.0001 minute and the resolution of NMEA altitude is 0.1 meter. Simultaneously a hp 53132A time interval counter measured the 1PPS output with 150 ps resolution. More on timing later.

To get a rough feel for position stability one can plot the NMEA lat/lon directly:

Although such a plot is trivial to make from NMEA data and it gives a rough idea of the position wander it is not correct for several reasons. 1) The data format is ddmm.mmmm and there are 60 minutes to a degree not 100, so the x-axis will not be linear if points cross a degree boundary (in this case we got lucky). 2) Except near the equator, one degree of latitude is not the same as one degree of longitude. One degree of latitude is about 111 km, while one degree of longitude is smaller than 111 km by cos(lat). 3) Negative latitudes or longitudes give mirror image plots.

To avoid these problems we convert the NMEA lat/lon to either degrees or meters. In this case, meters will be more convenient. The square grid plot is centered about the average position over 3 days.

So we see the position fits within a fraction of a 10 × 10 meter square. Very nice. The standard deviations are: 2.5 m lat and 1.5 m lon. The above wander plot shows all calculated positions but not how frequently each position occurs. One way to see this is with a histogram of latitude and longitude values. In the two plots below the x-axis is meters from the 3-day average and the y-axis is the number of occurences.

While we're at it can also plot a histogram of altitude values. The standard deviation of altitude is about 4.0 m.

Finally, another way to view the lat/lon/alt position estimates that come from the receiver each second is with a strip chart. The following is a plot of latitude, longitude, altitude over the span of 3 days. The x-axis is time and the y-axis is meters from the average, 5 meters per division.

Three days of latitude:

Three days of longitude:

Three days of altitude:

To this we can add, also from GPGGA, three days of NSV (number of satellites), 4 per division:

And three days of HDOP (horizontal dilution of precision), 1.0 per division:

A close look at the graphs suggests an approximate 24 hour pattern. A good way to verify this is to wrap each graph at 24 hours. Again, with 5 meters per division, the following is a plot of the first, second, and third day of longitude:

Similarly, the first, second, and third day of longitude:

Then, the first, second, and third day of altitude:

To further look for patterns, the first, second, and third day of NSV:

And finally, the first, second, and third day of HDOP:

In summary, the rms deviation from the mean for lat/lon/alt is 2.5, 1.5, and 4.0 meters, respectively. This suggests the rms timing error will be greater than about 15 ns.

Note the center of all these plots is the average position. The true position was unknown in this case because the supplied patch antenna location was indoors near a window at a non-surveyed location.

One further note is that the format of the NMEA message limits the resolution. With a ddmm.mmmm format the granularity is 0.0001 minutes. At 111 km per degree this is about 18 cm.

1PPS and NMEA Output

The following traces show the polarity and signal level of the 1PPS and NMEA outputs. The 1PPS pulse is 100 ms wide and the leading edge is the on-time mark. The NMEA output trails the 1PPS by more than 300 ms.

The 1PPS output is 3.3 V only. The GPS NMEA serial Tx/Rx is available as 3.3 V or 5 V on board or ±5 V (DB9 connector).

3.3V 1PPS output and 5 V (inverted polarity) TTL NMEA output

For fun we can decode the TTL data. In the idle (mark) state, the NMEA inverted-TTL output is H, where high is 3.3 or 5V and low is 0. The start (space) bit is L, data 0 is L, data 1 is H, stop bit is H.

Split into 10-bit frames:                LLLHLLHLLH LHHHLLLHLH LLLLLHLHLH ...
Note L=start and H=stop bits:            tLLHLLHLLp tHHHLLLHLp tLLLLHLHLp ...
Convert data L and H to 0 and 1:          00100100   11100010   00001010  ...
Reverse bit order within byte:            00100100   01000111   01010000
Convert to hex:                             0x24       0x47       0x50
Convert to ascii:                             $          G          P
Sure enough, the beginning of $GPGLL.

3.3V 1PPS output and ±5 V (true polarity) RS232 NMEA output

Similarly we can decode the RS232 data. In the idle (mark) state, the NMEA RS232 output is -V, where V is 5 or 10 or 12 volts, etc. The start (space) bit is +V, data 0 is +V, data 1 is -V, stop bit is -V.

Left to right on 'scope trace: ----------+++-++-++-+---+++-+-+++++-+-+-+---+++-+...
Split into 10-bit frames:                +++-++-++- +---+++-+- +++++-+-+- ...
Note +=starT and -=stoP bits:            T++-++-++P T---+++-+P T++++-+-+P ...
Convert data + and - to 0 and 1:          00100100   11100010   00001010  ...
Reverse bit order within byte:            00100100   01000111   01010000
Convert to hex:                             0x24       0x47       0x50
Convert to ascii:                             $          G          P
Sure enough, the beginning of $GPGLL.

1PPS risetime

The 1PPS is so fast I had to use a better 'scope to measure it.

Risetime: no load (1 MΩ) and 50 Ω load. 2 to 4 ns.

Falltime: no load (1 MΩ) and 50 Ω load. 3 to 6 ns.

NMEA Latency

As seen in one of the traces above the NMEA output starts at least 300 ms after the rising edge of the 1PPS pulse. Using a TIC (Time Interval Counter) this was measured more precisely, from the rising edge of 1PPS to the rising edge of the RS232 sart bit. Note that a single byte at 9600 baud is 1.04 ms.

In a 15 minute run (900 seconds) the mean latency was 350.2 ms with a standard deviation (jitter) of 10.7 ms.

Below is a plot of the jitter. Vertical scale is 25 ms/div (100 ms full scale). Horizontal scale is 0 to 900 seconds.

Latency and jitter over the USB virtual com port was not measured.

Timing Stability

The risetime of the 1PPS is excellent. A close look at the jitter in the 1PPS output shows quantization typical of GPS timing receivers (so-called sawtooth error). The plot below show 3 minutes of 1PPS error. Scale is 25 ns per division.

The period of the sawtooth varies gradually and randomly. Here are some other 3-minute snaphots found within the 3-day run:

There is no end to the variety. Here the pitch of the sawtooth is reversed:

The peak-to-peak amplitude of the sawtooth is about 60 ns. The 1PPS output has an rms error of 22 ns.

A note on "zebra" plots -- they do for linear strip charts what word-wrap does for a text editor. Typically there is just one pixel per point. At the end of the line they wrap around to the next line. In this way long duration strip charts can be displayed in a short-width plot. They are not unlike seismic recordings in their ability to convey fine patterns over a long duration of time in a minimum amount of space.

To appreciate how the sawtooth pattern slowly changes over time here are some wrapping strip charts that show two hours of time (10 minutes per line, 12 lines, read left-to-right, top-to-bottom):

Here is another two hours elsewhere in the data:

There are areas when the sawtooth is very fast and others where it is very slow. Fast is good since it makes reliable averaging happen quicker. It's as if the 1PPS signal were dithered for free. In these cases only a few tens of samples are needed to calculate an average 1PPS to ns levels. On the other hand, if the sawtooth period stretches out beyond tens or hundreds of seconds, then much longer averaging times are needed to properly determine the true 1PPS position. During these long stretches ("hanging bridges") the average observed 1PPS will be significantly biased from its true value.

For a most interesting view of the random, variable, and beautiful nature of 1PPS sawtooth here is the complete 259200 second run, 3 days of 1PPS sawtooth, in one large plot (3600 × 1800 pixels). Hopefully your browser will allow you to view it full-scale (scroll and pan as necessary).

Or a day at a time: sawtooth day 1, sawtooth day 2, sawtooth day 3.


Demo board:

Demo board with bluetooth:

Some versions may have been based on SkyNav GM10 GPS module:

Specs on the newer Mstar MG1613S receiver are here:

Other links of interest:


Notes to self

NMEA jitter
da in log167.txt hp fld 2 take 900 stats
da in log167.txt hp fld 2 take 900 zero | score .. 1 .025 1 900 120 6

Return to LeapSecond.com home page.
Comments/questions to tvb.