GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL...

14
GPS Data Logger by KD5HM - page 1 GR-130/GR-135 GPS Data Logger Guide by Tom King, KD5HM The GPS Data Logger (GPS-DL) collects GR-130/135 Survey or Analysis data and adds precise GPS location and time information to each data sample collected. The unit also contains additional process- ing power to utilize this enhanced data. The enhanced Survey and Analysis data is stored to a built-in micro SD memory card for additional analysis and data preservation, allowing overlaying GR-130/135 CPM Survey levels on a detailed Google map for example. This guide provides the information needed to build the basic GPS Data Logger. Important Note: This guide does not provide detailed step-by-step details and assumes the in - dividual building the GPS Data Logger has the necessary experience to solder and assemble the various components used. Revision 04/14/2015

Transcript of GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL...

Page 1: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 1

GR-130/GR-135 GPS Data Logger Guideby Tom King, KD5HM

The GPS Data Logger (GPS-DL) collects GR-130/135 Survey or Analysis data and adds precise GPS location and time information to each data sample collected. The unit also contains additional process-ing power to utilize this enhanced data. The enhanced Survey and Analysis data is stored to a built-in micro SD memory card for additional analysis and data preservation, allowing overlaying GR-130/135 CPM Survey levels on a detailed Google map for example.

This guide provides the information needed to build the basic GPS Data Logger.

Important Note: This guide does not provide detailed step-by-step details and assumes the in-dividual building the GPS Data Logger has the necessary experience to solder and assemble the various components used.

Revision 04/14/2015

Page 2: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 2

Analysis Mode (optional Advanced item): Additional advanced software using a rugged graphics LCD for prospecting use is also being developed. The GPS-DL reads the 256 MCA channel data and key parameters for each Analysis performed. The GPS-DL can then provide running CPM plots, real time spectrum plots, real time strip plots for multiple Region of Interests, along with key data.

In the very early example of a spectrum plot above, 269 is automatically identified and displayed as highest peak in the analysis, and this peak is present on channel 55. GPS status is also turned on and shows the GPS receiver locked to 7 satellites while the GPS-DL is located inside the lab! Loca-tion, time, altitude and speed tags are added to each data sample collected, providing precise loca-tion and time geo-tagging for all Survey and Analysis samples collected!

The optional rugged LCD display shown above has high visibility in all lighting conditions. The GPS-DL is small and power consumption is low. Operation from a small, light-weight, and inexpensive Power Bank is capable of operating the GPS-DL for over 40+ hours in the field before recharging is needed.

Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD display.

Survey Mode: The GR-130/135 GPS Data Logger (GPS-DL) receives GR-130/135 Survey count data (CPS) and combines the data with the current GPS location and time information. This geo-tagged data is saved as a file on a micro SD memory card. The file is uploaded to GPSVisualizer.com to easily plot Survey levels on a detailed Google map!

Page 3: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 3

Contents

Introduction! 1-2Items Needed! 4-5Build Guide - Completed Circuit board Stack and wiring! 6Build Guide - Wiring Connection! 7!Serial Data Cable Wiring! 8Wiring Hint!! 8System Diagram ! 9Theory of Operation! 10GPS Data Logger Software! 11GPS Data Logger Screen! 11Sample Survey Plot on a Google Map ! 12Verifying GPS Module Operation! 12Viewing Additional Status Messages! 13Example Analysis of data recorded by GPSDL with ROI set for Cs-137! 14Credits! 15

Revision 04/14/2015

Page 4: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 4

Item Price

Arduino Mega 2560

https://www.adafruit.com/product/191

These are available at lower prices on eBay, but beware, the quality may suffer. I have a dead one on my desk. It was cheap!

$45.95

16 char x 2 line LCD I2C* Display YelloweBay item number: 310565065933 or similar

*This application requires the LCD has an I2C 2-wire interface!

$4.59

Ultimate GPS Logger Shield

https://www.adafruit.com/products/1272

$49.95

GPS External Active Antenna*

https://www.adafruit.com/products/960

Note: The internal antenna is very sensitive, but you will want this for mobile use.

$12.95

SMA to uFL RF Adapter Cable* - Needed to connect the antenna’s SMA connector to the uFL on the Ultimate GPS board.

https://www.adafruit.com/products/851

$3.95

Shield Stacking Headers

https://www.adafruit.com/products/85

$1.95

MicroSD Memory Card (4-8 GB SDHC)https://www.adafruit.com/products/1294

Note: You will also need a card reader for your computer if you don’t already have one.

$11.95

*The external antenna requires the SMA to uFL RF adaptor cable to connect to the GPS module!*The external antenna requires the SMA to uFL RF adaptor cable to connect to the GPS module!*The external antenna requires the SMA to uFL RF adaptor cable to connect to the GPS module!

Items Needed

Page 5: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 5

Capacitive Touch Sensor Toggle Switch

https://www.adafruit.com/products/1375

A standard switch can be used, but will re-quire modifying switch code for software!

$5.95

qty. 2 - 4-pin JST connector with wire leads.

Misc. Items - Case 4-40 screwsmisc hardwareHookup wire

To connect the GR-130/135 COM Port to the Data Logger, these 2 items are needed:To connect the GR-130/135 COM Port to the Data Logger, these 2 items are needed:To connect the GR-130/135 COM Port to the Data Logger, these 2 items are needed:

GR-130/135 Serial Cable

1/8” / 3.5mm stereo phone plugDB9 Cable ConnectorDB9 Chassis Connector for Data logger Case3-conductor shielded wire, approx. 1m / 3 feet

See the Build Guide section for wiring & de-tails for this op-tion.

RS232 to TTL Converter Module Board

eBay item number: 391026938050

$3.99

**IMPORTANT NOTE: The GPS Data Logger can also connect to the TTL level serial port on the bottom of the GR-130. See “GR-130 bott conn.pdf” in the Files folder for the Gamma Spectrome-try group for instructions for using this option.

**IMPORTANT NOTE: The GPS Data Logger can also connect to the TTL level serial port on the bottom of the GR-130. See “GR-130 bott conn.pdf” in the Files folder for the Gamma Spectrome-try group for instructions for using this option.

**IMPORTANT NOTE: The GPS Data Logger can also connect to the TTL level serial port on the bottom of the GR-130. See “GR-130 bott conn.pdf” in the Files folder for the Gamma Spectrome-try group for instructions for using this option.

Items Needed

Important - A micro SD memory card reader is needed to transfer the GPSDL Data to a computer!!

A micro SD card reader is required in order for a computer to read the Survey or Analysis data written to the micro SD memory card by the GPS Data Logger! These can be found online, at office supply and computer stores.

Page 6: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 6

Completed Circuit board Stack and wiring.

The fully assembled GR-130/135 GPS Data Logger.

Build Guide

Page 7: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 7

Build GuideThe Arduino Mega and LCD are fully assembled when purchased, so no assembly is required for these. Stacking headers do need to be added to the GPS Shield and a small amount of wiring is re-quired to connect the components.

1. Stacking headers must be installed on the Ultimate GPS Shield. Follow the “Assembly with stack-ing headers” instructions on this webpage:

https://learn.adafruit.com/adafruit-ultimate-gps-logger-shield/shield-headers

2. Using hookup wire, make the following connections:

LCD GPS Shield Arduino MegaGND GND

VCC 5v

SDA SDA pin 20

SCL SCL pin 21

GPS Shield Arduino MegaRX TX1 pin 18

TX RX1 pin 19

Touch Switch GPS ShieldGND GND

VDD 3v

OUT pin 4

RS-232 to TTL Converter GPS Shield Arduino MegaRXD TTL serial data from GR-130

RX2 pin 17

TXD TTL serial data to GR-130 TX2 pin 16

VCC 5v

GND GND

Page 8: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 8

RS-232 Serial Data Cable Wiring and RS-232 to TTL Level adaptor

Build Guide

A serial data cable is required to connect the GR-130/135 to the GPS Data Logger. The COM port on the instrument runs RS-232 voltage levels which must be converted to 0-5 volt DC TTL logic levels. The signal is also inverted in the conversion. There are many ways to do this, but the adaptor in the Items Needed list is convenient and very inexpensive. I used a MAX-233CPP on the first unit since I already had an extra from another project. One could also use the popular MAX-232 and MAX3232, etc. The adaptors like the one pictured typically cost less than the IC’s stocked by distributors.

Wiring Hint! When making connections to the stacking headers on the Arduino Mega or GPS Shield boards, insert a section of at least 4 male header pins where the connections need to be made. Insert the header pins into the stacking connector, then solder wires to the male header pins. Use 1/16” heat-shrink to protect the connections from shorts and physical stress. The friction applied to the mul-tiple male header pins will secure the wire and connections much better than using an individual pin for each connection.

