SparkFun will be closed on Tuesday, December 24th, and Wednesday, December 25th, in observance of the Christmas holiday. Any orders qualifying for same day shipping placed after 2:00 p.m. (MST) on Monday, December 23rd, will be processed on Thursday, December 26th, when we return to regular business hours. Wishing you a safe and happy holiday from all of us at SparkFun!
Please note - we will not be available for Local Pick up orders from December 24th-December 27th. If you place an order for Local Pick-Up we will have those ready on Monday, December 30th.
The SparkFun OpenLog is an open source data logger. Simple to use, simple to change. We wanted to create a serial logger that just worked. Power up this device and it will start logging any received serial data at 9600bps. Sending Ctrl+z three times 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 three ctrl+z characters)
That's really it! OpenLog firmware is open source and is based on Bill Greiman's sdfatlib. OpenLog currently supports FAT16 and FAT32 microSD cards (we've tested up to 64GB!).
All the design files (schematic, PCB layout, firmware) are open source released under the CC-SA v3 license and are available through GitHub.
Note: New firmware is available which allows the OpenLog to be used in Arduino 1.0 and also allows for higher baud rates. Check the links below for more information.
Github (for latest code, issues, and documentation)
The OpenLog project is housed on GitHub! Please see the wiki for the most up-to-date firmware, feature requests, files, and datasheet specs.
This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.
Skill Level: Noob - Some basic soldering is required, but it is limited to a just a few pins, basic through-hole soldering, and couple (if any) polarized components. A basic soldering iron is all you should need.
See all skill levels
If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.
Skill Level: Competent - You will be required to reference a datasheet or schematic to know how to use a component. Your knowledge of a datasheet will only require basic features like power requirements, pinouts, or communications type. Also, you may need a power supply that?s greater than 12V or more than 1A worth of current.
See all skill levels
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
Based on 20 ratings:
1 of 1 found this helpful:
Simple tool for logging data. I'm using this to log flight data from an STM32F103-based ARM processor. Works well.
2 of 2 found this helpful:
I got one of these for myself two months ago but I didn't need it until today. I found myself wanting to capture 9600 baud messages from a new GPS module I picked up but the GPS being 3.3V and most of my kit being 5V I was pondering how to get going quickly. Aha, let's try that OpenLog I thought!
I connected 3.3V, GND, and then just the RXI of the Openlog to the TX from my GPS module and the happy blue blinking "write" light on the OpenLog confirmed my joy.
Then just popping out the microSD I was using and looking at it on my PC I had the log file I was hoping to see. It was too simple.
I'm happy also that for future work the OpenLog will work at 5V also. It was super convenient that it worked around 3V also.
I'll likely solder this one into my GPS for major data logging. And I'll buy another one for the convenience of debug and test like today.
1 of 1 found this helpful:
You can basically connect this to the programming header and it will collect all the data you print via Serial.Print. It's perfect for either data collecting or in-situ debug.
Although I haven't tried it, the docs indicate you can read from a memory card as well. Also, I am using mine with a 32GB card. I have not yet gone above the 16GB limit listed in the specs, but so far it is working fine.
2 of 2 found this helpful:
I'm using one of these as a flight data recorder on a quadcopter equipped with a Full Naze32 flight controller running Cleanflight and it just 'works'.
One of Cleanflight's many options is the ability to setup a flight data recorder using the SparkFun OpenLog. Basically, you flash the OpenLog with Nicholas Sherlock's firmware for Cleanflight, then connect the OpenLog to the FC, enable Blackbox in the Cleanflight GUI, and you're done. Brilliant!
2 of 2 found this helpful:
I love this product. Using Energia I was able to make it work satisfactorily. In the final system integration I encountered a few issues. One is the excessive emission that interferences with other sensitive components in my breadboard. It would be much better if the board is 4-layer with ground and Vcc planes properly utilized. The other issue is that there is no convenient way to reset the module to terminate the previous file and start anew. Poping the card out and back in is a bit inconvenient. If there is a way to add a small surface mount push button switch to short GRN momentarily with a pull-up resistor it would be perfect. I love the size of the board. It is the best I can find for doing wearable technology product development. Hope a new version will be available soon in the future. By the way, please use a 14.7345 MHz crystal so that the maximum speed of UART can be increased by another few times. Thanks.
1 of 1 found this helpful:
I just opened a com port and threw data at the board. It worked great!
4 of 4 found this helpful:
The physical size is amazing, it's only about the size of the MicroSD socket. Easy to use and works well, though can't sustain 115200 bps data rates on most MicroSD cards (the ~928 byte buffer overflows in 64ms at that speed, and most MicroSD cards have a maximum write latency higher than that).
I built a flight data recorder for multirotors which uses the OpenLog as its logging device. It's well suited for that application due to its small size, light weight, and easy set-up:
https://github.com/cleanflight/cleanflight/blob/master/docs/Blackbox.md
I've been a software engineer for 20 years but very intimidated by microcontrollers. With OpenLog, a $12 a u-blox, and soldering one connector I was able to record the flight path in 3D of my R/C model. My next project is a Pro-Mini 328 and an altimeter, with OpenLog. I don't really need it with this GPS project, but I'm hooked.
Using a FAT library on any micro controller takes up an absurd amount of space, with this board you don't need it! It's small, simple, low power, and just works.
Flight tested to 110,000ft for any High Altitude Ballooners.
If you need to do long term data logging of serial data, this is the ticket. We are using the OpenLog powered by a 6000 mAh LiPo battery. Will last for about a month or more between charges.
Very easy to hook up! Started recording right away! The tutorial is straight forward. Logged the serial output from Arduino and save it to the SD card as a .txt file. Have yet to play with the more advanced features.
I am buying a second one for another project.
have been struggling to build a data logger for PIC microcontrollers for a couple of months and making exactly zero progress. The FAT file system is complicated and bloated. This simplifies it SOOOO much. Serial communications are simple and striaght forward. Configuration file that is copied to the SD Card makes it easy to change the settings without having to reprogram the Atmel chip yourself.
Only thing I don't like is that this relies on a separately programmed microcontroller. I would rather have a native solution. However, until I can figure out the headaches of SD Card communications, THIS is my solution. THANK YOU SO MUCH!
Does exactly what it is supposed to do. No extra bells or whistles.
Based on brief usage so far, I would rate this as just about a perfect serial data logger. This comes up around here all the time & frees up a couple shop laptops that were pretty much dedicated to do the same job using a terminal program. We do a lot of serial data logging during new product development.
This also connects nicely to your RS-232 to TTL converter. Sometimes we log TTL levels, sometimes RS-232 or RS-485 levels, and the multi-board solution works well to let us mix and match.
I agree that an easy "start a new file" button would be useful, but not required. It makes me nervous to just pop out the card or power down without a firm "Close" capability.
Its document say that can handle anything to 1,000,000. But you got very unreliable recording at 230400 or anything more than that.
Hi, Thanks for sharing this with us. We have tested this unit up to 115200 many times. It should operate fine at that speed. If you are having issues at 115200, I would recommend starting a support ticket on GitHub. We can help you more there. https://github.com/sparkfun/OpenLog We have not done much testing beyond 115200, so there may be some limitations above that.
When the main app or kernel panics on a self-flying copter, there is generally no human to read the console. This little thing comes in handy after reconfiguring the kernel/apps to dump to serial on assert. Works pretty will. The config via file on the sdcard makes easy for field-tweaks, no need to hook it up to another computer.
Using this on my 250mm quadcopter with the Cleanflight Blackbox Log Explorer to adjust and tune my PID settings. This data logger is fast, simple to use and... just works. Currently recording at 250000 and it's working great. 10/10 would buy again.
Clean and easy data storage to microSD. On-board storage, data backup and smooth transfer - via .csv - to any analysis software, all in one step. After the serial terminal, one of my most used and most useful tools.
I was pane with other divace, but this was super easy and perfect.
If you are looking for a way to easily mount the OpenLog here is a 3D mounting bracket that I created while playing around with Tinkercad: https://tinkercad.com/things/90GBdK6gfK3
We love the OpenLog at Ardusat! Thanks SparkFun!
So cool! Thanks Ardusat!
hi Nate Here in Tokyo (2017) I got an old Openlog 09530 and had to buy a similar GPS module to your GPS Receiver-EM-506, a Canmore GMS6-CR6 http://akizukidenshi.com/download/ds/canmore/GMS6-CR6_v1.1_9600.pdf
I connected the GND and VCC of both to a 3.6v 800mAh battery and connected PIN 6 of the GPS module, "Asynchronous serial output at TTL level, to output NMEA message" to the RXI on the Openlog.
I put a Toshiba 16GB microSDHC UHS-I card in the Openlog and..... nothing, no blue lights to indicate writing...
The GND and + battery wires are soldered together with the GND and + of the GPS, and then both are soldered to the GND & Vcc pins coming off the Openlog The GPS module looks technically similar to Sparkfun's EM-506 (see below && links)
any help again appreciated very much!!!
GMS6-CR6(SIRF-IV) http://akizukidenshi.com/download/ds/canmore/GMS6-CR6_v1.1_9600.pdf Receiver Type 48 parallel channels, L1 C/A code Accuracy Position 2.5m CEP Velocity 0.1m/sec
Startup Time
< 1sec hot start(average) < 34sec cold start Signal Reacquisition 1s Sensitivity -150dBm acquisition -160 dBm tracking Update Rate 1Hz standard
(5Hz/10Hz special order) Dynamics 4G (39.2m/sec2) Serial Interface LVTTL level Protocol NMEA-0183 V3.01 GPGGA, GPGLL, GPGSA, GPGSV, GPRMC, GPVTG, 9600*baud, 8, N, 1 Datum Default WGS-84 User definable Input Voltage 3.3~6V DC +/-10% Power Consumption < 35mA (1Hz standard version,tracking
Got my OpenLog and it works perfect right out of the box. Logging data was cake! Using a PIC18F4620, basic UART at 9600. Works perfect.
Awesome product, I recommend it.
Hello, I am measuring current supply peaks up to 50mA, with 24-35mA average at the input of the OpenLog BB when a 9600baud stream of data is entering. I have tested three different OpenLog breakout boards and it is the same in all off them. The SD card is a 4Gb original Kingston. Is that power consume normal for these boards? I read up to 6mA -full load- in the documentation, and 1-2mA in iddle state (this point true and measured here). Please,could the SD brand/capacity be blamed for it or in your experience it happening the same? Thanks, Maxi Guzman
Hi Max - sorry for the slow reply. We do much more technical support on the github issues page. I started an issue for you there. I am measuring 7 to 8mA with a few peaks to 13mA. Not sure what voltage you're using.
I've purchased this awesome device, though I have one small problem with it: I have it basically 'sniffing' serial communications going from an Arduino to a radio transmitter (so everything that is sent to the radio is saved onto the SD card). About 50% of the time the OpenLog starts blinking and not writing anything - it goes into 'emergency mode', this means that the RX pin was LOW for at least two seconds.
As you can imagine, this is quite bad. There is a 50% chance that the OpenLog will do absolutely nothing upon boot. I know that I can reflash the Openlog to remove this 'emergency mode', but I don't have the required equipment (an AVR programmer), are there other solutions? Can I just put in weak pullup resistor?
Thanks
Hi all - please checkout new v3.2 of OpenLog. The config file now allows you to override the emergency check.
Sorry all! This request got lost in the comments. Please file issues and feature requests over on github where we can monitor it a bit better.
Member 247677 - to answer you question, you are correct in that it's a one line change to get rid of emergency reset checking. And you don't need an AVR programmer, just an FTDI and some wires. More info here.
I hope somebody will reply with a suggestion since I think I'm in the same boat. I've attached OpenLog to a 4800 baud device. If the device is off, RX is 0V and OpenLog goes into "emergency mode" if I power it on. I can't have "emergency mode" resetting me back to 9600 every time I forget to power the device before I power OpenLog.
Anybody else think that "emergency reset" functionality based off RX being low is a bad idea?
I'm having a related problem. My code base is fairly large (47KB) and takes longer than 2 seconds to upload to the Arduino. The Arduino bootloader keeps RX held low during the upload, and therefore if my logger is attached to the board while I'm uploading to the Arduino, it goes into "emergency mode" and resets everything, even overwriting the config file stored on the disk! So now it's overwritten my config file back to 9600, my Arduino communicates with it at a different rate, so as a result of uploading new code to my Arduino, my disk is now storing files full of junk. To get around this, I'd have detach the Arduino from USB, remove the logger, attach to the Arduino and upload, detach USB, put the logger back in, and re-attach USB. And if I get it wrong? Now I have to add "manually edit the config file" to this list! The factory reset feature results in a lot of problems in completely normal use cases.
So now is my only other option to flash the OpenLog with new firmware?
Ok, I downloaded the Arduino IDE, made the one-line modification to check_emergency_reset, bought the inexpensive FTDI Basic 3.3V, and followed the "Flashing Firmware" instructions. Also got the "Open Logic Sniffer - Probe Cable Kit" which made it easy to connect the FTDI Basic to my OpenLog, even though the OpenLog was already built into a project. No more emergency mode problem. Easy as pie.
SPARKFUN
?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
Got a couple of these, work exactly as advertised!
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...)
So, how do you actually upload a new version of code to the device?
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.
Wow this is really as close to plug and play as it gets. Not that I didn't have issues getting it together but once running, I could see just how functional it really is. Thanks to the turtorials, getting to the command set was straight forward enough. Auto file numbering, no special commands to open or close files, it simply does it. Power it up send it data power it down, open the file and there it is. It took me a bit to determine how I wanted to load it, but that was simply formatting serial preint commands. Very cool.Right on the mark with this product.
You made my day! Thanks for commenting. Let us know if there's any future changes you'd like to see.
it is exactly what is written!! you have just to conect 3 wires. you dont have to write a single line of code in arduino. it is like a spy no the wires.
Just bought one of these and I'm stunned by how simple is to set up and use. Just wire TX, RX, Vcc and GND; power it up and start sending data through the USART/UART interface of your microcontroller. Just be sure to cross the RX and TX lines. That's it, you have a datalogger!
I haven't been able to get mine working. Filed an issue over at the github page (http://github.com/nseidle/OpenLog/issues#issue/48)
Essentially the problem appears to be with activating the SD card, though the light that's supposed to tell me it's having trouble reading the SD card isn't blinking.
Hi StarkRG. You get a big thumbs up from me. Thank you for posting your issue to github. Sounds like you had a heck of a time chasing down the bug, but it ended up being a cold solder joint on your header into OpenLog. Nice work! I'm glad you got it fixed.
I'm trying my new OpenLog, but in Hyperterminal I see
12>
Why don't start with
12<
????
I need the
New File Logging (default)
function.
Can you help me?
It looks like your unit is automatically entering command mode ('12>') instead of logging mode ('12<'). Do read the datasheet over here: http://wiki.github.com/nseidle/OpenLog/datasheet
If you have any version above v1.0, you will be able to put the module back into automatic logging mode by using the 'set' command.
Hi Sparkfun!
What is the accuracy of the crystal oscillatory on the newest version of the openlog? Do you have the oscillator's datasheet? I'm working a version of the openlog with timestamps and I'm trying to calculate the maximum expected drift.
Thanks, Sima
It's a resonator rather than a crystal. Part#: CSTCE16M0V53-R0. +/-0.5% is pretty poor for RTC applications but it was chosen for size/cost reasons.
Is there any way I can log straight from a sensor? I want a really small form factor so it fits in a shoe
It's technically possible but tricky. You can read more here about re-flashing the firmware. The trick will be to include both the OpenLog logging bits of firmware and your custom logic and sensor firmware.
What is the part number for the micro SD socket?
Very good product. I'd like to know if there is a file size limitation ? Thanks and best regards Francis
I'm trying to connect this to the venus gps module (https://www.sparkfun.com/products/11058) but the gps won't power on.
Venus Openlog GND GND VBAT Battery + V3.3 VCC GND Battery -
Any ideas why?
I've been trying to get this to work with the Fio v3 using SoftwareSerial, but I can't seem to receive data from the OpenLog. I want to leave the Fio's main Serial for debugging over USB, D2 and D3 are used for I2C, Serial1 is used for the attached XBee, so I chose SoftwareSerial on D7 and D8 (RX and TX, respectively, connected to TXO and RXI on the OpenLog, respectively). I chose D7 for the SoftwareSerial RX since I read somewhere that it is the only one able to be used for RX (besides D0, D1, D2, and D3, which I stated were already being used for other purposes). Still, I cannot seem to read data coming from OpenLog, particularly when I'm trying to send it commands while in Command Mode.
If other have gotten this to work, could you please let me know what you did? Thanks!
Skip software serial. On the Fio V3 the hardware serial is on D0/D1 (Serial1), but the USB connection is separate (Serial). Try that and if you are still having problems try emailing techsupport@sparkfun.com
Is this in any way compatible with a bare attiny programmed in the arduino IDE?
Absolutely. All you need to do is output a serial stream. As long as you have a hardware serial port, or a software serial library you should be able to connect the 2.
Is the OpenLog capable of higher baud rates like 250 000 Baud? So the data transmission takes less time (it doesn't get data non stop). Another advantage of this baud rate is that it can generated perfectly out of a 16MHz resonator while 115200 can't.
Yep. Supports any baudrate from 300bps to 1,000,000bps. I haven't tested above 115200 because of silly windows limitations but the ATmega can handle it.
FYI, you can also check my Open Source Voltage logger and Pressure & Temperature Logger projects that run on on my Scorpion Board. It uses log_fs a simple, but robust record-based file system for AT45D DataFlash that I'm quite proud of.
How much does this weigh?
I just bought an Openlog datalogger, and I using that to record RAW data form an NVS8C GPS module. Openlog works amazing, but I have an issue with the GPS, he needs to be told on each startup to go in raw mode. Would it be possible to make Openlog send a serial string on startup? Is as simple as adding a serial.print and a delay at the start of the loop? (I'm new to programming :roll: )
Thanks
Thanks for using OpenLog! To answer your question: Yes! OpenLog is a reprogrammable ATmega. You're on the right track - just a Serial.print(blah) and it should output what you need to the GPS module.
I received my 2 of these today and they look like the picture here. Unfortunately, your schematic doesn't go with the picture. Schematic shows a DTR. On your picture and my 2 boards it shows GRN and BLK at the edge holes. Please post updated schematic or explain.
The GRN and BLK naming convention used in on the silkscreen of the boards is intended as a more end-user friendly way of explaining which way around a programming cable, such as the FTDI Cable 5V is to be connected - with the green wire on one end, and the black wire on the other. I agree that it would be nice if the schematic would also indicate the on-board labeling convention.
GRN is actually DTR on the boards that support it, and BLK is Ground.
( The one next to BLK (Ground) is often labeled in silk screen as GND when it's wired straight to the same ground plane, but in the programming cable would technically be CTS. )
If you'd like to take a closer look, the Eagle files are available in the Github repository.
Hi all! 've got my OpenLog and it works. I'm trying to drive it with a uM-FPU V3.1. If I send data from FPU to RX pin it's all ok, Openlog creates LOGxxxxx.txt files corerctly, but if I try to go in command mode sending 3 ctrl-z followed by new and/or append (filename.txt) command OpenLog doesn't create that file but write the sent command on the LOGxxxxx.txt. Is there someone working with uM-FPU and OpenLog that can help me? thanks
I want to drive OpenLog from a 5V Arduino Pro Mini. The header is the OpenLog source file says "Input voltage on RX-I pin must not exceed 6V". The datasheet of atmega328p says max input voltage VCC+0.5V which is 3.8V given the 3.3V VCC. Can I drive OpenLog from a 5V MCU without a level shifter?
Wow. After all these years I don't believe we've had this question! I applaud your datasheet diligence.
Many many people have attached an OpenLog to a 5V Pro-mini (it's like peanut butter and jelly really). The clamping diodes on the RX pin of the ATmega on OpenLog can handle voltages up to approximately 6V. They can probably go higher but Atmel has to account for all sorts of environments and applications. For SparkFun users in general I would recommend staying within a 6V max on the RX pin but otherwise you're good to go.
I am looking at the schematic, the atmega328p runs at 3.3V and 16Mhz. According to the atmega328p's datasheet this is outside the spec (13.33Mhz max at 3.3V). Am I missing something?
Yep! We totally and cognitively run the ATmega328p out of the recommended range for frequency+voltage. We do this because we make a calculated risk: potential breakage for better recording performance. The likelihood has proven to be immeasurably small; out of thousands built we haven't found one to be defective but functional at 8MHz upon repair. Your mileage may vary.
Can anyone tell me what the fastest write and refresh rates are? We are sending 40 Bytes 20 times a second at 115,200 Baud over serial and need to log the stream. Also, what is the largest log file it can create and store? Thank You.
800 bytes a second shouldn't be a problem. That's 800 * 10 or 80,000 bits at 115,200 bits per second possible. OpenLog can handle that no problem. If you plan to log indefinitely you may have dropped characters. See Continuous-Logging for more info.
Largest file? Big. Really big. I've seen multiple hundred megabyte files created with OpenLog across many many days but we recommend you create a new log every once and awhile (ex: daily) to keep it easier to figure out which log goes with which data.
Received the openlog connected it to a max232 chip for rs232 operation. It will log data fine at any baud rate. However when I try to talk to it with hyperterminal I get garbage output. It still will respond when I send a command but I get garbage back. I get the best results at 4800 baud, then it almost displays correctly. Any ideas?
never mind I found my problem. Missing a connection in my converter curcuit
Is the source code for Openlog not available?
It's on GitHub! Check the link above.
I see the firmware hex file but not the source code. I need to modify it for my application.
Here's the link to the .INO sketch on GitHub.
Sorry I didnt realize it was a ino file Thanks!
This is hands down one of my favorite products. Plug it into the 6pin header of an Arduino Pro/Pro mini, put out a few serial.print commands and you have an instant data logger. Or if you have something that spits out serial data that you want to capture, just match the BAUD rates and wire it up to record!
Here is a tip. Use a comma to separate all of your sensor values. If you add a time stamp with millis(), you can graph your values with respect to time by importing the .TXT file as a comma separated value file to a spreadsheet program like excel.
Something like... void setup { Serial.println("Time, sensor1, sensor2"); // header } void loop { Serial.print(time); Serial.print(", "); Serial.print(value1); Serial.print(", "); Serial.println(value2); }
Then snag the .TXT off the flash card, change the extension to .csv, highlight your data and graph!
I am going to use the OpenLog to save NMEA sentences from a Lowrance Elite 5 fishfinder/chartplotter. The device has a cable with yellow (transmit), black (ground) and red (receive) wires. I will not be using the red cable. Would I solder the yellow wire to the RXI and the black to the Black? This unit will be portable which includes a 12V battery inside the pouch. I wire the +ve of the battery to the VCC and the -ve to the GND?
Since this will be used outdoors and on a boat (but within a Lowrance portable pouch) can anyone recommend an enclosure for the OpenLog?
Thanks for any help
This is a great design with one exception: I would like to know when the data was loged, so a battery powered RTC and the option to insert the time before or after a carrage return. I thought about doing it, the board is not much of a problem but a quick glance at the Arduino IDE looks like it has unneccicary complications and overall it is more of a project than I want to take on at the moment. This seems so useful that I am mentioning it to see if there is any interest. I would use thru hole connections based on the Ardino Pro Mini in so far as practical for the benifit of easy user mods to add specialized funcionality. If there is any interest in this product, please leave a reply.
We would be happy to see alternatives and derivatives out there! An RTC has been requested a few times and it's not something we plan to add to the core design any time soon. In the interim, I recommend using a GPS module to get the current UTC time. That's what I used in the Illumitune project. A GPS is way overkill but it has the benefit of always knowing very accurate time.
I wanna connect OpenLog with Arduino Uno to save accelerometer readings. I m not familiar with the process. Can you give me very detailed instructions how to wire them and how to program them ? Thanks
hI I'im using new firmware V3.20 i'm flashing with atmel studio but there is a problem with Write offset command. i'm create a file create toto.txt and add text : write toto.txt <hello john my name is marc i send Two CR < >
but if i want modify txt "john" on offset '6 'of text i enter write toto.txt 6 <mik folowed by two CR < >
I think there is the < after the first CR in write offset kill the next caracteres strange
How is it possible that the Openlog device withstand voltages greater than 3,3v @RXI? I mean there is no voltage converter in the shematic and the atmega is powered with 3,3v.
Is there a way to make it "spit out" the contents of the memory over serial too? It would be cool if I could have it record servo positions then repeat the movements
This is truly a simple to use data logger. I hooked it up to a HTU21D Humidity Sensor Breakout and was logging temperature and humidity first try. Great job Sparkfun!!
Hello, could someone indicate me where portc is initialized? PC2 pin is connected to CD of microsd socket and I cannot locate the relevant code... I guess arduino ide has limited searching capabilities...I am new to arduino... Thank you a priori.
Arduino is a bit of a shift from regular C on an ATmega. You don't have to init port C but you can init a given pin. For the card detect pin (connected to Arduino pin called 'A2') you would use something like this:
I can't remember if the CD pin is NO or NC so I may have my logic reversed.
we have a problem!!! we are using 9600 speed for the RX/TX. but the program has some interrupts. So, we receive many wrong characters inside. It is impossible to stop the interrupts (zero crossing and triac control) during writing to open log. What can we do?
I use OpenLog to log data at remote locations for long periods of time – months. I have no ability to change cards on a regular basis. For my company, it would be useful if logger has a few of the log4net features like split log files and rotate log files based on file size, or rows. Is this something that you could do?
Definitely possible but would require custom firmware or a controller sending the commands to OpenLog to have it go into command mode and remove/overwrite previous logs. I don't see the general user needing this feature but you can pose the request on OpenLog's issues page.
I am testing a bunch of OpenLogs now and so far they are working perfectly. My application, when in production, will be remote – the devices won’t be accessed from months – maybe even a year or two and will run continuously during that time. I need to deal with large file sizes and full cards. Is there any chance I can get a few programming enhancements – like a rotate log feature similar to log4net set from the config.txt file?
Basically we need a rotate log file function. Implementing the function would depend on if you can determine the TXT file size and know the remaining space on the card or not. I you don’t know the available space on the card, then we could use a “create a new log file after x writes” (or rows) function in conjunction with a “max number of log files” parameter. This way for example I could write 1000 rows in 10 files and then go back and start at file 1 again. If you know the TXT file size it could be a little more sophisticated.
Please let me know if this is possible and if I can help in any way.
Keep up the great work.
Thanks for the positive words! Please post a request on Github issues page. What you are asking for is pretty complex. I'd recommend leaving it to the host to drop to command mode every few weeks to rotate between/delete logs. OpenLog is completely open source so you can re-purpose the code if you'd like and reprogram the ATmega328 on OpenLog to do very specific questions like you're asking. Hope this helps!
Love mine! Works super well with little/no fuss.
I added timestamp support to OpenLog because I needed it for my own project. If need one, check the codes from here: http://antibore.wordpress.com/2013/09/13/timestamp-support-for-openlog/
Gentlemen,
I am trying to log nema0183 directly from the gps unit to the openlog. Seems pretty straight forward with the advent of this dandy little Openlog unit. I have verified the outputs of two gps units with an ftdi 232 to usb board. Both units stream perfect sentences to the terminal screen. I am watching the 0-5v nema burst on the scope and verify that the open log blue led is active during each burst. BUT... my openlog file is full of ascii nonsense. i have discovered that 19200 is the minimum for proper nema sentence output to the terminal, unlike the 4800 nema spec. i have tried every baud rate, matching the openlog config to the gps setting without success.
Any suggestions would be a great help. Thanks!
The OpenLog expects TTL-level serial data. If your GPS output is RS-232, then the polarity is likely reversed from what the OpenLog needs. See this tutorial page, and check your system to see whether the waveforms are reversed or not.
How can I set the Date/Time so that the DT Stamp on the log file is (semi) accurate?
There is not currently a RTC feature built into the OpenLog. If you'd like to request one, please consider filing an issue over on the github page.
Short of that, I'd recommend getting a GPS receiver. Once powered up, it will give you better than second accuracy.
Hi, I have the following problem. I send data to the OpenLog device without a problem, I usually find a single file (LOG#####.TXT) but when I'm sending data for almost an hour I find multiple files instead of only one (as if I would restart my arduino).
I checked if it is a power failure, but I have found that the Arduino does not reset at any time. I have also monitored the output with a RS232 shifter device, but any errors appears. I also checked if I'm entering in command mode accidentally, but it isn't the case. Any idea? The behaviour is like a reboot in the OpenLog.
Thanks in advance for any help.
Please considering creating an issue on the github page. The comments section on a product can become confusing.
Be sure you are powering OpenLog with a solid 3.3V or 5V source. If you are powering large things like motors, considering giving them their own power supply.
6 mA is the maximum current draw of the open log without considering the current consumption of the micro sd card ? I have seen generally a sd card takes 100-200 mA when reading/writing.
I too have seen large current draws when reading/writing but this occurs only for a fraction of a second and only when the read/write occurs. On OpenLog the ATmega buffers quite a few bytes between read/write operations so the overall average is around 6mA under active writing.
Has anybody used these to record I2C data from sensors without another micro controller in between?
I don't know of anyone working on this project but it's worth filing a request on the issues page. OpenLog doesn't expose the I2C pins so we would need to do I2C over serial. Not a show stopped but it makes it a bit more difficult.
Is the schematic broken? I'm getting a .pdf with a few misplaced symbols on it.
Looks good here, using Chrome's built-in PDF viewer and PDF X-Change.
Is there any way to have a Mega write data to this and an xbee at the same time?
I have data incoming from an ArduIMU to the Mega, but I don't know how to get the Mega to write the data simultaneously to both the openlog and xbee.
Yes, you should be able to hook both the OpenLog and the XBee to the Mega's serial TX pin at the same time.
Great info, thanks.
Recently used OpenLog in precise GPS project - hooked up the RXI of OpenLog to the Navilock EM-500 receiver TX and RX of JK Devices FTDI adapter. Both EM-500 and FTDI adapter using the 3.3V logic. Works perfectly.
Do you have to use an additional microcontroller? Can you not use TX/RX for one and PWM for the other?
I'm afraid I can't get the context of your question. Are you talking about Memeber 423103's Mega based question or are you talking about PWM pins on the ArduIMU?
Hi Nate, thanks for the quick replies. I was responding to M. 423103's question. However, thanks for the response below, that answers another question I had.
I'm about to buy a couple of these things to log the data stream coming off an ArduIMU. Did you have any issues getting the IMU to write to the OpenLog?
Once you set the correct baud rate on OpenLog there shouldn't be any problems.
This is working when using USB power, but not battery power. Setup:
5V Arduino's TX -> logic level shifter -> OpenLog's RX
OpenLog's TX -> resistor -> Arduino RX
Arduino's reset pin -> logic level shifter -> OpenLog's reset pin
The result is that, when the Arduino is powered off of USB, this logs fine. When it's powered off of a 11.1V LiPo battery (full charge) via the Arduino's barrel jack, the logger resets somewhat randomly about four times per second.
Can anyone see why this would happen?
For reference, the logic level shifter is the SparkFun BOB-08745.
I had a high-current device on the same bus. Interestingly, a separate mistake was drawing the 3.3V bus to 5V, but when the high-current device was on the line, it was pulling too much current and bringing the bus back down closer to 3.3V. When I used the battery, which delivered more current, this didn't happen, and so the OpenLog would reset. Nasty problem. Fixed with a separate bus for that current-hungry component.
Hello, we got an issue with Open Log, because before we bought it, we saw in the datasheet that it would consume less than 6mA ( in a forum at most 15mA). Yet once plug, Openlog with the SD card wouldn't boot unless we got at least 30mA on the power supply used to test(seems like Open log need a high current spike at boot)How to avoid that spike of current at booting? thank you. Adding a big capacitor is not helping. More modules were tested with same problem. we are using telephone line to power our PCB, and can't get more than 18mA on long line. also we can't add a local battery, nor external power supply.
Hi Member 413088 - we do tech support for the OpenLog over on Github issues. There is a issue started on power consumption there. I can't replicate your problem. Please let us know more specifics such as what voltage you're running your board at.
I'm getting a stream of 1s back from the data logger over serial.
I'm using a 5V Arduino, powering the OpenLog off of its 5V pin, and sending serial over to it and getting serial back. When the TX from the Arduino is not connected to the RX on the OpenLog, the OpenLog reports "12<". However, when I connect the Arduino's TX pin to the OpenLog's RXI pin, I only getting "11111111...."
While the datasheet says that the RXI pin can take up to 6V, I notice that the schematic shows regulation of VCC down to 3.3V, while the RXI pin undergoes no translation and is connected directly to the ATMEGA. This makes me think that in fact a 5V TTL signal from the Arduino is too high and is causing the ATMEGA to result. Just a guess though.
Has anyone else seen this? The closest thing I found was unanswered (https://github.com/sparkfun/OpenLog/issues/138).
For reference, everything works correctly when I use a 3.3V FTDI.
I just soldered up a TTL logic level shifter (the Sparkfun one), taking my 5V TTL on the Arduino side down to 3.3V on the OpenLog side, and now it's working. It looks like the 5V serial signal in fact is unacceptable to the ATMEGA, despite that the datasheet suggests it can accept 6V. Big debugging nightmare! Does anyone know any better way to do this?
Could I get the part number for the 16 MHz Resonator? I am replicating the circuit with the EN line of the regulator exposed and would like to use exactly the same parts for the first run. The Eagle BOM identifies it at Part XTAL-08900 but I can't seem to find this part anywhere on the web site. A digikey, Mouser, or manufacturer part number would be helpful. Thanks.
This should be what you're looking for. (And great idea bringing out the regulator enable line!)
Thank you
I wanted to build a simple tempertaure data logger with a Picaxe and temp sensor.Has anyone used this with a Picaxe processor? If so, some sample code sure would be appreciated to save me the time. Thanks.
I am using the open log to log weather and cosmic ray data once a minute. I have an Atmega 328 connected on the bread board to the open log for data logging, and to a FTDI header for programming. The open log log's data fine when I have the FTDI adaptor (DEV-09716) attached, but doesn't log anything when It isn't attached. I assume I have a hardware failure, and I forgot to connect something to the open log that the FTDI is connecting for me, but I checked and the TX and RX pins are connected properly, and so are GND and VCC. Right now my only guess is that the FTDI is putting more capacitance on the power supply that causes it to start working, but I haven't tested it yet. However when I measured the voltage W/ the FTDI adaptor both the TX and RX lines sat at 4.7 to 4.9V and W/O it was 3.3 for both of them. Can I please get some help?
I fixed the problem, there wasn't enough capacitance and the bypass caps on the FTDI were making the open log work. Make sure you have bypass caps on your power supply, I added a 10uf about 10cm of wire away and a 0.1uf right on the header of the open log and it started working perfectly.
Thanks for coming back to tell us how you fixed the problem! Decoupling capacitors are a hard lesson to learn. Glad to hear you got it working.
For anyone pulling their hair out about updating the firmware, I thought I would add something that may be common knowledge, but it took me 4 hoursof searching through the Wiki resolved issues to find it.
If you are getting compile errors that say "expected constructor, destructor, or type conversion before "
Move the SdFat and SerialPort folders OUT OF the unzipped folders and directly into libraries. They cannot just be unziped into libraries without this move.
It now compile on Arduino IDE 1.02
Can I use this device to receive RS232 data stream from another device and store it on a micro SD card? I mean as simple as that? Do I need a Level shifter in order to use it?
OpenLog expects TTL voltage levels. RS232 will not work and could (maybe) harm the OpenLog (probably not though). You'll need a MAX3232 or a shifter circuit.
Hello, I have mounted one empty Atmega328 in my own board to be sent data from a second MCU. How can I flash the last firmware into the 328? I have flashed 'something' able to create a new file in the SD, but I get junk characters when I try to write some data sent through Tx. i am using an ATMEL programmer to ISP the AtMega. Please, help. Thanks.
Great little piece of hardware - I was able to build one over the weekend using the firmware, schematic and other documentation linked on here. My only hardships came about from not setting the boot size fuses correctly. And I had to use an STK500 programmer for both the boot loader and the main firmware as I couldn't get the Arduino IDE to connect to the AVR (started with a bare-metal chip). I know you guys just did a write up on your open hardware business model, but thanks again for supporting the weekend hobbyist!
Hmmm... Been using these loggers for over two years. Latest batch will not allow me to update the firmware to my own, using the 'older' method. Looking at the OPENLog website it appears the bootloader has changed. The only instructions I can find for updating the latest version is to use Ardunio stuff. Since I have a fully tested and working hex file that I want to upload, I cannot use the new instructions. Anybody any idea on how to update the firmware (I have a hex file) with the latest (post March) bootloader? I've a nice little serial/TTL converter all ready and willing :-) P.S. I re-tested my 'old' method on an older OPENLog device and it works fine. Just not on these new suckers.
The new bootload (Optiboot based) is smaller (512 bytes vs original 2k) and faster (115200bps vs original 57600). You should be able to use the same hex but modify AVRdude to bootload at the higher baud rate.
Openlog Power
So i have a arduino pro mini 3.3v, oled display ssd1306, rtc and openlog.. i left this running with two AAA batteries for a day, every 3 seconds i was sampling data and recording it to the txt file on the openlog.
openlog was able to record 4800 data rows in about 4 hours powered with the AAA batteries, after that 4 hours(pretty good) my arduino pro mini and display keeps working, also the rtc but it is not longer recording. with time the battery voltaje drops to around 2.8-2.6. and openlog stops writing to the sd card.
do you have any idea why? if everything else is working?
Is it possible to write multiple files with OpenLog, or is it limited to just one file? If multiple files are allowed, how would I go about doing that? I need one file to record GPS coordinates and altitude, and another file to record all of my other incoming data (temp, pressure, etc). Any suggestions?
Currently we are focusing support for writing to one file at a time.
For your issue, I'd recommend recording all the information every cycle (even it's redundant). Don't forget the commas between: lat, long, alt, temp, pressure, time stamp
Hi Nate, I'm just wondering whether (you think) your code for the OpenLog would work on a ATMEGA32u4 out of the box?? I'm keen on using a fair amount of your code as the CLI and epic datalogging abilities are very attractive, but I need to use a couple of I2C sensors and fit the whole thing in a very small, circular space. I've gone for the 32u4 because you sell it in a TQFP, and it has built in USB, so I may try something like keyboard log output or mass storage abilities...
It should be very close. Arduino (and the GCC compiler underneath) does a good job of making code portable. It probably won't compile out of the box for the 32u4 but with a few modifications it is certainly do-able. Something you should look out for though is the amount of extra flash that the 32u4 does not have available for user sketches (because the 32u4 has a much larger CDC bootloader than the ATmega based Arduinos).
Is there a setting to change that allows an OpenLog to properly read an inverted RS232 signal? The MaxBotix range finder (also sold by SparkFun), outputs the serial as 0-Vcc. Using PuTTY on my PC, I can easily read the MaxBotix range data. However, the OpenLog just produces a log file of gibberish characters. I am hoping to avoid having to implement this in hardware...
I'm slightly confused by the fact that using the provided wiring scheme (or a crossover board), the pin labeled "GND" on the OpenLog unit goes to the pin labeled "CTS" on the FTDI board. This is fine; I think we're assuming that the FTDI board is setting CTS low all the time. But I want to make sure that if I use another SparkFun serial gadget on the other side, namely the Razor 9-dof (which other than the CTX/RX switch has the same pinout as the FTDI unit), it's okay that the OpenLog board is getting its ground from CTS. Doesn't this wiring assume something about the behavior of CTS? Does it require CTS to be held low, and if I don't explicitly set CTS in firmware on the Razor 9-dof, does anyone know if it's set low by default?
Thanks!
Which firmware do the now-shipping OpenLogs come with? For arduino, are they 1.0 compatible or do they still require a manual firmware update?
OpenLog starting shipping with Arduino v1.0 compatible firmware in February of 2012.
Please is it possible to know the exact procedure to upload FW 3.0 to Openlog? I see many different methods around depending on FW version! 1) How to connect the pins to an Arduino board to upload FW (?) 1b) How to connect the pins to FTDI board to upload the FW 2) Which board to select in IDE 3) Which files to change in IDE folder (?) 4) Which code to upload depending on bootloader (original/fixed)
DID YOU KNOW? :-)
If you upload proper firmware to OpenLog, you can use it as a standalone digital logger without any hardware modification: TX and RX are indeed actually digital pins 0 and 1. :-)
Anyway breaking out an analog pin too would be fine.
Apart from this, I still can't get this cute thing working, and I can't decode the LEDs code to determine which is the error encountered by firmware, which creates files but does not fill them up with data and does not show any prompt.
While not strictly an OpenLog question, it does apply to my OpenLog file.
I logged data from a few different sensors during a balloon flight. Log file looks chunks look like this:
Time: 0:1:55.Date: 0/14/204 Fix: 1 quality: 2 Location: 745.1949N, 8851.7187W Speed (knots): 21.07 Angle: 12.39 Altitude: 9213.40 Satellites: 8 accelerations are x, y, z: 306 326 367 External Temperature: -28.9200000762C / -19.4080009460F. Humidity: 15.14% Temperature: 6.40 *C Pressure: 35965 Pa Altitude: 7930.44 meters Real altitude: 7948.06 meters
Log file contains a ton of these entries. How can I parse this information in to a spreadsheet for graphing? I'm stuck trying to figure out how to get everything into columns and formatted to be useable. I didn't think of this beforehand, or I would have altered the Arduino script to write it as a csv.
Thanks!
We've all realized at one point or another that we forgot to insert commas into log files. The work it takes to recover will remind you not to make that mistake again. ;)
Basically, you need to get commas in there. But it may not be as bad as you think. You can often load it into a text editor (we use Programmer's Notepad), and do a bit of search-and-replace. You were smart and used consistent labels for your data, which you can now search on to add the commas. For example, replace "Date:" with ",Date:,". Note the additional commas, that separate the data and the label. If you do this for every label you have ("Fix:" "quality:" "Location:") it will only take a handful of S&R's to fix up the file.
In cases where that won't work, you may need to write a bit of code that reads your log file, makes some decisions, and outputs a second file / text stream with the commas inserted. You could do this with almost any language, and can even do it on an Arduino. It's a bit hidden, but there are string-processing functions available on Arduino; take a look at the StringObject page for details. Good luck!
(Edit: One other idea: many spreadsheets will let you separate columns on other characters besides the comma, including using the space character. You might try loading it using space as the separator. You'll end up with lots of extra columns, but you can always delete them in the spreadsheet later on.)
I did some quick&dirt test with the Openlog, but I'm confused: when I connecy the device with a FAT32 formatted 1gb card (formatted with specific SD formatter tool from Panasonic), one led lights up then turns off, then the blue led lights up and turn off, and so on alternatively, then all leds go off. Upon connecting, bith with Hyperterminal and Arduino IDE (serial monitor), I can't see any prompt, and nothing happens upon sending characters. When I disconnect the device and put the card in a reader, I see several files, but all of them are empty.
Which is the exact "LEDs sequence" at startup? How can i know what is going wrong?
FYI: I was getting:
avrdude.exe: stk500_getsync(): not in sync: resp=0x00
when I tried flasing latest firmware to some new OpenLog cards using FTDI breakout. I was able to work around this by using 115200 baud instead of 57600:
C:\openlog>avrdude.exe -p atmega328p -P COM6 -c stk500v1 -b 115200 -Cavrdude.conf -U flash:w:main.hex
The older cards seem to require 57600 the 10 new cards all required 115200. I didn't find this documented anywhere.
The example Arduino sketches link is broken, anywhere else to find an a sketch that has solid examples?
in almost all links of the product give 404 error
If you want to upgrade the firmware on this board with the latest version, you don't have to go through the hassle of installing a custom version of Arduino as suggested. The compiled hex file is included in the download. There is a great little program called XLoader (http://xloader.russemotto.com/) which you can use to download the firmware into the openlog. (No avrdude knowledge required)
Yep... the github posts above are dead, and need to be redirected.
Also, the wiki on the github is out of date. For flashing firmware it still talks about needing to hack the HardwareSerial.cpp file. After looking high and low for the new HardwareSerial, I finally found the correct instructions inside the OpenLog_v3.ino within the downloadable zip file. The instructions there point you at the Bill Greiman libraries needed to compile in Arduino... Once I figured that out, everything worked fine.
Tom
Yup! I concur with tommy321. The wiki here http://wiki.github.com/sparkfun/OpenLog is of some use but is outdated. Download OpenLog_v3 (Arduino One compatible) here: https://github.com/sparkfun/OpenLog (I used git clone) and read the comments to download new libraries that need to be installed before you upload the sketch to your openLog.
Ohhh! Also note the FTDI wiring jpg that is included in the downloads. You need all 6 wires connected, not just rx,tx...
Looks like the github links above need updating... for example, I believe the home page should be:
https://github.com/sparkfun/OpenLog
If OpenLog firmware is opensource... why is it distributed in unreadable .cpp.hex format? How can I upload my own firmware to OpenLog in such a way it can work in standalone mode without needing another ATMEGA328 mounted on an arduino board?
The firmware is indeed open. You can view it on the git hub repo. If you know how to modify an Arduino sketch, you should be able to modify the firmware for your own uses and make OpenLog record events without the need for an external microcontroller.
Being based on same chip of Arduino, can't this device be used in standalone mode to record from digital/analog pins rathe than serial port? Does it write data to files together with data acquisition time? Does it require an external RTC?
Specs say you can use 16 character filenames such as 123 ABCDEFGH.TXT, which is just fine, but Datasheet pages say you can only use 8-dot-3 names. Can someone clarify? Thanks. :)
Sorry for the confusion. We try hard to keep all the documentation up to date. 8.3 names are currently supported. Where are you seeing the bad information that 16 characters are? We will fix it I just can't figure out what 'Spec' you are looking at.
18 mA current!? I'm working on a very low power logger and am planning to use this logger. I wanted to check the current draw and I am seeing it settle at a fairly large 18 mA (3 times larger than the "worst case" in the datasheet. Am I missing something? I'm hooking it up with a 3.3v source and putting my multimeter between the 3.3v and Vcc. The only other pin I have connected is BLK to ground. I have an SD card in and I am getting the single blue LED flash. I've also tested it with an FTDI Basic and it seems to be working fine - just drawing more than the expected current
Have you tried running it on 5v? There is an on-board regulator, and the core is a 3v3 chip(I think), so 3v3 into the regulator, and asking for 3v3 out of the regulator might be causing problems. I am borrowing from old linear regulators - the input voltage must be greater then the wanted output voltage. If the core is running at 3v3, you have to feed it more then that as a power source, UNLESS you bypass the regulator...
Hello,
I get an OpenLog with firmware v1.51 as I remmeber. I have a standard FTDI cable.
I downloaded newer firmware through the git repository. I can upgrade sucessfully to any firmware version. I Only have Rx-Tx wires with Vcc-GND. I power up openlog whild pressing enter with: avrdude -p atmega328p -P COM2 -c stk500v1 -b 57600 -Cavrdude.conf -U flash:w:main.hex
It's programming without error. However, open log is only showint one 1 at hyperterm when starting. I do not have anymore 12>.
What's going on ? any ideas ?
Can you please tell me how can upgrade my firmware. I am havving some doubts... thanks
Find out : the computer corrupted the Sd card. reformating the card make its working with latet firmware.
Hello, I try to upgrade to v2.51. I use Arduino 0022, compile OpenLog_v2 and I have no error compiling. When I upload the code I think the openlog doens't respond and I got the error: avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51 In normal situation the openlog doens't work. I connect it to PC, STAT2LED blinks one time and I receive in in terminal "1"... It's possible that tx is dead?? Thanks
I wish there was an SPI version.
Great section "i just want it to work" and it does.
I sent tech support a note suggesting that the output of the 3.3 volt regulator be available via a pin on the board. Let's hope for the next revision.
I am extremely frustrated with this board. I bought it some time ago, but only recently had the need to use it. If it had worked it would have really helped me solve an important problem. However, instead, I spent the entire evening trying to debug this thing. The short version is that my board must have an older software revision because, try as I might, I can't get it to come up in logging mode and log data (yes, I even tried the tie RXI to ground and power up trick, with no luck.). It always power up in command mode. Then, it took me several house of fruitlessly trying to use a CONFIG.TXT file before I figure out that my version must not support this, either. But, even here I'm only guessing because, even after I hooked it up to a serial adapter, I can't seem to find a way to put it back into logging mode, nor can I even find a command that will tell me what version of software my board is running (did the designer forget to add these most basic features to the software...?) Argh... I suppose my only option is to blindly update the software but, two things, I don't have the required FTDI Basic board. Geez, this just keeps getting better and better.
I set the config system mode to 2,my Hyperterminal start with 12>,but when I enter 'new a.txt' ,nothing has happen,why can't I creat a new a.txt .
why my command is no use?
I'm trying to find or make something that will log serial data out of an controller. The controller will output serial data, but needs to be asked to send it. I've looked through all the documentation but can't find the answer anywhere...
Can the OpenLog send a command to trigger some data? As an example, I'd want to send 02 0A 41 01 00 02 69 01 00 69 02 00 03 19 01 as a hex string which should then give back something like 02 03 40 01 21 41 01 02 16 03 5A.
I then would need to check the last few bytes to see if it's an error and if not, store the data from some bytes further back in the string.
If I haven't asked in the right place or you need some clarification, please shout :)
what version of the firmware do these currently ship with?
I Have loaded Version 2 in my new open log hardware and on power up i am getting 12< but after that i am logging data with 9600 baud rate and i am unable to log it and not getting echo too.
Please help me what should be the problem?
Thanks
Priyank Patel.
Please post issues to Github
OpenLog does not echo characters, only logs them. Please post an example of one of your problem logs to the issue as well. We'll help you get it fixed.
Please friends help me and reply me as soon as possible.
Thanks in advance.
Still missing characters when trying to send 8K/sec at 115kbaud. After a year of this problem it's still not resolved? Using trial and error I've found some delays that seem to work. This took hours of experimenting to resolve. Great I thought! Then I tried a different (faster) SD card. I'm back to square one. It misses 10-500 characters in a row about ever 1000. Which firmware will resolve this? Is there any way to work around it? If I knew when it was about to miss, I would wait. But there seems to be no pattern it's different every time. Please help!
Got it to work kinda by delaying 30ms every 600 bytes using Serial.write. Trial and error. This is about 7K/sec. Usually it'll go 1-2GB before it misses a single byte, then it misses 100+. That's the best I can do. Only a little bit better then 57600 baud in theory. Which I have not tried. For a short while I can write at 8K/sec. Keep in mind I'm using an old slow SD card.
This is related to a delay allocating the next cluster from the FAT. How can we work around it?
I could not get 57600 to work. But it wouldn't be fast enough for my application anyway, so I stopped trying. Instead at 115 kbaud this works for awhile:
delayMicroseconds(80)
I'm happy with that EXCEPT...
About every 60-100K the data is corrupted. 10 files are created. Normally the blue light appears solid, instead it flashes slowly alternating with the yellow light. This is not acceptable. Even using a delay of 800 it happens less often. This is very slow.
Please help!
57600bps is a known issue.
Dropped characters during continuous logging, please see this page
Using this to test:
https://github.com/nseidle/OpenLog/tree/master/OpenLog_Test_Sketch
It drops 40-80 consecutive characters
every 100 lines or so at 115kbaud.
What good is this?
If it consistently fails?
Am I doing something wrong?
Can I add a delay to cure it?
I've made a wiki page just for you! Continuous Logging
Can we edit files on this from an arduino? I was going to try and use this as a hard drive with the arduino pro mini.
With enough low-level commands you can read and edit files. See the command test example sketch for some starting code.
I ovewrwrite the program in the microcontroller chip. How do I restore it. I want the old program back. I am using SPI programming method by codeVision software
Has anyone besides me noticed the 3M logo on the slot?
We do use 3M microSD sockets on some builds but our suppliers change quickly. Good eyes! :)
Now that you mention it... what about it? :) If anything I guess that means they chose a quality part for the slot ;)
The GitHub has ver 2 firmware sources available.
Are the ver 1.61 firmware sources available ??
thanks
Recently got some of these, and found with an ISP that the efuse was invalid. The brownout bits were 000. That is listed as "reserved" in the datasheet, wonder what it does? I think they are supposed to be 101, or "5". Was it shipped that way I assume? By the way, hooking a pod to openLog is a bit of a pain...
Is there a chance that you'll carry just the bare ATmega preprogrammed with the OpenLog firmware?
How many channels can this thing do?
Can I simultaneously log data from 3,4,5 etc inputs?
Currently OpenLog only supports one incoming serial stream.
How does the soldering work on a board like this which has components to be mounted to both sides? can you still use the hot plate method?
Double sided boards are tricky to reflow on a hot plate. We use an oven.
I need MMC support to run project in Proteus (SD/SDHC doesn't work with it)
And how i can compile this project without arduino IDE?
I am having trouble using the openLog with NewSoftSerial on an Arduino Uno. It seems to log alright and I can get the openLog into command mode but when I have openLog return serial data (with commands like ls or ?) there are random characters missing. For example ? returns:
OpenLog v2.5
Basic commands:
new : Creates
append : Appends text to end of . The texti edfo h ATi temadi o cod iihb edn tlz(SI 6
m drcoy rae ietr ald
...
I have rx set to pin 6 and tx set to pin 7. GRN connected to reset on the Arduino. Otherwise I have GND and VCC to 5V connected. Changing the baud rate does not improve things.
Any advice? Is NewSoftSerial not capable to receive the serial data correctly or do I need additional settings?
Thanks in advance.
EXCUSE ME IF I HAVE DONE WRONG UNDERSTANDING.
WHAT I WANTED TO SAY MY QUESTION IS:
I would like to directly connect a magnetic head (read magnetic tracks) with openlog and read the data without basic module, with only the console log and a magnetic head, I hope you understand me thank you for your help
I'm having problems dropping my OpenLogs into command mode from my Arduino. The Arduino is connected to a GPS so it knows the time and date; i would like OpenLog to name a new file with this information. I have tried multiple ways of sending character "26," BYTE, BIN, HEX, OCT, DEC, line feeds between each send, no line feeds... maybe i'm just not doing something right; but does anyone know how I can drop it into command mode? Also, is it capable of logging to two files, if it enters command mode and alternates between these two files? does anyone know how long it takes to switch between two files?
Any and all responses appreciated.
Controlling OpenLog from another micro is mostly covered in issue 66. Basically you need to do this:
sprintf(buff, "new blah.txt\r");
Serial.print(buff); //No println, use \r in string instead
See the commit notes for v2.51.
OpenLog can open a file, record to it, close it, and then open a different/new file, but it doesn't currently have the ability to maintain two open logs.
There's also an example sketch for controlling OpenLog from an Arduino here.
SALVATION
I would buy a OPENLOG FOR TRANSFERRING DATA AS EX: 2235687611234567 / / 2345678987654324567 WITH OPENLOG just as with the example project on sensor Sparkfun but just what I want to do the same thing c'es but with a magnetic head that I veus Use with openlog, I am not very strong in electronics, can you help if possible thanks
I don't quite understand. If you are trying to read magnetic heading, you will need a microcontroller to read from your sensor then output a serial stream to OpenLog. It is actually quite easy to add OpenLog once you have the basic system working.
SALUT
JE VOUDRAIT ACHETER UN OPENLOG
POUR TRANSFERER LES DONNEES COMME EX:2235687611234567//2345678987654324567 AVEC LE OPENLOG UNIQUEMENT ET LIRE DONNé simplement comme avec l'exaple project sensor sur sparkfun
mais juste ce que je veut faire c'es la meme chose sauf que c'est avec une tete magnetic que je veus utiliser avec le openlog;quelq'un peut aider ?
This is somewhat new to me so excuse by basic questions. I have a system on my airplane that displays all the engine temps and pressures but does not record data. It does have a serial data out line so I bought an OpenLog, made up a 5 volt power supply using a 7805 voltage regulator, and wired it up. I then formatted the card using my laptop, plugged it into OpenLog, and turned on the electrical system and data display system for a few minutes. Then I took the card to my laptop to see what had been generated.
OpenLog made a CONFIG.TXT file and a data file named LOGO0015.TXT. The CONFIG file is fine and reads 9600, 26, 3, 0, but the LOGO file is not text, it's lots of funny characters.
So how do I convert everything to text I can parse into a spreadsheet?
Here is what the data looks like:
úþþþþþ.þþžÆþþnþþÖ 1 1žžîüþþþþþþþ þþþ2 þþþþþþþþþþþþþþ²þ®þ²þÒþº
Bubblehead, Which engine monitor are you using? I'm trying to do the same thing using a Grand Rapids Technologies EIS unit to output serial data. Like you the CONFIG.TXT and log files are created, but the logged data is unusable. Works fine connecting the EIS to a FireFly Serial/Bluetooth converter and recording data with a Laptop and HyperTerminal. I've contacted GRT to see what level the serial data is transmitted (12V, 5V, 3.3V, etc). If it's 5V or 3.3V, I'm not sure what's up.
UPDATE: I got word back that the output can be as high as 12V on the serial output of the Engine Monitor (EIS). Yesterday I used the Sparkfun SMD Level Shifter board between the OpenLog and Engine Monitor and it worked GREAT! I got NO errors in recording over 30 minutes. Worked like a champ! No more lugging a PC to the airport to log engine data! woo hoo!!!
Sounds like OpenLog is doing what we expect (creating a config file and an initial log file).
What board is in your plane? Make sure the board is outputting 9600bps because that is what OpenLog is expecting. Make sure the TX pin on your plane-board is truly and output and connected to the RX pin on OpenLog.
Is the serial TTL serial or RS232? RS232 would be a problem. TTL should work fine.
I ordered two Openlogs. One came with firmware v2.5 and supports the 'reset'-command in commandmode. The other (as I figured out after some hours of testing around and cursing (g) was only firmware v2.41 which doesn't support resetting.
I tried to compile v2.5 using the latest Arduino-IDE and following the steps explained on the datasheet precisely.
At the first try my OpenLog suddenly only logged chinese characters (which were definitively not "thrown" at him). Now after a reboot of my computer v2.5 won't even compile because some error in the 'special' HardwareSerial.cpp supplied for programming v2 onto OpenLog using the Arduino-IDE.
I then tried to upload the latest .hex file using avrdude. But the latest .hex-file on GitHub is v2.41. Could you please make a .hex for v2.5 available? Thanks in advance.
When the stock will be available?
Is there a way to start logging to the OpenLog based on an external trigger? if yes, how?
Hmm. Interesting question. OpenLog is very simple/passive. There is not a good way on OpenLog itself. Most of the time, OpenLog is attached to a system that is doing all the heavy lifting. That system would be the best place for an external trigger.
Hi,
Does anyone encounter this error while flashing firmware? Thanks!
Bryan
C:\openlog>avrdude.exe -p atmega328p -P COM6 -c stk500v1 -b 57600 -Cavrdude.conf
-U flash:w:main.hex
avrdude.exe: stk500_getsync(): not in sync: resp=0x00
avrdude.exe: stk500_disable(): protocol error, expect=0x14, resp=0x51
avrdude.exe done. Thank you.
Based on your comment date (2011), why are you trying to load main.hex? That would be one of the older commits (pre version 2.0).
A protocol error is sometimes caused because the ATmega is not responding like avrdude expects. I would be sure you've got the DTR pin correctly connected - I suspect the ATmega is not getting reset appropriately by avrdude.
Hi,
Anyone encountered this problem while flashing the firmware? Thanks!
Bryan
C:\openlog>avrdude.exe -p atmega328p -P COM6 -c stk500v1 -b 57600 -Cavrdude.conf
-U flash:w:main.hex
avrdude.exe: stk500_getsync(): not in sync: resp=0x00
avrdude.exe: stk500_disable(): protocol error, expect=0x14, resp=0x51
avrdude.exe done. Thank you.
ok..solved. you need to connect all pins of FTDI Basic board and openLog. Not just TX/RX/5V/GND won't be able to download.
https://github.com/nseidle/OpenLog/wiki/Datasheet
Under this topic
How do I attach a FTDI Basic board to OpenLog for configuring and bootloading?
what oscillator is on the board. It's tiny! Can I get a part number?
It's a 16MHz resonator from Murata: CSTCE16M0V53-R0 (I'm pretty sure)
I setup a prototype using basically the same design and the same components including the Murata 16 MHz resonator. The only difference is that I exposed the ENABLE line of the regulator so that I could shut down the circuit for very low power consumption.
The SD card interface appears to work fine since I can see that the CONFIG.TXT file is being created. And also being read. However I cannot communicate with it at all via Tx and Rx. All I get are garbled characters. (I use the Config file to set it in command mode on power up). I also noticed that if I remove the SD card, the get the expected 3 LED flashes.... but the flashes are EXTREMELY long and SLOW.
These two factors tell me that it is a baud rate issue. Probably because the CPU is not running at 16MHz and it is probably running at a slower speed. Or is the chip being overclocked at 16MHz and that's why I am seeing this effect? I don't think I have a defective resonator since two boards are doing same thing.
How does one get a copy of the source code so I can do some troubleshooting? I searched through the OPENLOG area in github but could not find any place to download the source. I thought I'd try to use the internal oscillator and see if I could get it to talk.
Thanks
My guess is that you haven't set the fuse bits correctly. A stock ATmega runs at 1MHz. You have to set the fuse bits to get it to use the external resonator at 16MHz (16 times faster). I hope this helps! If you need more assistance please use the issue tracking on Github as it can get pretty chaotic here in the comments.
That was it. Works like a charm. Thanks.
Not being familiar with the Atmel chip, I assumed that the fuse settings were in the HEX files. So I used AVRDUDE to flash the factory fresh CPU chips with the HEX files posted on Github. And as you said the default fuse settings run the CPU at 1MHZ. Programming efuse, lfuse and hfuse with 0x05, 0xff and 0xd6 respectively solved the problem.
Great work on this product. Thanks again.
Excellent! Glad to hear it. Welcome to the wonderful world of open source hardware and ATmegas ;)
I'm not sure if mine is bad or not. I plug it into power, and the serial terminal receives a 1 repeated every second with a sdhc card plugged in. When I unplug the sdhc card, the character changes to the 'n' and when a character is typed into the terminal (putty) it changes to the 'u'. I think I may have broken it, however, the fact that the output changes when I modify conditions makes me think that it is still functional.
I have attempted to re-flash it using the command prompt utility, however no luck.
any help?
-Alex
I have very similar problem. Try hard re-flash (w/ Arduino as ISP if nothing else )
Actually, I have it up and running right now. What voltage are you using to power the logger? I was attempting to use 3.3, but when I increased it to 5, it started working.
Interesting. Could it have been your serial adapter not being able to read 3.3V signals?
I haven't see what you describe when powered with 3.3V. I'll pull some more sample units and see at what voltage I start to see problems. My guess is ~2V, the microSD card will start to have problems.
It is homemade. I used Arduino DIP and a full size SD, and am powering it from the Arduino 3.3v pin. Previously, I used a regulator powered by 5 volts like the manufactured Openlog uses. No change was observed.
Hello,
I got one openlog, but I currently am unable to get it to work. When I power it up, it outputs the 1 over an FTDI converter and then it stops. Blue LED will blink 3 times after a while (= problems initializing the card). So far so good. I tried to update the firmware to the newest 2.41 version, as I'm using a 4GB SDHC (Toshiba) card (formatted FAT16 and FAT32, both didn't work). I've downloaded the newest firmware from the github and tried to bootload it. The bootloading seems to work as V1 can be bootloaded without any problems, but when loading V2 avrdude reports me an error. It starts programming 32768 bytes (which is maximum of the ATMega) and during verifing I'm getting the error:
avrdude.exe: verification error, first mismatch at byte 0x7800
0x32 != 0x0c
Strange is also, that the file sizes between V1 and V2 are very different. The current V1 hex file has 69.108 bytes and the V2 hex file (filename: OpenLog_v2.cpp.hex) has 247.589 Bytes?!
Anyone any ideas?
Greetings from Germany,
Mike
Got the solution. If you are on the github webinterface (https://github.com/nseidle/OpenLog/tree/master/OpenLog_v2/) do NOT just right click on the hex-file and "save-link-as" it! You should click on the hex-file-link which then takes you to a new page. There you will see a lot of numbers and characters (Intel hex format). On the right there's a link called raw. Right click there and do the "save-link-as" there. Then you'll be downloading the wanted hex-file. Flashed it and openlog works like a charme with my 4GB (FAT32) SDHC disc.
I just love it!
Awesome project, I really appreciate it!!
Regards,
Mike
Nice work Mike! I've hit that same problem with Github. Glad you got it worked out.
I'm having a huge problem with one on firmware 1.6. It just keeps giving me 'cannot create config file' and 'too many logs' even with a clean formattted, SMALL card (16 MB). SOme other cards simply cause it to send a series of 1's.
Please open an Issue on Github. I'm less and less familiar with version 1 these days but I'm happy to help where possible.
I was wondering if there is any way to set this up to transmit data on startup.
My project idea is a gps logger, but it looks like the gps has to be initialized first. I imagine it would be easy enough to edit the firmware but only the hex file is posted.
Thanks
Hi - Please do see github. All the source is there including the main Arduino sketch called OpenLog_v2.pde.
Usefull thing!
Hi - I am trying to use this board along with a the 9DOF Serial AHRS board. The 9DOF is putting out what I expect over the serial port. When I connect the OpenLog, the blue light blinks and it appears to try to read, but I get mostly glitchy output at 57600. Any suggestions? (sample output below). OpenLog reads the CONFIG file correctly and makes a new file for the data but it's glitchy... (though it looks OK when I read the serial port not through OpenLogger - gives good 9DOF outputs in Arduino Serial Monitor).
372
38SH¯416
·j
5SH®Ÿ≤j
!ANîjÇ.0L r72 r∫4C·!ANG:Krí2,1.78,1.sLC·!AÍÈ-1.05,3.0&˘&)Ój
!ANG:K& íbìâ.b˛&)Çj
!ANîjíríÆb~M Vb˛&)éj
!ANîjNräÇ,6.79,4.73
!ANGßIríÇbÓr≤Çb5.12
This is a known issue with Arduino v22 and the AHRS firmware, not OpenLog. See these closed issues on Github:
https://github.com/nseidle/OpenLog/issues/closed#issue/38
https://github.com/nseidle/OpenLog/issues/closed#issue/63
Solution: Use Arduino v21 to compile AHRS firmware or change to ANY other baud.
Can I use this with 9 Degrees of Freedom - Sensor Stick
sku: SEN-10321?
Yes. But it takes a bit of hacking. I had to wire the A4/A5 (SDA and SCL) pins on the ATmega to the sensor stick. This requires some spot soldering of wire wrap wire. You then have to reprogram OpenLog to log I2C. Not hard, but not trivial.
http://www.sparkfun.com/news/499
It says that the chip has:
"Configurable baud rates (2400 to 115200bps)"
but
"Doesn't drop characters even at full-blast 57600bp"
So what is the maximum baud rate that this chip can take without dropping characters? Has anyone tested this chip and found the the actual max baud rate and storage capacity?
I test OpenLog regularly. The current version (2.5) is able to record 33kb of data at 57600 onto a fresh 8GB and 16GB microSD card without dropping characters.
Please see this issue for a great breakdown of what can be recorded at different baud rates with different types of SD cards:
https://github.com/nseidle/OpenLog/issues#issue/62
Just tested my OpenLog device. Works great at first step but pushing it up a little makes it losing data quickly...
Sending a continuous data flow to the OpenLog at 9600bps is ok. But it starts loosing some bytes at 19200bps.
I am quite disappointed as the description & datasheet pages say that it's working at 57600bps and even at 115200bps! :-(
Hi greydet - please open an issue ticket on Github so we can better track your problem.
* What are you hooked up to? Arduino? PIC? Other?
* Are you using Arduino v21(good) or v22(does weird stuff at 57600)?
* What size microSD?
* Is there anything else on the card?
Many questions - please use github and we'll help you out.
I need to transmit the data stored in a SD card that is inside a datalogger Openlog with xbee, How can I read the data remotely through openlog?
You would need an external controller to put OpenLog into command mode. Once in command mode, issue the 'read' command for whatever file you would like to look at. Once OpenLog starts outputting the text, you would need to read in that text and output it to an XBee. You may be able to chain two items (the micro and the XBee) on the TX pin of OpenLog.
would reading the sd card cancel recording?
i would imagine it would go something like this...
log to file1 for duration1
@ end of duration1, close file1, log to file2 for duration2, read file1 and send over xbee
rinse and repeat.
can the openlog do both simultaneously?
thx
How is long term (months) stability at low/moderate logging speed? I see some comments having problem with this.
/
Good question - I haven't personally run tests longer than a few weeks. But we have had thousands of OpenLogs in the field for over a year. There are always some technical issues but none that I have heard of intrinsically to problems logging over very long periods.
OpenLog should be fine. I recommend power cycle or resetting OpenLog every 24 to 168 hours (1 week) so that OpenLog closes its current log and opens a new log.
Hello, I have a card to make and i want to know, how a can program the Micro-SD.
It's possible to program the Micro-SD with for exemple an ATmega16 ? and can we connect this card to the ATmega16 UART ?
Thank
I bought one of these.. but cannot get it to work.
I dont have the FDTI cable, so I cant use any of the commands. I'm just sending text to the serial monitor, is it just supposed log? or is anything additional that needs to be done? as far as wiring the rx on openlog should be connected to the tx on the arduino?
You are correct, you should only need to power OpenLog (5V/GND from the Arduino) and TX on the Arduino to RX on OpenLog. You really should wire up an external comm port so that you can see what's going on. Depending on when and who you got OpenLog from, it's hard to say what firmware version you have.
How easy is it to wire this up to the SD card socket break out board? http://www.sparkfun.com/products/204
A royal PITA? I'd rather not have to get the MicroSD socket BOB, too.
OpenLog has a microSD socket built in so you don't need to wire up an external socket.
Can I flash version firmware 2,41 while connected to my Seeduino, or will this only work with an FTDI board
regards, Garry
It's best to remove OpenLog from any system when trying to update the firmware. Too many things sitting on the TX/RX bus is a scary thing.
Nope, forgot the DTR
Garry
Sorry, I forgot!, Merry christmas.
Been using OpenLog for 3 days now. It's exactly what I was looking for. Works like a charm (once I understood how to enter command mode ;-)). I am using Kubuntu with a Seeeduino V328.
This is an excellent example of a product which simply works, period. Thanks Nate.
Regards, Garry
Hardware keylogger, anyone?
I just hooked up a OPenLog to my Arduino Duemilano .
I tried the OpenLogTest.pde file. The led on the OpenLog indicates it is getting data but I see no files being created.
I even created a CONFIG.TXT file -- It did not create one.
I am using a 2GB card. I did not format it , but my PC reads it just fine...
Any ideas?
Could I have overwritten the Flash, if it was connected when I downloaded a sketch to my duemilano. It seems to use the same I/O pins??
Thanks
It's really very hard to accidentally re-flash OpenLog's firmware.
Start simple. I would format the card and make sure that config.txt gets created when powered up. Once the file is there, try sending it a few serial strings. The example Sketch is meant to really hammer OpenLog to its extreme at 57600bps. A default OpenLog is default to 9600bps so you probably won't see anything but gibberish in the log files.
Bought the OpenLog a few months ago and left it in a drawer. I finally found the time to try it out this week and I cannot get it to work to save my life...
Basically the green LED blinks three times indicating no SD card initialized constantly. I have tried several different SDs (SanDisk @2G, PNY @2G and 4G), made a point of formatting them to FAT16 (using a number of different methods), all to no avail. I reflashed the OpenLog to the latest firmware, now I can see a "1 error card.init" on power up.
This almost appears to be a hardware issue - has anybody else had similar issues?
Has anybody used this for over a few days without stopping? I have found a problem that after about 10 hours or 5 mb of data some numbers start to be replaced by letters. The replacements are always the same eg. 0 turns into p.
Any thoughts on this?
Hi Autocar - please post your issue (it does sound like you're having a problem) to Github. There we can track it and resolve it much easier.
I am currently concentrating on large volume, high speed data recording. I haven't run any long term tests like you describe but I would really like to look at some. Please post to the issues and we'll get some people to help. Thanks!
I am having an issue with my openlog, it stops logging after about 15 to 20 minutes even though the blue status light still blinks. I am using a 2GB card, and have it hooked up to a Lilypad. Does anyone have an idea of what could be happening? It did seem to work longer on the first day that I used it. Any help would be much appreciated.
Thanks, Julio.
Hi Julio - please post your issue to github so we can track it. Please fully describe your setup. What voltage are you running the LilyPad at? What power source are you using?
Have you fully erased/formatted your 2GB card?
Hi guys,
I'm having some troubles with my OpenLog.
Here's the setup:
OpenLog FW:2.21
PC -> FTDI basic breakout -> OpenLog.
2Go micro-SD formated FAT32, with only 2 files : config.txt and settings.txt (406 bytes long).
I open a terminal app (TeraTerm) on COM3, 9600,8N1.
I can read both files with the read command.
But, if I first try to get the size of a file (ex. "size settings.txt"), and then try to read the same file (with or without any parameter), it ends with an error to open the file... ;(
Then, I have to switch off and on the OpenLog to be able to read a file again... the "init" command doesn't change anything.
Any idea ?
thanks.
P.S: I tried to restore FW 1.61, but each time avrdude says everything is ok, but I get the blue led dimmed (like pwm'ed at ~20%), and no communication at all ...
Issue 50 resolved in v2.4:
https://github.com/nseidle/OpenLog/issues/closed#issue/50
Great ! Thanks :)
Hi - sorry I missed your comment. Please post issues to GitHub. I'm able to see them much easier there.
I am able to re-create what you describe. Nice bug find. Very odd. I'll create an issue and see if we can get it fixed in the next version.
One problem with my Logging V1.61:
I can not use any set Command. I sent:
"set New File Number". And it replied:
System Configuration
Current boot mode: Command
Current escape character and amount: 26 x 3
Change to:
1) New file logging
2) Append file logging
3) Command prompt
4) Reset new file number
5) New escape character
6) Number of escape characters
x) Exit
Oh! Sorry, it's not that complicated. Type 'set' (no single quotes) and press enter to get into the settings menu. Then type '4' and press enter. It should then reset the new log number to LOG00000.TXT.
Nate, am I correct in assuming that the format for set would be the same in config.txt? The following would be a valid content for config.txt?
Unfortunately I never thought people would need to reset the log # from the config file! If this really is a feature you'd like, please submit it on the github page so that we can track it.
Is there a way to use an RTC with this device simply to get a time and date stamp for free running logging operations? Has someone done this?
Thanks,
KB
Adding RTC to the ATmega is fairly trivial, but it will become pretty inaccurate over time. The resonator on OpenLog will probably drift minutes of time over a 24 hour period. You would be better off if you relied on the system that was outputting the serial data. For example, the temperature logger I built had seconds as the first number, then the temp:
5662, 14
5665, 14
etc.
OpenLog simply logged the incoming data whenever it arrived.
This works great!!! -- but is there a way to stop the blue LED (STAT1, to the right of the 'g' in "openLog" written on the board)?
It keeps flashing, perhaps to indicate serial communication between my arduino board and the openLog.
I want to do day-long logging of biometric signals (initially at a high data rate, to figure out what is going on, then hopefully at a lower rate) - and I wonder how much of the battery gets used up by the blue LED flashing non-stop.
Right now I am just using an Arduino mini, an openLog, and a 3-axis accelerometer, and logging x,y,z at 4Hz draws 10mA from the battery!
Thanks,
PLM.
Good question. The blue status LED turns on/off with every other character received. It would save only a few milliamps, but it may be worth it to add an option to disable the LED. I'll put an issue into GitHub.
Different question concerning the latest 2.2 firmware:
I just tried to use that firmware trying to solve my problem mentioned earlier and found something weird: Although the baud rate is set to 9600 (no config.txt on the card, menu output) I have to connect to the OpenLog with 19200 bps...
Hm, the 2.2 firmware is able to read out the disk info (see above) but if I let Razor AHRS and OpenLog run for a couple of minutes the logfile is there but empty :-(
First meaningful data with Razor 9DOF AHRS set to 19200 bps and OpenLog (v2.2) to 9600 bps???
Hi, great stuff, already started to assemble five Razor 9DOF+OpenLog for my experiments ;-)
However, I struggle to get this combination working and hope somebody is able to help me with this. I can connect to the OpenLog with the FTDI cable but "disk" only returns a "error reading disk info" and recording fails as no logfiles are created.
I'm using the 1.61 firmware with a 2GB card from SanDisk.
I already had to format the card once with a FAT 16 filesystem and also tried to repartition under Linux (mkfs.msdos)
Any ideas what could cause these troubles?
Thanks!
BTW: I strongly support the idea of creating a trimmed-down version of the firmware that only supports raw logging, i.e. without the menu etc. This would not only allow - as you suggested - to increase the buffer but may also to add additional functionality.
Thanks!
With the 2.2 firmware I was now at least able to read out the card's info:
Card type: SD2
Manufacturer ID: 3
OEM ID: SD
Product: SU02G
Version: 8.0
Serial number: 2611410752
Manufacturing date: 11/2009
Card Size: 1931264 KB
The v2 code is just awesome! Now I have the ability to eliminate the Arduino that I had use to sort through the data stream. Question: If I were to add some code that would analyze the data, and choose what to log. Which loop would that go in? (I am not a strong coder)
All the magic happens in the "uint8_t append_file(char* file_name)" function. Be careful though - OldLog wasn't designed to filter, it was only designed to record everything thrown at it. By adding too much character checking, OpenLog will get bogged down and may begin to miss incoming serial characters.
Was not expecting a quick response. =] Thanks for letting me know where the "magic happens". I will post my results after messing around with it.
Thanks again
Updated to V2.1 w/ Arduino 00118 after having the repeated 12< problem. The logger creates new files, and can be interfaced over the serial port, but the log files are always empty. Connecting to an Arduino Pro Mini 328 5V 16Hz.
Also, the reference to how to upgrade the firmware should be taken off, I only figured out that flashing the Open Log was no longer necessary when it was discovered that there is no main.hex file anywhere to be found...
I still hope that I can get my Open Log to work!
Thanks for the recommendation. I've updated the Flashing Firmware page to reflect the differences between v1 and v2. Please feel free to edit the wiki pages if you see lacking information somewhere. I can always use help :)
Not sure why your OpenLog is not logging. Always start with a serial connection to a terminal window so that you can more easily troubleshoot the problem.
What is the status on the FAT32 support? I have noticed that tz has created something, do I flash the openlog as if I were updating the firmware? Possible link to the most up to date version of tz's FAT32 SDHC code?
Thanks
Hi Rocketman - we've released v2.0 on GitHub last week. v2 supports FAT32 and up to 8GB (the biggest microSD card on my desk at the moment). I'm still hammering out some smaller bugs so we're not shipping with it yet, but it's an Arduino sketch now, so updating the firmware should be much easier. Please give it a try and let us know what you think!
Can the Atmega328p take a 5V signal on its serial in, or is it only 3.3V? I don't want to fry this little logger...
The ATmega can handle 5V signals without a problem.
I had the same question. The 328 data sheet says Vih max for any pin is VCC + 0.5. Since you are powered from 3.3v, the highest voltage on any input should be 3.8v
Hi, I need to record rs232 serial data from a pc then play it back through a servo controller. I figure this will record the data but can I play it back directly into my servo controller. Normally the PC goes straight to the controller card but I want to eliminate the pc in the field and just play back a recorded sequence from this card. Anyone know if this would work? Or a better idea?
Thanks
Hi there,
the OpenLog makes my current project a lot easier than expected, but there is one thing that could be optimized, maybe you know more:
Is there any possibility to reduce the bootup time of the OpenLog, for example by bypassing the bootloader or something.
I only want to read from the module, ideally as fast as possible after startup.
What do you think?
Martin
The boot-up time shouldn't be longer than 1-2 seconds. The bootloader does need some time to time-out (it's less than a second). Are you power cycling your system? How fast do you need it to boot?
Hi Nate,
yes, at the moment it is about 2 seconds. Maybe it is a litte faster vith firmware v.2. But a bigger improvement would be to burn it without a bootloader...? Are there pins to do this like on the standard Arduino?
My target is to let it boot in less than 300ms.
Boot time under 300ms is possible but you will have to reprogram the ATmega using the ISP connections (reset, MISO, MOSI, CLK, and VCC/GND). These are exposed under the SD socket. Not for the lay user, but if you really need it, that's how you would do it.
Alright, finally got mine to work with the bus pirate. Here is what I found out:
to format FAT16 with dos in xp:
c:>format e: /fs:fat
*where e: was my removable uSD drive
fat can only handle up to 4GB, i was able to try both 2GB and 8GB. I could not figure out how to partition the 8GB with XP and could not format the 8GB. The 2GB worked fine.
I was not able to get to command mode with the bus pirate. Ctrl+z or decimal equivalent 26 or 0x1A three times only result in garbage output. I will try directly connecting to the rs232 of my pc later to see if this gives me different results. I'm a little sick of decrypting hex input and output from bus pirate.
Gentlemen!
I am trying (unsuccessfully) to flash the firmware in my OpenLog using usbtiny.
I have connected MISO, MOSI SCK, VCC, and GND pins of OpenLog to corresponding pins of the programming cable. I am using this avrdude syntax:
avrdude -c usbtiny -p atmega328p -P usb -F -U flash:w:main.hex:i
And getting this:
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude done. Thank you.
I have noticed that we have 1k resistor on SCK pin (17). Is it the reason? will simply removing it fix the problem? or should I somehow remove the bootloader first?
Thank you,
James
N.B. I can program stand alone AVR's...
Why are you trying to do ISP on the AVR? OpenLog ships with an easy to use serial bootloader to avoid having to hardware program the AVR. Please see 'how to upgrade the firmware' page: http://wiki.github.com/nseidle/OpenLog/flashing-firmware
I do see that you don't mention attaching to the reset pin. This is perhaps why your programming is failing.
The 1K resistor on the SCK pin is there to limit the current into the green LED.
I've got a wiring question about the openlog unit I just ordered and received. I currently have a daq unit set up to receive data from a few instruments and send it on request as a serial data stream via a usb connection on a com port I manage with a basic hyperterminal-like program (only in windows 7).
What I'd like to do, is initiate the daq unit's serial data stream from the instruments by laptop and have openlog record the data to SD while I leave the whole unit unattended for a couple days.
what I'm wondering is if I can just clip the signal wire between the daq unit and the usb terminal and solder the open log in at that point and let it run (assuming I've wired up the vcc and gnd too).
Will that work? also, will my data "flow through" the openlog and be able to still be accessed by usb too? I'd rather not have to interface with the openlog if I don't have to and I have very little experience with electronics or programing.
thanks for your help,
Justin
Hey Jeellis2, This is an interesting question. I would like to say the simple answer is, this should work. The more complicated answer is that it should work if your baud rates, and voltages match with the ULog and daq. Also I think that you can splice the Ulog into the system without data flow problems. I think as long as you only power the Ulog when you want to record data, it could stay in your system permanently without interfering with the general flow of data when it is not needed. Thanks
Thanks for the reply Single T, I'm trying to change the baud rate right now and I guess I just don't understand how the interface is supposed to work.
I've tested the openlog with the Arduino and it logs data very nicely that I can access on the SD card. However, I was under the impression that, upon being powered up,the openlog would create a config.txt file on the SD card that I can edit to change the settings.
Am I wrong? Am I missing a step? Why might there be no config file on my sd card?
Thanks again!
Regards,
Justin
I'm using a FTDI 3.3v (DEV-09717) cable connected to my OpenLog. Using teraterm on COM10 I can make a connection to the device. all is good.
to upgrade the firmware I'm using the follow cmd:
avrdude.exe -p atmega328p -P COM10 -c stk500v1 -b 57600 -Cavrdude.conf -U flash:w:main.hex
and get this response:
avrdude.exe: ser_open(): can't open device "COM10": The system cannot find the file specified.
I have put libusb0.dll in the system32 directory.
is the problem that arvdude can't handle high number com ports?
thank you
gek
I did a little hacking with regedt32 and changed the comport from 10 to 3. I can now update the firmware.
see:
http://www.ftdichip.com/Documents/AppNotes/AN_132_Re-Assigning_COM_Port_Numbers_Using_Registry.pdf
The registry remembers all FTDI converters that have been used. The driver does not reassign unused comport numbers. In some cases that a good thing. It would be nice to be able to "reserve" a set of comport numbers to be reused as devices are used and removed.
Thanks for posting your solution! You are correct - some USB COM ports get large enough avrdude can't see them.
Have done, thanks
Hi,
We're using a few of these to log RFID via an Arduino Nano - in most cases this is working great, but a couple of the OpenLogs seem to have fallen into an unresponsive state - no serial response, no LEDs, no reset response. Connections look fine, no apparent damage on board. Any thoughts?
Rob
Hey Rob, I 've recently been having some trouble with Logomatics failing with inconsistent symptoms after use in a clinical research environment. The problem turned out to be various .1uF decoupling caps breaking down on different parts of the boards. I'd be interested to hear what happens if you replace the two .1uF caps on your OpenLog units. You could also just do a continuity test across them first. A short across one of those would certainly explain an unresponsive unit.
Please start an issue on GitHub so we can diagnose it. We need to know what version of firmware you have. The RFID unit may be sending ctrl+z to OpenLog causing it to enter command mode instead of continuing to log data. v1.51 of the firmware corrects for this by allowing for multiple escape characters. If you ever get OpenLog really stuck, there is a safety mechanism built in: http://wiki.github.com/nseidle/OpenLog/
Thanks Nate, 4800 baud works well. I had a few teething problems with avrdude and finally found that I needed to get a copy of libusb0.dll and add it to the Win32 folder. After that it all worked as your upgrade firmware sheet said. Many thanks a great result for me. John W
Hrmm. I'm guessing because my machine had WinAVR already installed, that it also had libusb0.dll installed. Looks like it's also in the Arduino root directory. I'll add a note to the upgrading firmware page. Thanks!
Hi,
I just received my openLog. Unfortunately, I see only empty files or files with 32kb of giberish (as seen in emacs). I am using 2Gb microSD card from Samsung. At the power-up the first led flashes and then he second flashes and stays on. I did verify that the card is FAT16 formated.
I do not have FTDI Basic so I can't really debug with a terminal.
Question: is the default to start logging data or to wait for a command from terminal?
never mind!
It would be REALLY cool to know how NewJersey solved this issue 2 years ago! I can't see gibberish in files, they're just empty!
My Openlog works well when connected via a FTDI Basic to Hyperterminal at 9600 baud. However I want to connect to TTL feeds at 4800 baud. Can anyone provide the firmware update that will (say) replace the currently available 2400 baud option with 4800 ? Thanks
Hi - I just added 4800 and 19200bps support in v1.5 of the firmware. I also just updated the step by step instructions on how to update the firmware here: http://wiki.github.com/nseidle/OpenLog/flashing-firmware
Hi there.
Bought one time ago but I would need the new "read" command to avoid removing the card everytime.
I found the source code on the site but...
can someone help me in the whole process? compiling and bootloading?
No way to have the hex files ready to be bootloaded?
Forgive me. I a beginner, never used winavr or whatever.
Any help would be appreciated.
Many thanks in advance.
Hi Mario - Good idea! Another customer pointed out how nice it would be to have a compiled hex of the latest firmware, so I added it here:
http://github.com/nseidle/OpenLog/raw/master/Code/main.hex
I'll put this link in the product description as well. Since this is a hard link to the github page, you won't be able to tell the version until you upload the file to OpenLog and type '?'. Version # is shown at the top of the menu.
To physically load the firmware onto OpenLog, you will need a serial connection. This is normally done with an FTDI Basic board. More info here: http://wiki.github.com/nseidle/OpenLog/flashing-firmware
I'm having trouble withe the OpenLog dropping data. I've seen the problem at 57600 and 115200 baud. Here's an example of the problem. I'm trying to log the sensor data for my AVC entry. The first column is the data point number and the second column is the time in ms.
2634, 134048, 80, 309.7, 512, 0, 0, 39.98120880, -105.24263000, 11.1460, 0.3200, 2.4900, 0.0000, 94.6021, 3
2635, 134098, 16, 310.3, 510, 0, 0, 39.98120880, -105.24263000, 11.090, 39.98121261, -105.24263000, 11.0720, 0.3500, 2.0600, 0.0000, 94.6038, 3
2641, 134398, 0, 309.7, 522, 0, 0, 39.98121261, -105.24263000, 11.0720, 0.3500, 2.0600, 0.0000, 94.6038, 3
2642, 134448, 0, 309.7, 510, 0, 0, 39.98121261, -105.24263000, 11.0720, 0.3500, 2.0600, 0.0000, 94.6038, 3
Sorry for the long lines, but you can see that data points between #2635-#2641 are missing and the dropout takes about 300 ms. This test was done at 115200, but I see the same thing at 57600. These sorts of dropouts appear in my data stream about every 0.5 to 1 second.
I've got the OpenLog hooked up to the Serial Tx of an Arduino Mega. If I look at the data stream via USB, it's rock solid. No dropouts.
Any ideas?
Scott - this issue is resolved in v1.4 of the firmware. See http://github.com/nseidle/OpenLog/issues#issue/12
Running the SD Card formatter from http://www.sdcard.org/consumers/formatter/ seems to help, but I still get about 1 glich per minute of data.
That sounds about right for a full cluster (1 minute at the rate). The current codebase has to first link in a new cluster (one or two read-writes, perhaps more since the code doesn't appear to try to minimize this), then write the sector data (read-write if buffered), then it updates the directory entry (another read-write). One other thing is that the code waits for the transaction to complete, so there is no overlap - you can't be filling the sector buffer while the SD card is busy finishing the last write.
115200 is about 100uS per character, or 10 per mS, so you have about 50mS before you go over 512.
For my FAT32 library (at github.com/tz1), I write the sector, then link the clusters if needed, and require a call to update the directory entry, so it is 3 operations, write-read-write, with the final one allowing for overlap while the card is busy, or more if the next free cluster needs searching more sectors: w r(r..)RWrw.
I finaly got arround to tinkering with this. I connected it to my openlog with a 5v regulator and heat sink to power the vcc on both and so far the results are amazing. It was a bit of a challange to build a box but I have replaced a serial printer on a phone system with the openlog a 2GB SD card this RS232 Shifter SMD, project case. I reccomend a 5v power regulator and heat sink even if you have a 5v power supply because a quick test of any power supply on a multimeter will show you they all lie and with the high side of the openlog at 5v there's just no point risking it all for a 2 dollar part.
If I could change anything about the openlog I would give it the option to write/read it's settings to the flash card so they could be backed up, would not constantly write flash for file name incraments, could switched easily by swaping cards with two different pourposes, could easily be reset if bodrate etc was forgotten you could just format the sd card.
I should note on my advice to use a 5v regulator like an LM7805C I did find out the hard way that the LM7805C needs about 7.5V to power It's self correctly and supply 5V.
OpenLog can now be configured from the CONFIG.txt file. New firmware v1.6 adds this feature.
I lost track of this project for so long I didn't know you addressed my ideas. I will be loading the new firmware to mine to take advantage of these new features you have added. That will make it much easier to use and copy the settings of the OpenLog. Thank you Nate!
Great idea:
http://github.com/nseidle/OpenLog/issues/issue/21
I'll work on that next week.
Can the something like the Arduino read the file from this card and be able to transmit the information over an xbee to another xbee to store on another open log device?
I've been testing these modules prior to installing in some equipment, ready to log long term on a beta product.
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?
ok. A bit more testing later. The logger fails when just over 1gig. Is this known about?
I've started an issue on GitHub for you:
http://github.com/nseidle/OpenLog/issues/issue/20
I need to do some additional testing with very large log sets such as yours. The current solution is not great, but try to keep the microSD card as clean as possible. Having lots of extra files (large ones) on the SD card will cause the write times to increase.
For the adventurous:
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.
Hi tz,
Link broken
I can't edit it here.
http://github.com/tz1/sparkfun in the hyperlog directory (source).
Hi
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
I was wondering if anyone ran into the issue of a microSD card not support SPI mode?
I was reading that this is optional for microSD cards is this true?
I have a dozen (different!) from 512Mb to 16Gb - all support SPI. I don't think it is optional (even for SDIO).
I don't know about the earlier MMC, or how compliant the SD models are.
http://www.interfacebus.com/MicroSD_Card_Pinout.html
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.
The link doesn't go to the spec. I've seen discussion on MMC cards but don't have a full spec. On MMC, SPI is optional, but that doesn't tell me precisely how to talk to one (where it is different from the SD cards).
But there are no micro MMCs.
The addition of a real-time clock would make this perfect for some apps I have in mind. Even if the clock's only function is to put a timestamp on the log files.
http://harleyhacking.blogspot.com/2010/01/fat32lib-01-zap-your-card-edition.html
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
As usual, I missed a few things. Update code and link:
http://www.zdez.org/fat32lib-0.1a.zip
I successfully fed data into the logger and it works as expected.
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.
To read the contents of a log, I usually pull the card from OpenLog and use a microSD to USB card reader like this one: https://www.sparkfun.com/commerce/product_info.php?products_id=9433
You can also read a file from the command prompt. We added the 'read' command in version 1.2 of the firmware. http://wiki.github.com/nseidle/OpenLog/command-set
read file start stop
Example: read LOG00704.txt 0 100
will output the first 100 characters of the log file to the terminal (only visible ASCII characters will be visible).
1) Which one is STAT1 LED and STAT2 LED? I just wonder it be better if different color coding is used or label on PCB.
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!
Great idea about the different LED colors. I'll try to get that changed on the next run of boards.
Please see the datasheet for the LED definitions:
http://wiki.github.com/nseidle/OpenLog/datasheet
STAT1 LED is the LED right of the word OpenLog and is sitting on PD5 (Arduino D5). This LED toggles on/off every time a new character is received. This LED helps troubleshoot and indicate serial communication is working.
STAT2 LED is the LED left of the word OpenLog and is sitting on PB5 (Arduino D13). This LED is attached to the SPI Serial Clock line. You will see this LED flash rarely. It only turns on when the SPI interface is active and this is rare as the OpenLog buffers 512 bytes at a time before recording to the SD card. Recording 512 bytes is very fast so the LED is on for very little.
Finally, up and running. My unit is in command mode at power up ( I guess ver 1.1 will be different). It took me quite a few hours to guess. I think the best is to connect the unit to Hyperterminal or Tera Term or any terminal emulator. This will help you in debugging. Also, please don't forget to send line feed character after every command.
good luck,
Hi all, if any of you are trying to flash the firmware, i have written a short guide which is aimed at getting the OpenLog working with the UAV Dev Board, but includes information on getting new firmware onto the board. Unfortunately windows based, using winAVR, but the avrdude commands should be the same anywhere i guess. The guide is here:
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?
Just noticed the github link, have moved my code issue over there...
Now flashing the openLog - there seems to be a problem between avrdude - linux ftdi - 3.3v ftdi breakout - reset on the arduinos. Note I have 3 FTDI breakouts all 3.3v and it happens on all three.
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.
To use the firmware from the link on this page on a 3.3v arduino (e.g. pro mini) to the uSD breakout, you can flash directly using something like:
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
>
Connecting A2 (pc2, a/d2) on the arduino to the card detect enables that function - it works too.
To repeat for clarity -
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.
I have a 3.3v ftdi breakout (which works on all my arduinos).
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?
Hi TZ - I use a 3.3V FTDI Basic (with a TX/RX swap in between) to do all my development. 3.3V is fine even though the regulator on OpenLog is probably dropping this to 3.2V.
Another bit of strangeness - you have the reset circuit the same as the one on the arduino.
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 agree, a binary interface is a good thing to have. There are many options that we intentionally left out to keep it simple. If there are options you'd like to add, help us out!
I too am working on FAT32 - I won't have one of these but I may try to do it on one of my arduinos.
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.
Could someone try putting an SDHC formatted with just a FAT16 partition (I have several cards but they don't have any more stock as I write this).
At least that would confirm the hardware would work without change.
I just did (a 16Gb card) and it won't get past the "1". It is a FAT16 2g partition, the only one, as the first.
... and SD_RAW_SDHC was set to zero in the config, so the current firmware won't support SDHC.
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.
Hi TZ - please check again. The file called 'Makefile' in the zip listed above has ATmega328 listed at the top. And I'm not sure what you're trying to do with a 'make fuse' command. You should never need to set the ATmega328 fuses.
The schematic shows an AVR328, 3.3v and a 16Mhz crystal.
One of the three values is wrong or Atmel has a new version of the chip. A 3.3v 16Mhz arduino would be welcome...
Good catch, maybe the idea is that the system works down to 3.3V but you need to update the firmware and fuse bits yourself?
oh it looks like the system runs on 3.3V always... which throws my theory out the window
well if it fails mysteriously, you know why
Hi TZ - Check the ATmega328 docs again. The ATmega328 can run within spec at 16MHz at 3.3V. Currently on page 318 of the datasheet inside Electrical Characteristics.
Do you have a link to whatever datasheet contains the 16Mhz/3.3v? I can't find it - and I assume there is some specific suffix or something indicating the speed grade?
(And when are we going to see 3.3v/16Mhz Arduinos?)
Do a search for 'atmega328'. It should bring up Atmel first. I'm looking at the 10/09 version D datasheet. Under the "Electrical Characteristics" chapter it shows figure 28-1, a linear line from 1.8 to about 4.5V. Assuming 1MHz/.27V, we can run 3.3V at 12.22MHz. So running at 16MHz @ 3.3V, we are not inside the safe gray area. This doesn't keep me up at night. We test every board in production and haven't had one fail yet. Once we prove FAT16/32 works at 8MHz, we may downgrade the resonator.
It is possible to fix this overclocking with no change to the hardware. Set the CKDIV8 fuse, then first thing in the bootloader switch up to 8MHz with the clock divider register. Two instructions. No more overclock. The software needs rebuilt against the 8MHz library. I am not using openLog software exactly (need CRC on the data), but am using the same SD library, and it works this way. Open source is great, you can do what you need.
It probably works when you test it, but I'd worry about having one recording (or trying to) around Yuma, AZ next summer.
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.
I'm incorporating the OpenLog design into a project I'm working on, but I'm having trouble finding the source files for version 1 on GitHub. Are these still available? I really just want to change to a slower crystal since I'll be running at 3.3V. Version 1 sounds more stable and that's very important in the project I'm working on.
Just got it working! Very nice.
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.
This is very nice, less than half the price of the logomatic, much tinier, and with the more familiar AVR.
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!
There are some subtle changes between SD and SDHC. This page has a bit of information about it:
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.
At the link, it talks about MMC v.s. SD, but I didn't see anything at all about SD v.s. SDHC.
See the section titled "How to support SDC Ver2 and high capacity cards" - on the other hand, the firmware above also has support for SDHC...
couple of questions, Is 8mA a constant current or Can it be turned off completely ?
Is there a website or project page to find more info or send patches?
Thank you,
Juan
If you modify the code to shut off the unused parts of the chip, you can get down to close to 2mA when nothing is being received.
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.
8mA is what is takes to have the device on and waiting for a command. To power down the device, you would need an external control such as a MOSFET or transistor.
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.