The Trial Run
My plan is to do some allotment greenhouse monitoring, but as an initial waterproofing test, and to indulge a curiosity, I plan to see differing freeze rates of hot and cold "foods" placed into a freezer.
I'm only doing a brief test in my freezer as my setup isn't suitable, but it does use desiccant for protection.
The DS18B20s will be poked into a pair of food containers that conveniently have silicone edged breather holes.
There will be 500g of water in each container, or 500ml but measured on weighing scales, one at room temperature and the other from a recently boiled kettle. This will make any future calculations easier.
The amount doesn't really matter to me, but hey if you keep a record of the details then it's actual science!
It's import to note that most components won't tolerate condensing humidity without some form of conformal coating, alternatively a suitable heater or a replaceable dehumidifying substance (desiccant). Waterproofing is a whole other topic, but it’s a good start to get an IP rated container with suitable ports (Adafruit sells some in the shop), use sealed components and wiring, and use cable glands to safely pass wires through the walls of the container.
SD Cards and Config files
The software uses a file called config.json
to record the configuration of your device and components. It stores your SD cards Clock Select (CS) pin, RTC (real-time clock) model, and any attached components.
If you're lucky then after installing the offline data logging software on your device, it will automatically guess the chip select pin for the SD card and then go on to configure all the attached I2C sensors before starting to log at 30second intervals (which can be modified in the config.json
file generated on the device).
Alternatively it may fail to recognise the SD card pin and/or exact sensors attached, in which case there's a handy configuration tool available to help you specify the correct setup, also useful for I2C Multiplexers!
Visit the site at https://adafruit.github.io/Adafruit_Wippersnapper_Offline_Configurator/
It can also be used to import a config.json
file, to save you work before modifying the configuration.
There are a wealth of supported boards to pick from (and we accept pull requests), along with the most common companion boards (like Adalogger Featherwing and shields) saving you from looking up pin numbers.
Alternatively you can always find the real-time clock (RTC) model and the SD card chip select pin information on the Pinout page from your boards learn guide in the Adafruit Learning System, just search for your product like 'pico adalogger' then go to the main learn guide. If you get stuck, then pop over to discord or the forums.
Here's the beginning of the config file I used. Yours will be similar, but you can optionally have no RTC defined:
{ "exportedFromDevice": { "referenceVoltage": 3.3, "totalGPIOPins": 32, "totalAnalogPins": 6, "sd_cs_pin": 17, "rtc": "PCF8523", "statusLEDBrightness": 0.1 }, "components": [ ] }
The sensors and other components then need configuring with their pin names or i2c addresses, timings (polling period), and which sensor properties to record.
If your setup matches mine then this config will work nicely for you, otherwise look at the main guide for further information on configs and supported boards and components.
{ "exportedFromDevice": { "referenceVoltage": 3.3, "totalGPIOPins": 32, "totalAnalogPins": 6, "sd_cs_pin": 17, "rtc": "PCF8523", "statusLEDBrightness": 0.1 }, "components": [ { "name": "mcp9808", "componentAPI": "i2c", "i2cDeviceName": "mcp9808", "period": 30, "i2cDeviceAddress": "0x18", "i2cDeviceSensorTypes": [ {"type": "ambient-temp-fahrenheit"}, {"type": "ambient-temp"} ] }, { "componentAPI": "ds18x20", "name": "DS18B20: Temperature Sensor", "sensorTypeCount": 2, "sensorType1": "object-temp-fahrenheit", "sensorType2": "object-temp", "pinName": "D13", "sensorResolution": 12, "period": 30 }, { "componentAPI": "ds18x20", "name": "DS18B20: Temperature Sensor", "sensorTypeCount": 2, "sensorType1": "object-temp-fahrenheit", "sensorType2": "object-temp", "pinName": "D14", "sensorResolution": 12, "period": 30 }, { "name": "Weatherproof SHT30", "componentAPI": "i2c", "i2cDeviceName": "sht30_mesh", "period": 30, "i2cDeviceAddress": "0x44", "i2cDeviceSensorTypes": [ { "type": "ambient-temp" }, { "type": "ambient-temp-fahrenheit" }, { "type": "relative-humidity" } ] } ] }
Testing and Results
Ensure your RTC has a battery inserted (usually a CR1220 3 volt battery, but double check on your product page), and with the config correct, the microSD inserted, and for now the USB cable connected to the main board, connect the other end of that USB cable to your computer.
You want to reboot the device and verify the serial monitor output shows the sensors are logging, before unplugging the USB cable. If the RTC is not already set, then it will be set to a default value of the date and time that the offline data logger software was released.
At that point, if a battery is still connected, the device will remain logging unless switched off. Alternatively take it to the final resting place and power it up.
Come back when the experiment is done and unplug the power source (or use the switch) before removing the microSD card.
Let's go analyze those results on the computer! (I've attached them here in case you're curious)
Page last edited May 13, 2025
Text editor powered by tinymce.