Review of KIWI - Precision Timestamp Utility



The following is a review of a "prototype" version of KIWI. It is written by Art Lucas (IOTA). Art is also conducting more thorough tests on accuracy. I will post those here as soon as I receive them - Geoff...




Tests of a GPS Based Event Timer KIWI by Arthur C. Lucas

Introduction.

This report describes hardware construction and performance
testing of the KIWI software designed for precise and accurate
timing of astronomical events. the software is provided by Geoff
Hitchcox with instructions for hardware implementation. The
software and associated hardware perform well as implemented by
this author.

2.0  Parts List

        KIWI.EXE
        Garmin 35HVS, OEM GPS detector
        Laptop PC,  I used Toshiba Satellite
        DB25 female connector with solder pots
        DB9 male connector with solder pots
        9-pin serial connection cable
        Project box 4x6x2
        Battery, 6 volts or greater
        Banana Jacks (3)
        Toggle switch for battery power
        resistors, 10K, 15k, 4.7k,
        LED's (2)
        Pushbutton switch

3.0  Information Resources.

        KIWI instructions
        Garmin Tech manual from web site.  Excellent 37 pages.
        Go to www.Garmin.com
        GPS Standard sentences from web are useful but not required
             http://home.mira.net/~gnb/gps/nmea.html

4.0  Construction.  

I chose a working box to interface between the GPS sensor and
the computer.  Make it roomy so construction is easy and
adaptations are allowed. I used a 6x4x2 inch plastic box.  The
long, multi-conductor wire from the sensor has color coded
wires.  The tech manual tells what each color means. Contrary
to the KIWI instructions (my copy) you need to connect both rx
and tx from serial port 1 of the Garmin 35.  This allows
downloading the data as it arrives and setup which is required
initially.

4 wires need to be connected

        rx1
        tx1
        gnd
        time 1pps

Note that rx1 from the Garmin 35 must be connected to tx from
the computer serial port. I have a tattered copy of RS-232
Simplified by Byron W. Putnam which I use to verify pin
connections although they are given in the KIWI instructions.
Don't try to work with the other pins that make RS-232 very
complicated.

I chose a rather heavy, 6 volt, sealed, lead acid motorcycle
battery as I use these for a lot of field instrument projects.  
My battery was Yuasa NP4-6, 6 volt, 4.0 Ampere-hour.  
Alternatively, 4 or 5 D cells will do the job.  You could use 
one 9-volt battery but you'll be constantly wondering if its 
going to run down.  My arrangement gives about 20 hours of run 
time on a full charge.  I charge at 7 volts until the charging 
current goes to zero.

I provided for charging with banana plugs and brought out the
1PPS signal on an RCA audio connector.  If you elect not to use
a rechargeable battery, you might consider using the banana 
plugs as battery check points so as to determine the status of 
the batteries.  There are many options in putting the box 
together but none of the decisions involve complicated 
electronics.

The pushbutton switch and cable need careful consideration.  I
chose a switch which mounts in a ½-inch hole.  Before soldering
the 2 connections to it I slipped a 3-inch length of Tygon
tubing onto the wire.  After soldering I pushed the Tygon tubing 
up onto the threaded barrel of the switch so as to make a solid 
gripping surface for my fist as I press the pushbutton with my 
thumb.  Think about it.

I did include an npn transistor to invert the 1PPS signal.
That's the only active element in the box except for 2 led's.
One blinks the 1PPS and the other indicates power on.

5.0  Programming of the GPS.  When turned on and fed to the KIWI
the GPS will transmit.  If you select option 2 on KIWI you will 
see data strings stream across the screen.  The 1PPS signal will 
likely not be enabled.  Mine was not.

A WINDOWS based program is available from Steve Preston which is
useful in programming these functions.  I describe what I did as
a matter of record.

5.1.  Disable some sentences.  A lot of time is used up in
transmitting the many sentences. Being frugal,  I elected to
disable all but two of them, $GPGGA and $GPRMC.  I believe only
the latter one is required by KIWI.  To disable sentences refer
to the Tech manual.  I did this using a short Microsoft
QUICKBASIC 4.5 routine.


  'myread4 see text for ENABLING/DISABLING

  CLOSE 1
10   OPEN "com1:4800,n,8,2,RS,CS,DS,CD" FOR RANDOM AS #1 LEN = 14000

