Using duino as periodic data-log and timer ?

I want to use an Iduino to collect data, but not continuously, just at times when I want it to. It would be programmed to store data in external EEPROM when I "tell it to". It will need to be battery powered and placed in a location that will be away from a computer. However, it should be keeping track of time until, and during, the times when I want to collect data.
Can this be done ? Will I need a seperate timer?

The timing wouldn't need to be highly accurate, just indicate the day that I would be collecting the data.

Yep you could definitely do this using arduino.

You could use the built-in timers/onboard crystal. Even if it lost +/- 1 minute a week (mine gets much better than that) it still sounds like that would meet your requirements.

Alternatively you could use some cheap external hardware - something like a DS1307. This would keep the time for you, and when you want to "datestamp"a reading you simple ask the DS1307 what the times is. There are many sketches out there to do this.

Note that if you are planning on getting run times in the order of weeks using battery power, you'll need to look at some power saving techniques like putting the arduino to sleep, and/or using some big batteries.

A external clock solution would probably be even better for your project because you could put the arduino to the deepest level of sleep, and the DS1307 would just need a small coin cell battery to keep the time updating.

If your application will remain continuously powered you can use the DateTime library to provide date and time accurate to a few seconds per day without external hardware : Arduino Playground - DateTime

Posted by: mem Posted on: Today at 10:41:07
If your application will remain continuously powered you can use the DateTime library to provide date and time accurate to a few seconds per day without external hardware : http://www.arduino.cc/playground/Code/DateTime

Won't the DataTime stop then restart at zero when the reset button is pushed?
I don't know for sure, yet, but I might need to hit the reset button whenever I want to start data logging.

What I want to use the logger for is to count pulses from the speed sensor of my motorcycle then record the counts on external EEPROM, but I would only want to use the logger at certain times when I'm making test runs on the bike. If I leave the logger on the bike, the bike's battery can be used for continuous power to keep the timer going.( I don't think that would be too much of a power drain)

I've already made up a sketch to count/time and record external pulses then write the results to external EEPROM, and another sketch to read from the EEPROM then display the data on arduino's serial monitor and/or hyperterminal. (I got the ideas from examples on arduino reference, giving credit where credit is due)

I'm using(or can use) small, inexpensive RBBB's (really bare bones boards), one for recording to EEPROM, the other to read from EEPROM then display data on a PC.

Using a DS1307 sounds like a good idea, but don't they cost around $20 ?. However using a DS1307, only one RBBB would be needed. But SparkFun seems to be out of them.

Thanks again

Won't the DataTime stop then restart at zero when the reset button is pushed?
Yes, but if you added another button to start or stop logging you would not need to reset the board.

You should only need one arduino for this, nothing you are doing should be TOO taxing on the arduino space or I/O wise.

DS1307 raw chip is about AU$4 where I live. You just need to at a watch crystal which is about $0.32 and a coin cell holder. A pre-made module like the sparkun one is about AU$10.50. I agree the sparkfun one is not cheap, but as always you pay for availability and convienience.

By the way you could look at the recently much discussed uFat libraries which allow you to log data to an SD card. Check out the Exhibiton forum

Posted by: trialex
By the way you could look at the recently much discussed uFat libraries which allow you to log data to an SD card. Check out the Exhibiton forum

I don't know much about that FAT stuff. I read someplace that an atmega168 didn't have enough room for the required coding.

Am I correct in thinking that under the FAT system, an SD card could be used to store collected data, then brought to a PC where data from the card could be fed directly to the PC via one of the PC's ports ?

Am I correct in thinking that under the FAT system, an SD card could be used to store collected data, then brought to a PC where data from the card could be fed directly to the PC via one of the PC's ports ?

Yes. With some limitations.

There is an EXCELLENT thread in the Exhibition forum, it describes the tradeoffs of using the uFat libraries. I won't type too much here because it's all there, but basically for fitting the code to write FAT into arduino you have to format the card using FAT16 on your PC and pre-populate a file . The arduino can then write into that file.

Here's the link to the discussion:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235125412/0