Arduino Lifespan on batteries?

Ok I have had my arduino for absolutely ages and never really done anything with it (mainly because my first objective was far to complicated involving an unknown LCD screen!). So now I have decided to embark on a small project which I can do using someones basic coding for temperature measurement and data logging.

Going forward the unit will become autonomous writing its data to SD card, but then I thought how long will it last on batteries?

Its at this point I should be specific and say what batteries I am planning on using, I have some Ni-CD D cells from some emergency lighting(13-14w compact fluorescent) which wouldnt hold up the lights for quite 3 hours (more like 2.7 which is still a fair amount of time) The pack is 5 Cells giving 6V 4ah.

I know most people run arduinos off AA batts or similar so I wondered how much life span I might get out of these big Ni-Cd D cell packs?

Long term I will look to add a little solar cell to keep things topped up, but for now I want to be able to just run it off a pack I can charge up, providing it lasts long enough.

Between a day and a few months.

What kind of Arduino board do you use, and what is connected to it.

The most used microcontroller is the ATmega328P. If that chip is in sleep mode, it uses far less current than the internal leak current of the batteries. It depends mostly on the other components what the total current is. For example, if you use an ethernet shield, the W5100 chip uses a lot of current.

Well its the standard uno board I have at the minute, I'd be using an SD card for data storage (so write actions once a minute probably) and using maybe a couple of analogue sensors (thermistor and LDR) to take readings from.

That could be less than a week. So you might have to use a sleep mode.

Well that sounds ok, my theory is that as long as it has enough survival for a few days it would be fine as its a bit of data collecting, which is potentially going to be run with a solar panel once we get to stage where its run from battieries anyway, my other project based around the same idea and it needs a life span of about 24hrs between charges.

Sleep mode alone won't power down the SD card tho. You might want to look into a standalone circuit after you get the design/code working so that you are not wasting power with a linear regulator and the power LED and the USB/Serial chip and so that you can power down the SD card completely between writes. You don't need high speed for this, so you could also look into running totally from 3.3V with 8 MHz for the processor. A good start for testing would be a 3.3V/8 MHz promini, with a switching regulator to take your 6V down to 3.3V for the promini (connect 3.3V to Vcc, bypassing rhe regulator) and the SD card.