fast — Battery low.
• Green LED alternates on and off every second or so —
Smart Logger is ready and in run mode with no Fix.
• Green LED flickers on with one quick blink — GPS has a
SPS mode 1 Fix.
• Green LED flickers on with two quick blinks — GPS has a
DGPS or WAAS mode 2 Fix.
• Green LED flickers very fast constantly — Indicates battery
level has dropped too low for operation.
• Green LED fails to light at all — Battery dead.
• Solid Red LED — When record button is pressed, the
LED will light solid red until the button is released. Press a
second time to exit record mode.
• Red LED flashed quickly — Each time a NEMA GGA or
RMC message is saved, the red LED will flash quickly.
• Red LED not flashing — Not in Record mode.
If you look closely at the code in the DiosLogEM408.txt
program, you can see that I have added my own NEMA
messages. When a low battery is detected, a
“$GPMSG,1,LowBat*7C” is sent to the log. The DiosPro
has several unused digital and A/D ports so it would be
possible to add additional data to the log file. This would
enable you to actually record robot control telemetry, as
well as sensor data.
The DiosPro supports a sleep mode so it is possible to
log intermittent data. This would allow you to log days
worth of data on a single charge.
While the Smart Logger was built for logging GPS and
telemetry data for robotic applications, there’s no reason
you can’t use it to log positional and speed data in your
SparkFun Data Logger
Each line of data is actually written to a buffer and
when that buffer reaches a value of 512 bytes, it is saved
to the SD memory card. When recording is stopped or the
battery level drops too low, the buffer is also saved to the
It is not recommended that you remove the memory
card while in record mode; you could corrupt the log file.
Take the logger out of record mode first. You can stop and
start the record mode at will. When restarted, it will
append data to the end of the log file. Note that if power is
removed, the logger will start back at the beginning of the
file when power is restored.
How Well Does it Work?
On a freshly charged set of 2,000 mAh rechargeable
batteries, I get about 20 hours of record time. This could
probably be extended if the LEDs were turned off completely.
By only recording the GGA and RMC messages, we can
store about 39 hours of data in a single 20 meg file.
Because of the way I set up the addtofile function, only
65,000 sectors can be written to the file on the SD memory
card. This is about 33 meg. If you need to store more data,
then you need to add more code to flush the current file
and open up a second. Another
option would be to modify the Figure 24
addtofile and setfilesize functions to
handle a larger sector counter.
I have included a sample log
file that I created using the Smart
Logger and I have to say it worked
perfectly. The logger is small
enough to fit into most robots that
would be using GPS and can be
made even smaller if you remove
the battery and power it from your
robot’s logic power source.
I would be remiss if I didn’t mention the SparkFun data
logger module. For those of you who want a pre-built data
logger module, this may be what you are looking for. The
GPS Logger v2.4 is a self-contained module. All you need to
add is four to seven volts DC. The module has an EM406
GPS module installed on the top as shown in Figure 26. It
supports up to a 1GB SD memory card which is inserted on
the bottom as shown in Figure 27.
To power the module, I recommend a set of 2,000
mAh rechargeable batteries and a battery holder like the
one shown in Figure 28. SparkFun also sells a battery
holder with a two-pin connector that mates directly with
this module. With this power source, you will get just under
12 hours of operation with a steady stream of data writing
to the memory card. You will get a couple days of run
time if you opt for an intermittent write of once every
Once you insert a memory card and apply power, the
module will create a default config file called GLOGCON.
TXT as shown next. By default, the config file will be set to
mode 1, which will log all data. By changing this to mode
1, you can set the time between logs, thus putting the
module to sleep when it is not writing. Another setting
you will want to change if you are in the US is the
WAAS setting. By setting this to 1, the module’s accuracy
SERVO 11.2008 65