Input logger with rtc and pc interface

flippie:

  • An external clock with a dedicated battery would be needed, as the time should be kept even if the Arduino itself loses power.
  • I'm not sure about battery life, or if a standard 9V battery / clip would be enough. I want the device to always be ready to accept and save input, but I'm not sure if it's feasible to keep polling in a loop the whole day long, as it will obviously drain the battery. One solution is to have a power switch, or does the Arduino support interrupts?

The 9v batteries for smoke alarms, don't last too long on Arduinos. You may want to investigate using 3 or more AA batteries.

flippie:
I've considered these approaches. I'm not sure if there are easier ways:

  1. Get an RTC shield, as well as an SD card shield. The problem is, can I use two shields at once?
  2. Get a schematic or design it myself, and solder all the individual components together using just the AtMega itself separate from the Arduino.

Any thoughts would be appreciated.
Thanks!

Adafruit makes a shield that combines both RTC and SD into one shield that runs on UNOs (it doesn't seem to work on a Mega without some work). Unfortunately, they are out of stock at the moment Adafruit Data logging shield for Arduino [v1.0] : ID 243 : Adafruit Industries, Unique & fun DIY electronics and kits.

In terms of using multiple shields, it depends on each of the two shields. If they use the same pins (except for i2c/spi serial traffic), then you can't use them together. Likewise if they don't have extenders, so you can plug a second shield into it, they can't be stacked (video shields typically don't allow another shield to be mounted on top, since the presumption is you are going to use the display).

I think many of the RTC chips use i2c. I2c and spi are serial buses that allow multiple devices to be connected (each device has an address, and will only look for commands directed to that address). I'm not familar with SD shields and whether they use i2c or not, but if they do, you should be able to attach the RTC to the i2c bus.