Actually it is a little simpler and a little more difficult at the same time when powering down the Datalogger. I too did this in my original experimental teenager logger (mentioned in the article). Using a BS2p is the wise move here because you will need the extra memory (I did) to implement extra features (well, error handling mainly).
My files were stored as "FILE", DEC4 fileNum, ".KLM" so that every filename was formatted as FILExxxx.KLM where xxxx was a number from 0000 to 9999. What I did was on the first run a specific EEPROM location had not been initialized, so it was set to $00 and then the first file was opened. As I said, at this point I had a lot of error handling routines in place so all of this section was running from slot 1 on the BS2p, but the main code was run from slot 0.
Once the ignition signal was lost the unit would go into low-power standby mode but first the file was close and the file number stored in EEPROM was incremented. On next ignition the new file was opened with the next sequential file number. I find this to be a faster and more reliable way to handle this. This also makes it easy if the vehicle is frequently started and stopped. You have up to 9999 events to log so...
Hey there, Chris. I just got the GPS Datalogger Kit and I'm looking forward to building it. I was wondering, though, how different was the original Teenager logger, besides using the BS2P?
I'd love to see the details on that project sometime. Thanks!
Hey Chris, hope all is well with you!
Got a question...
I was playing with the gps datalogger, everything went well, stored data like it should, but it would not open in google earth. here is the error it gave me...
here is the kml file also if you wanna take a look at it.
the forums would not let me upload the kml file.
the only thing i have changed in the code was the led output pins from 0,1 to 7,8 respectivly.
EDIT:
Amazing what a cup of coffee and another look will do, i took another look at the kml file and noticed that it had actually doubled up the data inside the file. still don't know why, but i took the top part of the file out, from the top to the second <?xml... and it opened correctly.
Glad you figured it out since I was late getting to your message. Sorry about that...after counting down to line 43 I realized that was supposed to be line 1. Somehow your program had not written the 'footer' data before it restarted. I will be revising this project in a future upgraded project which demonstrates the fleet manegement system I imeplemnted for an old customer. The company is now defunct and those systems were destroyed so I can give the information away. Future SCTV episode I think.
Glad you figured it out since I was late getting to your message. Sorry about that...after counting down to line 43 I realized that was supposed to be line 1. Somehow your program had not written the 'footer' data before it restarted. I will be revising this project in a future upgraded project which demonstrates the fleet manegement system I imeplemnted for an old customer. The company is now defunct and those systems were destroyed so I can give the information away. Future SCTV episode I think.
Cool! i'll be keepin an eye out for that SCTV episode.
I think the problem was (forever what reason) is that i had statred the program a couple of times, i was first trying it inside, but wasn't getting a gps lock. i powered it down then moved outside and powered it up, it seems like to me instead of overwriting the old file it appended to it instead. i've tried to replicate it a couple of times but had no luck, maybe it was a vicilium chip bug or something to do with the usb datalogger. have no idea, but anywho, it does work now as it's supposed to. Great project!
I have followed all the steps you have given but I am stuck at the GPS Datalogger program. On the debug screen it just kept showing "Waiting for GPS signal". However if I were to run the GPS test prgoram, the signal can be detected but not for the datalogger program. Please help, thank you.
When you're seeing the waiting for GPS message, is the light on the GPS Module blinking or solid? Also, have you checked to make sure that button 1 is connected properly as per the schematic?
Also, if the system (bi-color) LED is solid green then the GPS has a lock and you must press Button 1 to start logging data. I did not put a DEBUG message for GPS lock. DEBUG statements take up a lot of memory and this program uses almost every byte, so there was not enough memory to DEBUG all status messages.
In fact, if you've read the original article about the first logger having more functions, that is how I did it. There are no debug messages in the full version I originally created and it can sense the car's ignition and close the current file as well as appending to it upon restart. I also wrote a version that creates multiple files, though I prefer the single file program. I will try to post that soon.
I'm looking to do a local hack-a-thon using the GPS Datalogger. I noticed the kit uses a serial board. Would post/send me your latest code? Also, you said the basicp stamp would be better. Would you spec out the parts I'd need for a USB kit using basicp? Thanks! Brian Carter (briancarter@chipsofttech.com)
Hi all!
As a regatta sailor, I would like to log NMEA data for later analysis to improve my performance, but I have a few questions.
For this I would like to put together the GPS data logger kit (Item code 910-27937) form its components without the GPS module, as I would like to input NMEA data form my electronic navigation NMEA network. As I don’t have a serial connection on my computer I plan to add the RS232-USB connector (Item code 28031) to the set.
The TackTick-network on my boat (Garmin GPS and a TackTick windmeter) has a standard NMEA (0183 V2.30) output. Received Sentences: DBT, DPT, GLL, HDG, HDM, MTW, MWV, RMB, RMC, VHW, VLW, VWR. Transmitted Sentences: DPT, GLL, HDG, MTW, MWV, RMB, RMC, VHW, VLW, VWR. The idea is to log timestamp, wind angle and speed, boat speed and course. The GPS also produces a log containing position, speed, course.
I have not been able to log the output yet (no RS232 on my computers), so I’m not sure of the order of the sentences.
As the system produces output approximately every second, I think of averaging 10 points which will also stabilize the numbers.
Possibly I would like to add a live display in a later stage presenting deviation from previous average course to alert for tactical opportunities.
The questions I have:
Is it possible to add the RS232-USB connector to this kit
Can I connect the Tacktick NMEA output straight to the logger input where the GPS module input originally is (and read its outputJ)?
What Basic Stamp would I need for this task? Bigger leaves more options open, but consumes more power from the battery
Would Chris Savages GPS Datalogger software be a good start for software?
Although I’m new to the Parallax products, and only have basic experience in programming, I have help from my son who did a Boe-Bot school project recently.
Thanks for your input and ideas.
Eric
It sounds like the boat system will output the NMEA strings out over RS232?
1. You can use the Parallax RS232-USB converter only if you want to read the NMEA signals on a PC (via a USB port). It won't work to hook it up to a microcontroller.
2. I would use one of these (or similar): http://www.pololu.com/catalog/product/126. You should be able to connect the RX line where the GPS line is on the kit sample code, and it will run the same.
3. I would use one of the faster BS2s just to make sure that you have time to do everything that needs to be done. It would also depend on the baud rate of the NMEA system on your boat. IIRC correctly the BS2 can only go up to 9600 baud. I would use a BS2px. It only draws 55mA, or .275 watts.
4. You can use the datalogger routines in that code, but you'll need to replace the GPS routines (he used the "smart" mode of the Parallax GPS, not NMEA). If you look around the web I'm sure that there are BS2 routines to read NMEA data.
Possibly I would like to add a live display in a later stage presenting deviation from previous average course to alert for tactical opportunities.
The questions I have:
Is it possible to add the RS232-USB connector to this kit
Can I connect the Tacktick NMEA output straight to the logger input where the GPS module input originally is (and read its outputJ)?
What Basic Stamp would I need for this task? Bigger leaves more options open, but consumes more power from the battery
Would Chris Savages GPS Datalogger software be a good start for software?
Eric
The #28031 adapter you mentioned would work just fine for connecting the Super Carrier Board via USB.
Yes, you can connect your GPS output to the BASIC Stamp Module, but not directly. You will need a 22K resistor and you will need to invert the baud mode used.
The BS2p series all have a provision for capturing the serial data into SPRAM where it can be parsed to extract the fields you need, such as Latitude and Longitude. If needed I can provide a separate program which shows how to use the BS2p to read GPS data.
Once the changes are made for the RS-232 into the datalogger (inverted via 22K resistor) and you have a BS2p with the modified software you could certainly save time on development by using this program as a base. As a note, I will be putting up the original datalogger project soon which did use a BS2p and a standard GPS module and also had more features.
I need the RS232-USB connector for communication and programming with my PC
Its clear to me now that I need a RS232 to connect to the NMEA-out from the network. As far as I understand the NMEA output of a marine network would normally be connected to RS232 pin 3 and 5. The Pololu seems to be difficult to get for me in the Netherlands. Doesnt Parallax have similar products? These I can obtain via a distributor. Also see Chris' answer on this.
Thanks. Youre probably right to choose a faster stamp. Power consumption is low, but I work on board battery, so not endless
I realize the routines have to be adjusted. I presume that will become more clear when I have the first readings of the output. So far I have not been able to connect to the PC due to the RS232 requirement
@ Chris:
That helps! Then I presume this would be my shopping list?
This 22K resistor, should it be at pin3? How do you mean: invert Baud rate? I tried to search the forum on this but could not get it clear yet :-( Would you have a diagram available maybe?
Thanks for the offer! That would help, although I would like to try myself first .
Interesting! You already mentioned this somewhere else in the forum. That would steepen my learning curve I presume
Eric, the BASIC Stamp modules use TRUE or INVERTED baud mode. If you are using the resistor and feeding the RS-232 signal into the I/O pin you would use inverted baud mode (see help on SERIN for more information) rather than TRUE baud mode.
Hi everyone! Im wanting to remove the buttons from the the GPS datalogger program. I removed the first button that starts the logging process and i have it starting the process after it receives a valid signal but Im wanting it to log for 5 mins then stop and write the data to the flashdrive without the aid of the second button. I attached my file if anyone can help me out it would be GREATLY APPRECIATED ! finalprogram3.bs2
You could access the UTC time from the GPS and use that to determine when 5 minutes have passed and then close the file. It would be pretty straight foward if you understand what the code is doing. Otherwise you might use a 555 timer or some other simple external timer to output to the pin used by the second button and detect that to stop logging. It would almost like simulating a button press.
SailingEric, I'm doing similar thing with the Propeller.
I'm logging GPS data and wind, but using a dedicated anemometer. I'm checking the possibility to interface to the tacktick NMEA unit, and it has an RS484 data output. I have yet to try it, but an RS485->serial tranceiver should do the job. The ground is common to all the circuits, and the RS485 tranceiver will keep your two instruments worlds connected in a safe way.
I Also emailed tacktick asking questions about interfaciing their instruments with other, third party hardware, but (strangely) they didn't answer.
Massimo
Thank you Massimo!
I've been looking for this and couldnt find it 8-$
Where did you find this info?
Also baud rates (which I thought I needed), and indeed Tacktick does not help a lot. I managed to get a reply, but they could only refer to the internet for information on NMEA connectivity...
Which seems to be getting more true every week!
You realize Tacktick has switched owner from Suunto to Raymarine? They might be very occupied with internal matters for some time.
Why Propeller? Is it better for this job? Propeller uses different progamming than Basic Stamp? Or could I use/see your programming? I'm a newbee on this...
I might decide to purchase a Propeller set if it makes my life much easier.
I think we are hijacking Chris's thread. Probably better starting a new discussion on "general" or "sensors"?
We can share the infos and hopefully get there faster..
Massimo
Hey I am having problems with the code. I do the gps test and it works fine then I load the data logger code and the led turns off cause it can not recognize the gps. can you help me thanks Bridger
My apologies, the source code was written originally for the Parallax part # 28146 which has since ben discontinued. I will eventually revise this project to work with any GPS capable of outputting RAW NMEA0813 data.
Comments
My files were stored as "FILE", DEC4 fileNum, ".KLM" so that every filename was formatted as FILExxxx.KLM where xxxx was a number from 0000 to 9999. What I did was on the first run a specific EEPROM location had not been initialized, so it was set to $00 and then the first file was opened. As I said, at this point I had a lot of error handling routines in place so all of this section was running from slot 1 on the BS2p, but the main code was run from slot 0.
Once the ignition signal was lost the unit would go into low-power standby mode but first the file was close and the file number stored in EEPROM was incremented. On next ignition the new file was opened with the next sequential file number. I find this to be a faster and more reliable way to handle this. This also makes it easy if the vehicle is frequently started and stopped. You have up to 9999 events to log so...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·
I'd love to see the details on that project sometime. Thanks!
-Matt.
Got a question...
I was playing with the gps datalogger, everything went well, stored data like it should, but it would not open in google earth. here is the error it gave me...
here is the kml file also if you wanna take a look at it.
the forums would not let me upload the kml file.
the only thing i have changed in the code was the led output pins from 0,1 to 7,8 respectivly.
EDIT:
Amazing what a cup of coffee and another look will do, i took another look at the kml file and noticed that it had actually doubled up the data inside the file. still don't know why, but i took the top part of the file out, from the top to the second <?xml... and it opened correctly.
KK
Cool! i'll be keepin an eye out for that SCTV episode.
I think the problem was (forever what reason) is that i had statred the program a couple of times, i was first trying it inside, but wasn't getting a gps lock. i powered it down then moved outside and powered it up, it seems like to me instead of overwriting the old file it appended to it instead. i've tried to replicate it a couple of times but had no luck, maybe it was a vicilium chip bug or something to do with the usb datalogger. have no idea, but anywho, it does work now as it's supposed to. Great project!
I have followed all the steps you have given but I am stuck at the GPS Datalogger program. On the debug screen it just kept showing "Waiting for GPS signal". However if I were to run the GPS test prgoram, the signal can be detected but not for the datalogger program. Please help, thank you.
Also, if the system (bi-color) LED is solid green then the GPS has a lock and you must press Button 1 to start logging data. I did not put a DEBUG message for GPS lock. DEBUG statements take up a lot of memory and this program uses almost every byte, so there was not enough memory to DEBUG all status messages.
In fact, if you've read the original article about the first logger having more functions, that is how I did it. There are no debug messages in the full version I originally created and it can sense the car's ignition and close the current file as well as appending to it upon restart. I also wrote a version that creates multiple files, though I prefer the single file program. I will try to post that soon.
As a regatta sailor, I would like to log NMEA data for later analysis to improve my performance, but I have a few questions.
For this I would like to put together the GPS data logger kit (Item code 910-27937) form its components without the GPS module, as I would like to input NMEA data form my electronic navigation NMEA network. As I don’t have a serial connection on my computer I plan to add the RS232-USB connector (Item code 28031) to the set.
The TackTick-network on my boat (Garmin GPS and a TackTick windmeter) has a standard NMEA (0183 V2.30) output. Received Sentences: DBT, DPT, GLL, HDG, HDM, MTW, MWV, RMB, RMC, VHW, VLW, VWR. Transmitted Sentences: DPT, GLL, HDG, MTW, MWV, RMB, RMC, VHW, VLW, VWR. The idea is to log timestamp, wind angle and speed, boat speed and course. The GPS also produces a log containing position, speed, course.
I have not been able to log the output yet (no RS232 on my computers), so I’m not sure of the order of the sentences.
As the system produces output approximately every second, I think of averaging 10 points which will also stabilize the numbers.
Possibly I would like to add a live display in a later stage presenting deviation from previous average course to alert for tactical opportunities.
The questions I have:
- Is it possible to add the RS232-USB connector to this kit
- Can I connect the Tacktick NMEA output straight to the logger input where the GPS module input originally is (and read its outputJ)?
- What Basic Stamp would I need for this task? Bigger leaves more options open, but consumes more power from the battery
- Would Chris Savages GPS Datalogger software be a good start for software?
Although I’m new to the Parallax products, and only have basic experience in programming, I have help from my son who did a Boe-Bot school project recently.Thanks for your input and ideas.
Eric
1. You can use the Parallax RS232-USB converter only if you want to read the NMEA signals on a PC (via a USB port). It won't work to hook it up to a microcontroller.
2. I would use one of these (or similar): http://www.pololu.com/catalog/product/126. You should be able to connect the RX line where the GPS line is on the kit sample code, and it will run the same.
3. I would use one of the faster BS2s just to make sure that you have time to do everything that needs to be done. It would also depend on the baud rate of the NMEA system on your boat. IIRC correctly the BS2 can only go up to 9600 baud. I would use a BS2px. It only draws 55mA, or .275 watts.
4. You can use the datalogger routines in that code, but you'll need to replace the GPS routines (he used the "smart" mode of the Parallax GPS, not NMEA). If you look around the web I'm sure that there are BS2 routines to read NMEA data.
@SLRM
- I need the RS232-USB connector for communication and programming with my PC
- Its clear to me now that I need a RS232 to connect to the NMEA-out from the network. As far as I understand the NMEA output of a marine network would normally be connected to RS232 pin 3 and 5. The Pololu seems to be difficult to get for me in the Netherlands. Doesnt Parallax have similar products? These I can obtain via a distributor. Also see Chris' answer on this.
- Thanks. Youre probably right to choose a faster stamp. Power consumption is low, but I work on board battery, so not endless
- I realize the routines have to be adjusted. I presume that will become more clear when I have the first readings of the output. So far I have not been able to connect to the PC due to the RS232 requirement
@ Chris:- That helps! Then I presume this would be my shopping list?
As in the kit, but without the GPS module(1) Super Carrier Board
(1) BASIC Stamp 2 Module (BS2P?)
(1) Memory Stick Datalogger
(2) 10K Resistors
(1) 220 Ohm Resistor
(2) Tact Switch
(1) Bi-Color LED
Extra:
#28031 USB-RS232 connector
22K Resistor
- This 22K resistor, should it be at pin3? How do you mean: invert Baud rate? I tried to search the forum on this but could not get it clear yet :-( Would you have a diagram available maybe?
- Thanks for the offer! That would help, although I would like to try myself first
.
- Interesting! You already mentioned this somewhere else in the forum. That would steepen my learning curve I presume
EricI'm logging GPS data and wind, but using a dedicated anemometer. I'm checking the possibility to interface to the tacktick NMEA unit, and it has an RS484 data output. I have yet to try it, but an RS485->serial tranceiver should do the job. The ground is common to all the circuits, and the RS485 tranceiver will keep your two instruments worlds connected in a safe way.
I Also emailed tacktick asking questions about interfaciing their instruments with other, third party hardware, but (strangely) they didn't answer.
Massimo
I've been looking for this and couldnt find it 8-$
Where did you find this info?
Also baud rates (which I thought I needed), and indeed Tacktick does not help a lot. I managed to get a reply, but they could only refer to the internet for information on NMEA connectivity...
Which seems to be getting more true every week!
You realize Tacktick has switched owner from Suunto to Raymarine? They might be very occupied with internal matters for some time.
Why Propeller? Is it better for this job? Propeller uses different progamming than Basic Stamp? Or could I use/see your programming? I'm a newbee on this...
I might decide to purchase a Propeller set if it makes my life much easier.
Eric
We can share the infos and hopefully get there faster..
Massimo
edit: http://forums.parallax.com/showthread.php?136417-Interfacing-to-the-tacktick-NMEA-unit&p=1057019#post1057019
Did you try changing the baud to 9600? It looks like the VPN module's smart mode is at 9600, not 4800 like the code has it.
What is the RAW pin connected to?
Hey thanks I would have never thought of that. thanks for your help.