Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:38 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : GPS 5 Hz Logger gets a box

Author Message
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 02:24pm 14 Dec 2012
Copy link to clipboard 
Print this post

Hello

I have now completed the enclosure work for my 5 Hz GPS logger

It contains

1. Outboard GARMIN GPS 5 Hz
2. RS232 to TTL converter
3. DuinoMite Mini running MMBasic
4. 16 GB Class 10 MicroSD Card
5. Belkin USB 5 V back pack 2000 mAH
6. Saves to file very minute
7. Cuts daily files.





- Andrew -
Andrew Rich VK4TEC
www.tech-software.net
 
Talbit
Senior Member

Joined: 07/06/2011
Location: Australia
Posts: 210
Posted: 08:34pm 14 Dec 2012
Copy link to clipboard 
Print this post

Andrew,
Good work.
Can you tell me what Garmin GPS you are using and what did you have to do to get it to give you 5Hz output?
Are going to post the complete schematic?
Regards
Talbit
Talbit
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 09:06pm 14 Dec 2012
Copy link to clipboard 
Print this post

Pretty easy

01. GARMIN GPS18 5 Hz - be carefull its 5 volts !
02. A little RS232 to TTL converter off ebay
03. The GPS gets 5 volts from the IDC connector.
04. The GPS TTL is connected to COM1 on the IDC connector
05. The GPS is 19200 N 8 1
06. I have connected TX RX VCC and GND on the GPS
07. On startup I can send the GPS $PGRMO commands to set the NMEA data
08. Once a minute the daily file is closed and re-opened.
09. 16 GB Class 10 MicroSD card

Please look on the IDC pin layouts I have posted before.

Running MMBasic 4.03B

Here is some code for you
[code]
Rem --------------------------------------
Rem GPS 5 Hz Logger GARMIN GPS18 5 Hz
Rem 16 GB class 10 MicroSD card
rem Saves to card once a min to a daily file
Rem Andrew Rich VK4TEC Dec 2012
Rem --------------------------------------

max =20
Dim arg$(max)

' Open the com port on the IDC connector 19200,n,8,1

Open "COM1:19200,5024" As #1

' Initialisation commands for GPS

Pause 500

Print #1,"$PGRMO,GPRMC,2"
Pause 500
Print #1,"$PGRMO,GPGGA,1"
Pause 500
Print #1,"$PGRMO,GPRMC,1"
Pause 500
Print #1,"$PGRMO,GPGSV,1"
Pause 500
Print #1,"$PGRMO,GPGSA,1"
Pause 500

' Get an intial filename from GPRMC

file2$ = ""
Do
nmea_sentence
If arg$(0) = "GPRMC" Then
file2$ = Mid$(arg$(9),1,6) + ".LOG"
EndIf
Loop Until file2$ <> ""

' Open the file ready to write to it

Open file2$ For append As #3

' Main Loop

Do

' Assign a time to check against

old$ = tchk$

' Get the NMEA data

nmea_sentence

' Get the checksum at the end of the NMEA

y$ = Input$(1, #1)
msg$ = msg$ + y$
y$ = Input$(1, #1)
msg$ = msg$ + y$

' $GPRMC routines
' Get the date and time ( need to check for date roll over )
' Set the filename daily

If arg$(0) = "GPRMC" Then
tod$ = Mid$(arg$(9),1,2) + "/" + Mid$(arg$(9),3,2) + "/" + Mid$(arg$(9),5,2)
tod$ = tod$ + " " + Mid$(arg$(1),1,2) + ":" + Mid$(arg$(1),3,2)
file2$ = Mid$(arg$(9),1,6) + ".LOG"
tchk$ = Mid$(arg$(1),1,4)

' Once a minute close and append the file
' Also check if a new day has started and update file

If tchk$ <> old$ Then
Close #3
Open file2$ For append As #3
Print Mid$(arg$(1),1,4) + " Min change - Savefile is " + file2$
EndIf
GoTo savefile
EndIf

' Save to the SD card each minute the program will check if there needs to be a new filename or not.
' Each minute the file is closed off and re-opened

savefile:

Print #3, MSG$

Loop

Rem -- SUBS --

Sub nmea_sentenc
Do
msg$ ="$" ' subroutine start
Do While Input$(1, #1) <> "$" : Loop ' wait for the start
For i = 0 To max
arg$(i) = "" ' clear ready for data
Do ' loops until a specific exit
x$ = Input$(1, #1)
msg$ = msg$ + x$ ' get the character
If x$ = "," Then Exit ' new data field, increment i
If x$ = "*" Then Return ' we have all the data so return
arg$(i) = arg$(i) + x$
Loop
Next i ' move to the next data field
Loop
End Sub




Edited by vk4tec 2012-12-16
Andrew Rich VK4TEC
www.tech-software.net
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 09:32pm 14 Dec 2012
Copy link to clipboard 
Print this post

Whats cool is it also feeds into my LINUX box

MySQL is used to populate a table of positions.

AVG is called to make and average position

I have a boat trip coming up soon

I shall field test the unit

- Andrew -
Andrew Rich VK4TEC
www.tech-software.net
 
Talbit
Senior Member

Joined: 07/06/2011
Location: Australia
Posts: 210
Posted: 04:12pm 15 Dec 2012
Copy link to clipboard 
Print this post

Thanks Andrew,
That looks like a great GPS unit. Foget the Maximite.
I might just get one and plug it into my Laptop!
Thanks again.
Talbit
Talbit
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 12:38pm 19 Dec 2012
Copy link to clipboard 
Print this post

Been running for 6 days straight now - no issues

- Andrew-
Andrew Rich VK4TEC
www.tech-software.net
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024