I've now integrated a micro-SD card into the project. Originally, I never planned on putting storage on this device and was hoping users would just collect the data on a cell-phone or other connected device. But after some feedback from interested parties, I decided to go ahead and add it. Upon reflection, I can see the benefit of having storage on the device, which means you don't need to connect it to anything if you don't want to, which might be nice in some circumstances.
As the dust settles on this new feature, I can reveal some of the details:
Micro-SD size card, 2GB or more
Ability to format a card
Ability to perform a read/write test on the card
Ability to write to 2 logs simultaneously
Log files are automatically named based on date and time
"Short" log files can be automatically deleted
When disk space is low, the oldest log file can be deleted automatically
Logging can be triggered in a variety of ways: on power up, GPS time sync, button press, speed, or altitude
Desktop client includes a simple file browser for downloading and deleting logs
So far, I've tested 2 different micro-SD cards I had laying around; a 4GB G-Skill, and an 8GB SanDisk. Both worked perfectly, though the SanDisk tests at almost twice the write speed of the G-Skill. The G-Skill is still fast enough to log at full speed based on my calculations. I haven't done a full load test yet, however. I'm not sure of the maximum card capacity, but I don't imagine using much more than an 8GB card. The log files are just text, and even logging into 2 log files at a maximum data rate of 50KB/sec each, that's almost 24 hours of data. The cards only have a FAT32 file system, so each log file can only reach 4GB maximum.
Of course, having an micro-sd card means there's an micro-sd card slot. That slot needs to be accessible so the user can insert/remove cards, which implies some sort of hole in the case. I'm a fair bit away from designing a case for this project, but it's something that will have to be considered eventually.
As far as the nitty-gritty on adding this feature, I had to contend with a number of problems. The first issue was that the card detect switch in the card slot wasn't exposed to a pin on the module. That was remedied by soldering a wire to the pin on the slot, and sticking the other end into the proto-board. The module interfaces to the main processor using SPI. The rest of the problems had to do with reliability. I'm using the SdFat library to interface with the card. I couldn't get the library to reliably initialize an inserted card. After struggling for a week, I finally decided that maybe the module was bad. I ordered a new one, plugged it in, and all my problems went away. The old module got returned as defective. Since then, it's just been a matter of tweaking the user options and testing firmware.
Next up will be the GPS module. I've had the GPS module working for a while, but I needed to do some more work on it, and I'll talk about that next time.