100 IF LOC(1) < 1 GOTO 100
a$ = INPUT$(1, #1)
IF a$ = CHR$(13) GOTO 100
PRINT a$;
c$ = INKEY$: IF c$ <> "" THEN GOSUB 2000

GOTO 100
'strike e to enable GPRMC.  Change to 0 to disable
'strike P to enable 1pps at 60 ms pulse width
2000 'act on keystroke
if c$ = "e" THEN PRINT #1, "$PGRMO,GPRMC,1"
IF c$ = "p" THEN PRINT #1, "$PGRMC,,,,,,,,,,,,2,12,10"; CHR$(13); CHR$(10);

IF c$ = "v" THEN PRINT #1, "$PGRMCE"; CHR$(13); CHR$(10);
RETURN

5.2.  Enable the 1PPS.  Again, my 1PPS signal was not enabled.
To enable it I referred to the tech manual and wrote this short
Microsoft QUICKBASIC 4.5 routine.  It did not immediately
respond.  I turned power off and then back on and it was
enabled.

6.0  Tests.

While an ultimate test of the accuracy and precision of the
method is well beyond this laboratory, tests in the frame of 
reference of the amateur observer have been performed.

6.1.  Compare to WWV.  A 2-channel, 100 MHz, oscilloscope was
used to compare the GPS pulse to the radio received, WWV signal.
The 1PPS, GPS signal was fed to channel 1 and the oscilloscope
synchronized on the negative going leading edge of the signal.
The earphone output of a radio receiver tuned to 10,000 kHz was 
then input into channel 2.  Using a sweep speed of 1 ms/cm, the 
1 second tick was seen to appear in steady form at approximately 
4 ms after the start of the sweep.  This is consistent with the 
time delay in propagation from Ft. Collins, CO to Stillwater, 
OK.

Further, a limitation of the WWV signal which has been discussed
among timing afficionados was observed by switching to a
frequency not receiving well at that time.  The WWV signal was
seen to waver in phase and delay as propagation moved from 
direct to bounce off the upper atmosphere.  While these effects 
are well beyond the accuracy and precision required by the IOTA 
task, the observations do demonstrate the proper performance of 
the system.

6.2.  Repeated test vs 1 min on WWV.  The absolute value of the
reported time was checked by using the pushbutton switch to find
the Universal Time of start of each WWV minute.  The values
reported for 10 successive minutes were:

14:00:00.222
14:01:00.164
14:02:00.168
14:03:00.167
14;04:00.184
14:05:00.204
14:06:00.201
14:07:00.151
14:08:00.178
14:09:00.248

My average response time was:   0.189 seconds late
The std dev on my response was: 0.030 seconds

6.3.  To check for response to short events I timed each 1 
second click from WWV starting from the 1 minute tone.  The 
values reported were:

14:40:00.202
14:40:01.185
14:40:01.978
14:40:02.899
14:40:03.922
14:40:04.932
14:40:05.976
14:40:06.968
14:40:07.929
14:40:08.841
14:40:09.843

My response varied as I fell into step with the metronome, but
all values were sensible indicating that KIWI will time 
intervals as small as or smaller than the human response.

My average response time was:   0.0168 seconds early
The std dev on my response was: 0.117 seconds

In a subjective test of the ability of the program to report
timings, I pressed the pushbutton as rapidly as I could in order
to press the largest number of observations into a single
second.  I was able to get 5 reports into a single second.

7.0.  Alternate Computers.

The program was operated on 4 separate computers.

        Toshiba Satellite PS 225U-M91J0 (1 yr old)
        Zenith Mastersport 286 vintage 1985
        Packard Bell Desktop PC
        Toshiba Satellite PA1224UV (7yrs old)

There was no difference in performance on any of these computers.

8.0 Change Recommendations.

On the surface, it would seem easy to put an option in the menu
to change the sense of the input, 1PPS, sensing.  This would 
obviate the need for the user to implement a hardware inverter.  
The Garmin 1PPS goes high on the time mark while the software 
requires a negative going signal.  The user should pay 
particular attention to seeing that this happens properly as an 
unsuspecting user would see all else work except that the 
measurement would be a large fraction of a second in error.

A few functional changes were made by the author of KIWI.EXE
during the conduct of these studies.  The spirit of cooperation
and skill in making those changes was commendable.

9.0 Summary.

Construction of the interface was easy, requiring about one day
including shopping for parts.  Human factors of the software are
good, centering around simple menu selection.  The final
operating mode takes one away from the computer which needs no
attention, to the telescope with pushbutton in hand.  The
precision and accuracy of the method is well beyond the human
response limit.  An observation of an occultation is finally
limited by knowledge of the personal equation only.  With that
equation in hand, one is immediately prepared to report an
observation in Universal Time at latitude and longitude.


Geoff (author of KIWI) makes the following comments in reply! Regarding the 1PPS Polarity situation: -------------------------------------- Because of the high speed assembler code used throughout, changing the polarity in software is a non trivial software change (it would also compromise accuracy). It would also mean if a person did not configure the software correctly then readings could be up to nearly a second out (most PPS pulses are short duration). Also most new OEM boards are 3.3 volt, connecting to the PC without a "buffer" would damage the GPS. So I feel for the cost and time of adding a single buffer transistor, much needed isolation is provided, and once wired and tested there is NO possibility of subsequently getting the phase wrong. Many thanks to Art who has provided a thorough document of his implementation of the KIWI software. I'm sure it will be of great help to those designing their own project.