Search
Product Info
OpenLog
sku: DEV-09530
Description: OpenLog is an open source data logger. Simple to use, simple to change. We wanted to create a serial logger that just worked. Power this device up and it will start logging any received serial data at 9600bps. Sending Ctrl+z will drop out of logging and in to command mode. 'new' will create a new file. 'md' makes a directory. '?' brings up the list of commands. OpenLog doesn't do a lot, but it does log serial streams extremely well. Example:>new testfile.txt
>append testfile.txt
<(send large amounts of text followed by Ctrl+z)
All the design files (schematic, PCB layout, firmware) are open source released under the CC-SA v3 license and are available through Github.
Features:
- Log to low-cost microSD cards up to 2GB
- Simple command interface
- Three modes:
- NewLog creates a new log every power up and immediately starts logging
- SeqLog appends a file called "SeqLog.txt" at every power up and immediately starts logging
- Command mode starts OpenLog at a command prompt at power up
- Configurable baud rates (2400 to 115200bps)
- Doesn't drop characters even at full-blast 115200bps
- Power, ground, and RX-I are the minimum connections
- Reprogrammable ATmega328 using the standard STK500 serial bootloader
- Two LEDs indicate writing status
- Input voltage from 3.3V to 12V
- 8mA idle, 18mA at maximum recording rate
Documents:
The OpenLog project is housed on github! Please see the wiki for the most up-to-date firmware, feature requests, files, and datasheet specs.
Pricing
Comments
49 comments
Feeds
Currency
Display prices in
Feedback
If you would like to tell us more, you can fill out our form if you need some psycho-suggestive questions. Go to the form.





























