Introduction: Explore Thermodynamics: Reach Your Mpemba Effect! (with Building ESP Thermologger)

What do scientist? They discover new things! You can say, that it is expensive. No! You can explore with cheap materials, at home with huge amount of data and nice graphs.

This is project about popular Mpemba effect - hot water freeze faster then cooler. It is interesting story, how african boy found that effect.

Story from wikipedia here :

The effect is named after Tanzanian Erasto Mpemba. He described it in 1963 in Form 3 of Magamba Secondary School, Tanganyika,when freezing ice cream mix that was hot in cookery classes and noticing that it froze before the cold mix. He later became a student at Mkwawa Secondary (formerly High) School in Iringa. The headmaster invited Dr. Denis G. Osborne from the University College in Dar es Salaam to give a lecture on physics. After the lecture, Erasto Mpemba asked him the question "If you take two similar containers with equal volumes of water, one at 35 °C (95 °F) and the other at 100 °C (212 °F), and put them into a freezer, the one that started at 100 °C (212 °F) freezes first. Why?", only to be ridiculed by his classmates and teacher. After initial consternation, Osborne experimented on the issue back at his workplace and confirmed Mpemba's finding. They published the results together in 1969, while Mpemba was studying at the College of African Wildlife Management.[9]

Well, that's interesting, but every hypothesis must be proved by experiments in laboratory and explain this phenomena. This project is about how to build simple datalogger for measure temperature using 2 digital termal sensors which send data to Thingspeak and how to measure this effect, analyze graphs in excell and interpret results.

Step 1: Datalogger: Hardware

When I think how to measure temperature simple, the best solution is send data toward to Internet. Using microSD cards are pretty uncomfortable, when I want just check temperature, I must open SD cards, move etc. So I decided to use esp8266 board instead of using Arduino and check data wherever I am (just check using thinspeak app on smartphone).

In this step, I describe list of materials and circuit. For project is needed:

1. WeMos D1 retired (I use this) or whatever what work on esp8266 chip

2. 2 xDS18b20 waterproof termal sensors

3. resistor 4k7 (4700 ohm)

4. 9V power adapter (here) for powering wemos

5. breadboard

6. some cables for connections

7. containers, cups or something where we can measure water, i used these plastic cup suitable for measuring

8. freezer (fridget usually takes only - 5 °), I used to - 25 °C

9. several liquids for measure, depends, what you want to measure, I use water, distilled water (pure water), saline water, Coca cola,


1. soldering iron, solder, etc for make proper pins for termal sensors

Circuit is pretty simple (check picture). I use WeMos D1 retired board, which is mix of Arduino Uno and Esp8266. First you can connect both termal sensors to breadboard. Connect VCC cables together, Gnd cables together and signal cables too. Usually you can recognize VCC pins as red cables, Gnd as black, and signal as yellow.

Then connect 4k7 resisot between Vcc pin (cables) and Signal pin (cables).

Finally connect Vcc pin with 3,3 V on Wemos (marked as 3V3) and GND pin with Ground on Wemos. Signal pin from termal sensor to digital pin on wemos, I choose digital pin 8 (marked as D8).

Step 2: Datalogger: Software

Firstly, you must have account on Thingspeak , where you must create your own channel. Basically, it is intuitive way, how to create own channel, but most of all, you must remember your channel ID and write API key for code. You can donwload all your data at the end, see online your graphs and work with them.

Secondly, is code for our datalogger. We use 2 digital termal sensors, which have unique address written in chip. So firstly you must find adress from both adress using code:

/* YourDuino Example: Find Address of a DS18B20 Temperature Sensor<br>Cut and paste the address to a text file for later use.
V1.1 01/17/2013

DS18B20 Pinout (Left to Right, pins down, flat side toward you)
- Left   = Ground
- Center = Signal (Pin 2):  (with 3.3K to 4.7K resistor to +5 or 3.3 )
- Right  = +5 or +3.3 V  
This sketch looks for 1-wire devices and  prints their addresses (serial number)
to the Serial Monitor in a format that is useful in Arduino sketches.
Based on example at:
<a href="" rel="nofollow"></a>
*-----( Import needed libraries )-----*/

/*-----( Declare Constants and Pin Numbers )-----*/
#define SENSOR_PIN 8  // Any pin 2 to 12 (not 13) and A0 to A5

/*-----( Declare objects )-----*/
OneWire  ourBus(SENSOR_PIN);  // Create a 1-wire object

void setup()  /****** SETUP: RUNS ONCE ******/

discoverOneWireDevices();  // Everything happens here!
}//--(end setup )---

void loop()   /****** LOOP: RUNS CONSTANTLY ******/
 // Nothing happening here