Male 0.1” header pins used to connect wires to the stacking headers on the Ar-duino Mega and Ultimate GPS boards.

Page 9: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 9

GR-130/135 GPS Data Logger Diagram

Exploranium GR-130 and GPS Data Logger, Circuit Board Stack, Mounted in Case.

Exploranium GR-130miniSPEC

Arduino Mega Computer

GPS Logger Shield

SD MemoryCard

3.5” TFT LCD(Advanced option...)

GPS Satellites

Exploranium GR-130 GPS Geo Data Logger

- by KD5HM -

March 1, 2015

GPS DataCPM + GPSFix Data

COM Port

RS-232 to TTLLevel Converter

7-12VDC

Page 10: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 10

Theory of Operation

The hardware UART for serial channel 1 on the Arduino Mega microcomputer is connected to the GPS shield and receives the raw serial data stream at 9600 baud for RMC and GGA GPS data sen-tences. The UART is serviced by an interrupt routine every 1 millisecond to read the latest serial character if available, and parses the latest sentence data into variables that can be read asneeded by the main loop code as the sentence data is updated. So the main loop code can always fetch the latest GPS coordinate information at any time it is needed.

The hardware UART for serial channel 2 receives the 9600 baud serial data sent by the GR-130/135 when the instrument is performing a Survey. The GR-130 must be set prior to use to send the survey data to the COM serial port in the Setup menu. When a survey is started, the instrument first sends out a data header. Once the header is finished, then once per second, the latest CPM reading is sent out the COM serial port as four bytes used to represent the CPM reading. The software converts these four bytes into a long variable that can hold the full range of possible CPM values, from 0 to 65,535. The CPM value is combined with the latest GPS fix information and is then written to the SD memory card located on the GPS Shield and displayed on the LCD. So each time the CPM value is read, the CPM value is then combined with the latest GPS fix data, written to the SD memory card and displayed on the LCD for the user. The CPM data continues to be written to the SD memory card until the record button is pressed by the user, in order to stop recording the data.

The Arduino Mega also reads and displays the GPS fix number (0 = No Fix, 1 = GPS Fix Good) and the number of GPS satellites visible to the receiver on the display. A fix value of one indicates to the user that good GPS location data is available for recording the survey data. The LCD is also used to prompt the user for input when needed.

When the program is started, the software checks for the presence of a valid SD memory card and only continues if one is found. SD cards must be formatted in FAT-16 or FAT-32 file data format before being used. A new data file is then opened, and the first line is written to the card which contains the names of all the comma separated data fields. Once the header is read, the program is synchronized with the survey data. There are no characters is the serial data stream to act as delimiters. In Survey mode, the software collects 4 serial data bytes and converts them to a long integer, in order to repre-sent the CPM count, which can range from 0 to 65,535. Note that the CPM and GPS fix data for each reading is written out to the SD memory card. This file can be uploaded directly to the GPSVisualizer.com website and used to generate a map with a plot for all the logged CPM level data points!

Page 11: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 11

GPS Data Logger Software

GPS-DL Arduino Program Code

The current GPS-DL Arduino program code and project resources are available here: https://www.wataugaskies.net/rad/GPS-DL/gps-dl.php

Arduino Development Software

The Arduino Software IDE is required to write and upload the GR-130/135 GPS Logger program code to the Arduino MEGA computer board. The Arduino Software IDE runs on Windows, Mac OS X, and Linux. The GPS-DL program code is written and tested for the Arduino 1.0.6 version IDE.

Refer to the Getting Started page for Arduino software installation instructions.

The Arduino development system software can be downloaded here:

http://arduino.cc/en/Main/Software

Hint: Be sure to set menu item “Tools | Board” to Arduino Mega 2560! This code will not compile for the Arduino Uno, which lacks additional needed hardware serial ports.

GPS Data Logger ScreenThe LCD displays GPS Satellite and Sample status as shown in the photo.

Page 12: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 12

Survey data plotted on a Google map after uploading the survey data file to GPSVisualizer.com.

Verifying GPS Module Operation

Proper operation of the GPS module is easy to verify by connecting the Arduino to a computer run-ning the Arduino software IDE.