Is there a website or project page to find more info or send patches?
Thank you,
Juan
We don't have a good repository spot yet. Maybe google code. Looks like there are a few people out there doing similar work:
http://code.google.com/p/sdfatlib/
For now, email patches to spark at sparkfun.com. Thanks! We appreciate any help.
It may be possible to go lower by setting the port pins to the SCI to consume less current when idle.
Beyond that, it becomes very tricky since the UART needs its clock to see a character and wake up. Otherwise there could be a deeper sleep.
http://elm-chan.org/docs/mmc/mmc_e.html
Might be worth having a poke at the page here:
http://elm-chan.org/fsw/ff/00index_e.html
The sample projects may be of particular interest.
It would be nice to see this grow and gain the same triggering-on-specified-character abilities as well, I see a lot of promise in this!
Couple of hints for others.
--Default baud is 9600 8n1.
--Make sure your card is formated as fat16.
--If you hook it directly up to FTDI Basic don't forget to cross the rx and tx lines.
If anyone else is looking to modify the firmware and is unfamiliar with the workflow to get the serial bootloader working (like i was) then i can highly recommend Nate's walkthrough of his process here:
http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=142
(this took me heaps longer to find than it should have, and so i found lots of ways to *not* make it work in the meantime. Hopefully putting the link here saves someone else that pleasure...)
The guide doesn't talk about this particular model.
I can't get ISP via usbtiny (sparkfun) or anything with stk500 to work with avrdude.
One of the three values is wrong or Atmel has a new version of the chip. A 3.3v 16Mhz arduino would be welcome...
well if it fails mysteriously, you know why
(And when are we going to see 3.3v/16Mhz Arduinos?)
The firmware works on an Arduino Pro Mini at 3.3v/8Mhz to a microSD breakout (after fixing the frequency defs in the makefile and config). I didn't check the second LED though :).
It would be slower at reading and writing - the maximum SPI SCK rate is used, which is based on CPU speed.
At least that would confirm the hardware would work without change.
I suppose there is no arduino bootloader, so I'll need a programming adapter?
The Makefile for the firmware link here is set to a 168, not a 328, though there seems to be some problem with the defines.
And of course nothing says what the fuses need to be set to much less "make fuse"...
I'm going to be busy on christmas day.
Read works - I already have it scanning every partion (including an extended partition) for FAT32, then getting the boot sector and geometry, reading the root directory and able to read an entire file by following the FAT chain. In about 200 lines of code, 1 512 byte sector buffer, several limitations (512 byte sectors, no fs errors, short filenames only, etc.), but every FAT32 format I've seen does this.
I hope to get write working this weekend.
So connecting it to the arduino will result in the DTR line being functionally open - capacitor to capacitor.
Another (for me) annoyance is the inability to do binary. I suppose you could use a break condition to signal going back to command mode.
I have it hooked up as in the datasheet on git, but avrdude can't find it. Do I need 5v to do serial bootloading?
Nor can it find it if I connect it via ISP.
I can communicate fine in a terminal program and even work at different baud rates.
Does anyone have an avrdude command line that will recognize it?
It would help greatly if someone could give me an avrdude command line that will verify the above firmware's hex file (I'm assuming that is what is in the unit), and one that will reflash it.
Also if there is anything tricky about using an ISP - the 4 data pins out of the six are on the other side. I'm using the sparkfun usbtiny but can try something else.
avrdude -c stk500v1 -b 57600 -P /dev/ttyUSB0 -p m328p -Uflash:w:main.hex
however the baud rates for the application will be off since the crystal is 8Mhz instead of 16. To fix that (so you can try enabling debug and SDHC) you need to add a line around line 76 of uart.c after it selects the baud rate by reading the eeprom.:
new_ubrr >>= 1;
You will also need to adjust F_CPU to 8000000 in the makefile.
The breakout use CD. VCC and GND go to the 3.3 regulated out and grounds from the arduino.
The bottom four pins near the LED are the SPI.
From the bottom going up (10 going to 13):
pin func uSD
10 - SS - CS
11 - MOSI - DI
12 - MISO - DO
13 - SCK - SCK
SDHC cards are recognized if you set the option in sd_raw_config.h, and they can read FAT16, but doing ls, md, or trying to write will cause a reset (at least if debug is on).
2>disk
manuf: 0x03
oem: SD
prod: SU16G
rev: 80
serial: 0x7045eef6
date: 8/8
size: 15193MB
copy: 1
wr.pr.: 0/0
format: 0
free: 1029341184/1029816320
>
I have a similar problem on my 3.3v arduinos (but they have a button and I'm used to pressing it). Fortunately the square framed hold is "reset" and shorting it to the uSD holder will ground it causing a reset - and releasing it will allow avrdude to flash.
http://code.google.com/p/gentlenav/wiki/OpenLogConnection
I have found the code to be very unstable in my environment for some reason. The code as supplied works fine, and simple changes (such as changing some baud rate stuff to enable 19200) work fine. But anything more complex seems to cause the code to fail in wierd ways. It still compiles and loads onto the OpenLog board fine, but code unrelated to the changes i have made will stop working. ie the 'ls' command will print out half the disk information table, then the device will crash and reboot. Seems like some sort of memory corruption, although i would have thought the stack and heap should be ok, as code use is only about 50% of capacity. Any thoughts?
2) I just send out serial character "Hello" from Atmel to OpenLog. What should I expect as output? Will I see a text file if I read SD card from PC?
Thanks!
good luck,
Is it a "must" to read out the logger with a separate FTDI breakout or is there a way of using the Arduino for that? I can't find a hint or even a tutorial.
Alpha quality, but for really early adopters...
Flashable firmware, source with build-able library and sdhc driver. FAT32 only with 8.3 names only, but 11k for the lib and sd/sdhc driver.
Direct link: http://www.zdez.org/fat32lib-0.1.zip
http://www.zdez.org/fat32lib-0.1a.zip
I was reading that this is optional for microSD cards is this true?
I don't know about the earlier MMC, or how compliant the SD models are.
The SPI mode is optional in the microSD format.
http://en.wikipedia.org/wiki/SD_Card
All cards must support all three modes, except for microSD where SPI is optional.
But there are no micro MMCs.
How do I connect this to Arduino Duemilanove?
for mini:
GRN: Reset pin and connects to the GRN pin on the Arduino Pro Mini. Pulling this line low will reset the ATmega328. Because there is a capacitor on this line, holding this line low will not keep OpenLog in reset.
RXI: Serial input into OpenLog.
TXO: Serial output from OpenLog.
VCC: 3.3V to 12V input.
GND: Ground
BLK: This pin is connected to GND. Connect this pin to BLK on the Arduino Pro Mini.
Thanks
http://github.com/tz1/hyperlog
Works at 57600 default. Other baud rates by adding a 1-line (with line ending) HYPERLOG.CFG file containing the baud rate, e.g. "115200".
Boots and starts logging. Break flushes, plus flush timer.
Link broken
http://github.com/tz1/sparkfun in the hyperlog directory (source).
“Description: OpenLog is an open source data logger. Simple to use, simple to change. We wanted to create a serial logger that just worked. Power this device up and it will start logging any received serial data at 9600bps”
Datasheet (GITHUB)
“OpenLog is a simple serial logger based on the ATmega328 running at 16MHz. The ATmega328 should be able to talk to high capacity (larger than 2GB) SD cards. The whole purpose of this logger was to create a logger that just powered up and worked. OpenLog ships with a standard serial bootloader so you can load new firmware with a simple serial connection.”
________________________________________________________________________
I can’t get the darn thing to operate. I’m rather incompetent at some of this stuff . However, not just because of my incompetence, but also judging by the previous comments about the device, OpenLog is not as simple to get operating as stated.
PO’T
Apart from teething trouble at the start (the instructions for flashing are now out of date), I have managed to recompile and flash the firmware correctly. I have changed the code to 115200 in all cases.
I am using a 2gig SD card (not SDHC). Amongst other testing, I tested the open log by filling the card with 1.6gig of data (a 1.6gig file), then inserted the card into the openlog device. It fails to log with an "error writing to file" always. If I reformat and do not put 1.6gb data into the card, it always works correctly, it can log data.
My query is, has the openlog been tested to capacity of a 2gig SD card. Has anyone actually managed to fill a 2 gig card without errors?
I'm wondering at what point the logger starts to fail?
Any ideas?