This spring I did some tests with a data logger based on an Arduino Nano microcontroller. The Nano Logger is very convenient because it requires little or no soldering and can be easily reconfigured, but it is not ideal for unattended long-term field deployment because it does not use battery power efficiently.
To extend the field life, I replaced the Arduino Nano with an Arduino Pro Mini. The Pro Mini can run at 3.3 volts instead of 5 volts, and it does not have a USB port or the associated power hungry serial chip. Including a real time clock (RTC) that can wake up a sleeping processor, this logger should be able to outperform the Nano Logger.
Above: The main components of the Mini Pearl Logger. The three PCBs are (L to R) RTC, Pro Mini, microSD board. The toothbrush thing is an I2C hub which allows multiple sensors to be connected. An detachable RGB LED (bottom) can indicate operational state if the LEDs on the PCBs have been removed to save power.
Ed Mallon's Cave Pearl Logger uses a similar combination of components, and Ed has done extensive testing to extend the field longevity to more than a year. I have not yet applied all of the Cave Pearl Logger's hardware and software magic, and hope to try some of them incrementally.
Above: Seventeen wires must be soldered to the Pro Mini (one is missing here) and four more connect the RTC. Each sensor needs another four wires. It's a lot of soldering, but it's very straightforward to connect everything up.
For my first iteration I did not disable the LEDs on the boards, so two bright LEDs are on all of the time burning power. I assembled the logger without replacing any resistors or adding a voltage divider. So this was a minimalist version of the Cave Pearl Logger which has to be called the Mini Pearl Logger.
I modified one of Ed Mallon's basic sketches to log data from three temperature sensors (MCP9808) and one barometric pressure, temperature, and humidity sensor (BME280). The sketch puts the processor to sleep between data saves. The MCP9808 sensors were also put to sleep individually. The microSD board was not explicitly put to sleep, so I don't know if it is burning lots of power all the time. If anyone can discern that from the sketch below, please let me know.
I tried out the logger in the compost pile, but I did almost everything wrong. The three MCP9808 temperature sensors were placed in long PVC tubes and inserted toward the center of the pile, and the one BME sensor was next to the pile. But I forgot to change the sampling interval from one minute to something more reasonable. And I didn't notice that the MCP9808 sensors were not being read properly, so I didn't get any data from the hot center of the compost pile. And the four AAA batteries lasted only about 55 hours which was disappointing, but collecting no data for 55 hours is probably better than collecting no data for a week.
Above: The Mini Pearl Logger is in the Nalgene bottle and three 70cm PVC tubes are inserted into the pile (black film vials cover the tube ends). A BME280 sensor and the indicator LED are outside the bottle, so I put a rain cover over it.
I'm not sure if the short battery life was primarily due to the SD card using power or to the two board LEDs using power. I figured out the MCP9808 failure (a delay of 0.25 seconds between waking and reading the sensor is sometimes not enough) and I deployed the device again with the sampling interval at 10 minutes. I guess it will last several days now.
I made a second logger, so I plan to disable the LEDs on the boards (apparently easy to do with a soldering iron), and see how long it lasts. I think there are some other tricks I need to learn to extend battery life. With luck, it will eventually take a very long time to learn if my incremental changes improved longevity.
I have a few extras of the components for this logger, so if you want to try assembling one and see how long you can make it log data, I can send you a kit for $19.00.
Here is the working sketch I am using on the Mini Pearl now: __ Mini_3MCP_0.2.txt