/*-----( Declare User-written Functions )-----*/
void discoverOneWireDevices(void) {
 byte i;
 byte present = 0;
 byte data[12];
 byte addr[8];

Serial.print("Looking for 1-Wire devices...\n\r");// "\n\r" is NewLine
 while( {
   Serial.print("\n\r\n\rFound \'1-Wire\' device with address:\n\r");
   for( i = 0; i < 8; i++) {
     if (addr[i] < 16) {
     Serial.print(addr[i], HEX);
     if (i < 7) {
       Serial.print(", ");
   if ( OneWire::crc8( addr, 7) != addr[7]) {
     Serial.print("CRC is not valid!\n\r");

//*********( THE END )***********

You can use wemos, or any arduino. For wemos board, you must firstly go to file - preferences and write to Manager board URL this:

and then go to manager board at Tools and download esp8266. You should have new boards - so choose wemos d1 retired or any, which you use.

After that, you can upload code to your esp:

#include <br>#include 
#define ONE_WIRE_BUS D8
const char* ssid = "here add wifi name"; // here write your wifi 
const char* password = "456432132454";  // here password from your wifi
const char* server = "";
const char* api_key = "GFDGDTRSDFDSFDSFDSFDSFSFSFSFSF";  // here you write your thinspeak API KEY (write API KEY)
WiFiClient client;
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

// variable for saving temperature
float temp;  // for first sensor, variable is temp
float temp2; // for second sensor, variable is temp2

// set adress for 1-Wire communication
DeviceAddress Probe01 = { 0x28, 0xFF, 0x9B, 0xB8, 0x70, 0x16, 0x04, 0xCA }; // here you must write adress of first termal sensor
DeviceAddress Probe02 = { 0x28, 0x43, 0xEB, 0x26, 0x00, 0x00, 0x80, 0x6D }; // here you must write adress of second termal sensor 

void setup() 
WiFi.begin(ssid, password);
Serial.println("Connecting to Wifi ");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) 
Serial.println("WiFi connected");

sensors.setResolution(Probe01, 12);
sensors.setResolution(Probe02, 12);
void loop() 
if (client.connect(server,80)) 
Serial.println("Connect to ThingSpeak - OK"); 
  temp = sensors.getTempC(Probe01);                                       
 temp2 = sensors.getTempC(Probe02); 

String dataToThingSpeak = "";
dataToThingSpeak+="GET /update?api_key=";

dataToThingSpeak+=temp;          // writing to field 1 temperature from first sensor

dataToThingSpeak+=temp2;       // writing to field 2 temperature from second sensor

dataToThingSpeak+=temp2-temp;   // write to field 3 difference of both sensors
dataToThingSpeak+=" HTTP/1.1\r\nHost: a.c.d\r\nConnection: close\r\n\r\n";

delay(1000); // wait 1 second = 1000 miliseconds

Dont forget to do this:

1. rewrite you wifi name at code

2. rewrite your password to your wifi

3. change both address on termal sensors

4. rewrite your write API key

You can also download app - Thingspeak on your smartphone to check temperature online on your mobile.

Step 3: Measuring

After that crucial electronics, you can measure. I use water, Coca cola and destilled water of different amounts. Method of measuring is simple: prepare firstly one warm liquid and colder liquid with same volume. I dont measure the mass, what should be better. Then fill containers, cups or whatever fit warm and cold liquids and place them to freezer. You can use basket and polystyrene to make place for cups or containers.

Some notes:

You can prepare distilled water pure water with evaporize and condensation water. Check this nice instructable

Dont foget, that ice expand, so better dont use glass. Use some plastic things as plastic cups.

Freezer can handle steam, but better use older one.

If you use larger amounts, it takes more time, I wait basically from 3 - 12 hours.

Step 4: Analyze the Graphs

After measuring, go to your Thingspeak channel, and download all data (called feeds) at the end. You can open csv file with Excell. Firstly, you have all data in one collum, so you must go to data - text to collum and then you make in one collum one kind of data. I add at thingspeak one another collumm - temperatures difference.

Firstly, I make graphs in Excell, check them, if you want. One for both temperatures - Temperature curves. On the x -axis I add datetime, which is date and time, another graph has time in seconds, at x - axis. Then I make difference graph.

Also, at beginning, I made basic info table, where is important amount of liquid and type of liquid.

Analyzing graphs are simple, just look at them, and check, if curve of warmer liquid goes under curve of colder one. Mostly point where it goes is 0 °C, or below a little.

analyzing my graphs:

1. coca cola - it contains a lot of sugar, and when I measure saline water (unfortunately, I dont mark excell file), I got similar situation around zerou point, when it freeze. When that kind of solutions (like saline water, sugar water) freeze, firstly it goes to - 2 or - 5 °C and then rapidly back to freezing point (for colaaround - 1.5 °C). You can check it at photos. This phenomena called supercooling. Anyway, for cola, Mpemba effect doesnt work.

2. water - I use several times water from tap, but it looks, that it sometimes work, sometimes doesnt work. I show only one measuruing of water, because others I miss.

3. distilled water - This is reversing point! For distilled water, which contains basically only molecules of H2O, it works! Mpemba effect occurs! Basically, Mpemba effect occurs for all amounts of distilled water, different is how much it occurs. We can check maximum difference between warmer and colder distilled water, which is absolute:

1. for 20 ml difference is 3.94 °C

2. for 30 ml difference is 4.12 °C

3. for 100 ml difference is 1.69 °C

When we check temperature ±0.5°C accuracy from –10°C to +85°C, which give totally 1 °C miss, even that, I reach Mpemba effect!

Step 5: Explanation

Explanation of this phenomena is a little complicated, but here are main reasons:

1. supercooling

Supercooling occurs when a liquid does not freeze although its temperature is below its freezing point.

That is simple explanations from this article. Supercooling is important for some organisms which live close to Articweather, where blood, organic liqguids instead crystalized and making ice, they stay fluid.Check photo of our curve of distilled water 20 ml - there was point of supercooling.Question is, what is freezing point for distilled water. Well, I dont know exactly, it can be zero theoretically, but there are not "dirty" crystals for making ice. But supercooling is characterized by "reversed peak", where distilled water rapidly, at once jump to higher place (0 °C or less).

2. Evaporation

- warmer water evaporize more, so warmer water lose some mass. Basically warmer water lose around 3 % of mass. Not such impact, according me.

3. Dissolved gases (check here what is dissolved gases)

- well, distilled water has basically no dissolved gases.

4. Convection

- molecules of warmer water move faster, more molecules goes up, and freeze faster. Possible impact.

5. surroundings

- it is question, if warmer and cold liquids are good isolated, but I think that this factor havent such impact.

Other arguments, which are against it:

1. wrong measuring - temperature sensors in both cups arent in same position - well, it can be true, basically, when one sensor is in horizontal position and the second sensor is in vertical position. Another argument is, scientists measure Mpemba effect and they at second measurement move up one sensor, and Mpemba effect doesnt occur. Check photo above in this step, where are both sensors.

Step 6: Conclusion

Well, Mpemba effect is really interesting, and we still dont know, if it exist, or it is just wrong measuring. If it exist, it change principle of thermodynamics, and help humanity.

We show, that Mpemba effect can be appeared at homemade conditions. you
just need some electronics, distilled water and patience, to wait for freezing warmer liquid :D


Sciencium YT channel

asking on Quora

some article


Step 7: Extras: Infrared Concept

I think how to improve measuring. How about using infrared thermometers, which they do not need to touch liquids or ice! Basically, some factors miss, like position of sensor. Also thermometer is pointed to some point, so what about using special infrared camera, which should taking photo every 15 seconds of both liquids? I will see, if whether someone shows his measuring with infrared camera on Instructable!


thormj made it! (author)2017-07-17

Might want to try putting the samples on top of stir plates and see what happens with that. If you want to see a great, reliable supercooling sequence, put a *plastic* bottle of soda in the fridge. Come back in 30 minutes or so, and if there are no crystals in the bottle, but it feels real cold, open it. If you time it right, crystals will instantly form as the pressure is released and you'll get a slushie.

And if you want to see&feel the heat coming off of a supercooling reaction, get some instant-heating pads like - it stays liquid until the snap disc forms a crystal and... (warning... doesn't last all that long).

Michal Choma made it! (author)Michal Choma2017-07-18

soda, you mean soda bicarbone? That good solution (liquid) for that.thanks for comment.

thormj made it! (author)thormj2017-07-19

Soda as in Coca-cola, Pepsi or such -- carbonated water. The bubbles create nucleation sites when you open it.

nigel.trewartha made it! (author)2017-07-18

An interestinf setup!

This "Mpemba" effect has been reported for some time - I do not understand why a known experiment is named after this person... I think that the old Greeks mentioned it as well.

Michal Choma made it! (author)Michal Choma2017-07-18

thanks, I read somewhere, that Greeks know that before, or mentioned about that.

throbscottle made it! (author)2017-07-13

There is evidence to support that the effect is real, if you need to defrost the windscreen of your car in winter. If you use hot water, it is much more likely to re-freeze that if you use cold water. People who live in a cold climate know this to be so...

Michal Choma made it! (author)Michal Choma2017-07-14

I know that when you sprayed (make small drops in air) hot water in freezing outside, its make snow fast. I try it around - 18, and it works.

ggadget made it! (author)2017-07-13

This is a fascinating experiment. Thankyou for educating me.

Michal Choma made it! (author)Michal Choma2017-07-14

thanks, my pleasure

GrantLevy made it! (author)2017-07-13

Repeatable observations of this "effect" are spurious at best. Many scientists even doubt it exists. There has been no evidence to support meaningful observations of the Mpemba effect’.

Gonzobot made it! (author)2017-07-13

This is a good Arduino project, however the science itself (mpemba effect) is, at best, bad science. Note your own results had to be massaged to get the desired outcome.

I've yet to see actual controlled experimentation proving this effect exists at all - it's YouTube science at best, with people arguing over Tupperware in their freezer at home.

Michal Choma made it! (author)Michal Choma2017-07-13

I know, that ds18b20 termal sensors, are poor in accuracy + home
conditions were too (isolated freezer is questionable). So next, I will
check some better termal sensors,

About This Instructable




Bio: I study Teaching physics and geography, I enjoy with laws of nature :D Be happy and fun with science.
More by Michal Choma:Catch the Lighting BoltExplore Thermodynamics: Reach Your Mpemba Effect! (with Building ESP Thermologger)
Add instructable to: