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
This will become a more automatically setup in the future, which will be making it almost too easy, but for now after installing the offline data logging software on your device, it requires configuring with your SD cards Clock Select (CS) pin and RTC (real-time clock) model in the config.json file.
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 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 April 02, 2025
Text editor powered by tinymce.