1. Connect the Arduino Mega and GPS Shield using a USB cable.2. Upload and run the “Blank” sketch below to the Arduino Mega.3. Slide the switch on the Ultimate GPS Board to the ‘Direct’ position.4. IMPORTANT! When done TESTING, set the slide switch to the ‘Soft Serial’ position!

// Blank Arduino Sketch//void setup() {}void loop() {}

Sample Survey Plot on a Google Map

Page 13: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page 13

Viewing Additional Status Messages

The Arduino Software’s Serial Monitor displays step-by-step status of the GPS Data Logger and data being written to the SD memory card. This can be very useful when troubleshooting problems! To see the GPS Data Logger’s step-by-step startup status:

1. Connect the GPS Data Logger to the computer with a USB connector.2. Start the Arduino software IDE.3. In the ‘Tools | Board’ menu, select ‘Arduino Mega 2560 or Mega ADK’.4. In the ‘Tools | Serial Port’ menu, select the USB port used by the Arduino Mega.5. Click on the Serial Monitor icon in the upper righthand corner to start the Monitor. 6. Select ‘115200 baud’ in the lower-right selection box.

Startup status messages are displayed in the Serial Monitor’s window on the computer:

*** GPSDL version 1.1 - GR-130 Gamma Survey & GPS Tagging Logger - by KD5HM ***

SDCard initialized and ready for data!

==> Start the GR-130 Survey to read header & sync to count data...

Survey Header: 9090909000832142021203525101164382730821000515420256021019210619260655820221359000

Survey Header read completed, now synchronized to receive Count data.

==> Press GPS-DL RECORD switch to save GR-130 Survey Data to the SD memory card!

Opening -> GPSLOG15.CSV GPSLOG15.CSV Opened & recording GR-130 count data.

Recording Survey Data!

==> Press the RECORD switch to stop recording.

Survey Data Now Recording:

CPM,latitude,longitude,time,date,fix,sats,altitude,speed45,32.nn00,-97.2459,21:13:12.984,4/14/15,1,9,175.10,0.3051,32.nn00,-97.2459,21:13:14.0,4/14/15,1,9,175.10,0.2858,32.nn00,-97.2459,21:13:15.0,4/14/15,1,9,175.10,0.3959,32.nn00,-97.2459,21:13:16.0,4/14/15,1,9,175.10,0.2645,32.nn00,-97.2459,21:13:16.984,4/14/15,1,9,175.10,0.2537,32.nn00,-97.2459,21:13:18.0,4/14/15,1,8,175.00,0.1246,32.nn00,-97.2459,21:13:19.0,4/14/15,1,8,175.00,0.1853,32.nn00,-97.2459,21:13:20.0,4/14/15,1,8,174.90,0.3253,32.nn00,-97.2459,21:13:20.984,4/14/15,1,9,175.00,0.3350,32.nn00,-97.2460,21:13:22.0,4/14/15,1,9,175.00,0.30

Recording Stopped, Survey data file closed.

==> Stop GR-130 Survey and Reset GPS-DL to restart program

Page 14: GR-130/GR-135 GPS Data Logger Guide - Watauga Skies · 2015-04-14 · Photo of the actual GPS-DL LCD screen for an Analysis mode spectrum plotted to the optional graphics mode LCD

GPS Data Logger by KD5HM - page14

Credits

The GPS Data Logger is made possible in part by the hard work and generous sharing of information provided by others!

Thanks are due to “Geo”, George McDowell, K0FF, and founder of the Alpha Beta Gamma Society, and the many members who freely contribute and share their wealth of knowledge and skills in the Society’s groups!

If you are not familiar with adafuit.com, you should be! The quality GPS module Shield and parsing software for the Arduino Mega microcomputer used in the GPSDL is a terrific product!

“Adafruit was founded in 2005 by MIT engineer, Limor "Ladyada" Fried. Her goal was to create the best place online for learning electronics and making the best designed products for makers of all ages and skill levels. Adafruit has grown to over 50 employees in the heart of NYC with a 15,000+ sq ft. factory.”

To all above, I say a hearty “Thank You”!

Disclaimer

Best efforts have been made to ensure the accuracy of information included in this document. Be aware that this document may contain errors. It is incumbent upon any person using this document to verify the information is correct and applicable for their needs prior to use. Use of this information im-plies the user assumes all responsibility and any liabilities arising from the use of this information.