# Does Dry Ice Really Cool Five Times Better Than Regular Ice?

Author: Jeremy Morgan

I saw an advertisement for dry ice claiming it cools 5 times better than wet ice. Out of curiosity I had to know if this were true, or at the very least see how much better dry ice performs. I thought I’d gather up a Raspberry Pi and some sensors and find out, using some techniques from my Hands on Internet of Things course released recently.

I’m sharing what I found here and showing how you can replicate the experiment.

### What Does 5 Times the Cooling Power Mean?

This is the first thing I wondered. Does it keep it 5 times colder? Does it keep it cool 5 times longer? The claim is still a bit unclear, but based on my results it appears it keeps it close to 5 times colder, for about the same amount of time.

What I did was take a couple coolers, filled one with Dry Ice and one with wet ice, sealed them up and measured them for a few days.

Take a look at our graph:

I did a minute by minute sampling, and perhaps unsurprisingly the first minute was the coldest. at that point:

Our dry ice was at -111.775 degrees Fahrenheit, and the wet ice was at 26.2634. This is closer to around 4 times colder. But does it keep it cold longer? Not really. Actually if you look at the drop off wet ice actually kept it colder than the room temperature for a while longer, but the difference is small:

This was over the course of a few days, and as you can see they converge toward the end but the wet ice still keeps cool a bit longer. I’m assuming this is because the dry ice disappears. Here are some basic conclusions I derive from this data:

• Dry Ice Keeps Items Significantly Colder For a couple days, the temperature was around 4 times colder in the Dry Ice cooler.
• Dry Ice Has a Pretty Significant Drop Off. From -80 to 0 degrees in about 8 hours. Wet ice only got 1.5 degrees warmer in this same amount of time.
• Both Methods Cool for Roughly the Same Amount of Time - I expected the wet ice to stay cool for hours, not days. Although it is much warmer by comparison it lasted just as long.
• Dry Ice Is Probably Overkill - Most of the things people put in a cooler dont need to be -90 degrees. Soda, beer or sandwiches are probably just fine at 32 degrees.

When I started this project I assumed that dry ice would be much colder, for much longer. I can’t draw a ton of conclusions from this experiment just yet. I’m definitely going to run a few more just like it.

I measured the air temperature as well, but since one of the sensors was faulty the data is bad.

If you want access to the data here is the dataset. I’ll surely do more with it in the future. Now, here are the details for how I set it up.

## Setting up the Project

To set this up you’ll need:

I wired these sensors together in a somewhat crude fashion, but you may want to do something nicer like a junction block or something.

What I did for each sensor was grab the serial number and label it so I knew which sensors I was reading:

And placed each of them in the cooler. I had one at the top of each cooler, and one at the bottom, and one sensor out in the open air to measure room temperature.

### Setup the Pi with the DSB1820 Sensors

First we need to get the pi ready for the DSB1820 sensors. To do that we will set up our one wire support.

Open up your boot config (by typing sudo nano /boot/config.txt) and add the following line:

Then reboot the pi (sudo reboot). After rebooting, type the following:

It should look like this:

Now what you’re seeing here is a set of directories, one for each sensor. To make sure they all work, cd into each directory and check them with the following command:

It should look like this:

the YES means it works. If you’re following along and just want to check all 5 really quick use this script :

https://github.com/IoT-Projects/SuperCool/blob/master/checksensors.sh

It will go through all your sensors and check them.

Now, let’s write a script to grab the values.

### Script to Read Temperature Values

For this we will use Python, and this script will read the values from the sensors that come out of that folder we were in earlier.

For a lot of this first part we will lift some code from Adafruit and make it our own. Put this at the top of your script:

This is what you’ll need to get started reading the sensors.

Next, you’ll need to create a list of serial numbers from your devices. Yours will be different from mine.

Next, we’ll create a function to read the temp in raw mode:

This function will be called by our read_temp function, that reads that raw data into a string array and parses it:

This next part is tricky. I plugged in each sensor individually to get the serial number of each. Now, we must match the serial number with the position of the sensor.

For this experiment I attach one sensor to the lid (top) and one to the bottom of the container. This way the top one will measure the air temperature and the other will be submerged in water for the wet ice, and covered with dry ice. This is just my initial thoughts on this experiment, feel free to try some other configurations. Here’s how we gather the readings:

So basically we arrange the serials in a string array and address them. The read_temp function takes in this argument and then passes it to read_temp_raw which then extracts the information from the sensor and sends it back to read_temp which parses the information and sends back a number.

I added an average to the mix, which as you can see is just an average between the top and bottom sensor. I don’t know if it will provide value or not, but decided to throw it in.

### Storing the Data on Adafruit.IO

I love using Adafruit.IO for their cool visualizations. I’m not going to go into setting up a dashboard in this article, but If you want to know how to set up your own Adafruit.IO dashboard check out this article for instructions or you can follow lecture 15 of my IoT course.

To connect to my dashboard, I added the following code:

This is a function to connect to Adafruit, you will need to include urllib and urllib2, as well as use your own aiokey.

Then to send the data (each field is sent one at a time with Adafruit)

This sends our data out to a nice dashboard.

### Sending Data to Sparkfun

I decided to send some data to Sparkfun for the heck of it. You can get instructions for doing that here or check out lecture 13 of my IoT course.

Since Sparkfun uses values passed in the URL, we build a long URL string like so:

The variables sparkfunprojecturl and sparkfunprivatekey are defined at the top of the script and you’ll need to get your own.

Then we call it:

We don’t do anything with the content returned, but you can if you choose to. This will put send our data to the sparkfun feed found here.

### Update every minute

Next, I want to call this script once a minute, so I’ll use crontab to do that:

I want to call my script once a minute, so I add the following line to my crontab: