Accurate Arduino-controlled Water Bath

1,570 views
Skip to first unread message

Cathal Garvey

unread,
Jun 12, 2011, 9:33:42 AM6/12/11
to diybio
Hey all,
I made some code to control a water bath, and it's working pretty nicely with a small camping kettle I have here.
Ingredients: Arduino, LM35dz (Temperature sensor), SMT 2000/4 (Solid State Relay), 650W camping Kettle.

I've attached pictures to show my setup, and a sample graph of temperatures I've set and reached.
Yes, I'm cooking an egg sous-vide to test it out in that picture. I'll let you know how it goes, I'm waiting for 2700 seconds on the serial monitor 'til it's done, according to this article (45 mins at 64C).
Here's the code:
//======Begin Code Dump======
/* Kettle Water Bath
  By Cathal Garvey, @onetruecathal, cathal...@gmail.com
  For DIYbio and Indiebiotech.com
  
  Co-licensed under GNU LGPL or Creative Commons Attribution, Sharealike license.
  Attribution preferably to "Cathal Garvey, Indiebiotech.com".
  
  Water baths are a useful piece of lab equipment, used to maintain accurate temperatures
  over a long period of time. They are used for activating enzymes, destroying proteins,
  incubating live samples, and old-school PCR. These days they also see use in Sous-Vide
  cooking and the art of Molecular Gastronomy, for feats such as boiling the whites of an
  egg without affecting the yolk at all (due to the difference in denaturation temperature
  between the two).
  
  However, water baths, for all their simplicity, are stupendously expensive. Worse, they
  can be awkward to DIY easily; most existing published projects feature expensive
  temperature controllers. However, with a camping kettle (to ensure low current draw),
  an LM35 temperature sensor, a Solid State Relay (the model I used was "SMT 2000/4", 
  4A max) and an Arduino, you can make a highly accurate and extremely versatile water
  bath for your DIYbio or cooking needs.
  
  Quite simple:
  1) First, solder leads to your LM35 and waterproof it. I used sugru to encase the
  whole sensor and the bare leads to stop them conducting through water to one another.
  Keep whatever waterproofing you use very thin to ensure decent heat conduction through.
  2) Splice the Solid State Relay into the power cable of the kettle. THIS IS DANGEROUS.
  Don't do it until the kettle is plugged out (DUH). Strip some of the kettle power lead
  to reveal the inner cables with their individual insulation. Take one of the power leads
  (not the ground; it may be easier to do this near the plug socket for ease of ID), and
  cut it, then strip both cut ends. Solder the 240V/4A pins of the SSR to the two cut
  ends of the cable. Then solder two breadboard jumper leads or similar wires to the
  signal pins of the SSR. Seal the relay pins and solder joins individually in electrical
  tape, then tape the SSR to the rest of the kettle wire, and then tape over the whole
  thing to seal it. When you're done, there should be no way that the cables will short
  or become exposed, putting you or someone else at risk. Keep it that way!
  3) Plug the wire for the middle pin of the LM35 into an Analog-in pin on the arduino,
  and change the code below to represent which one you used. Plug the wire for the ground
  into an Arduino ground socket, and the wire for power-in (Vs) into the 5V socket. Then
  put the sensor into the water, but not touching the element of the kettle!
  4) Plug the wires from your SSR into the arduino: One into the ground, another into a
  digital pin of your choice. The code is configured below to use pin 13 to make use of
  the handy built-in LED on that pin. The SSR has polarity; that is, one pin is ground,
  another is Voltage-in (Vin): test them using the Arduino's 5V and Gnd pins to ID them.
  The Vin pin should go in your digital socket (i.e. pin 13), the other into a Gnd pin.
  5) Take a jumper and connect pin 11 to ground. Make sure you've got the code below on
  the arduino before you do so; with the wrong code, this could burn out pin 11! You
  can turn this feature off, but that jumper will act as a "Firing Pin", only starting
  the water bath program when you pull the pin (but putting the pin back won't stop the
  program then; it's like a Grenade, once pulled it's too late to go back (without
  pressing reset (or pulling the plug (Whee nested brackets))))
  6) Set the program below to your desired target and failsafe temperatures, upload it
  to the Arduino, open the serial monitor if desired, and pull the pin. Watch it to be
  sure it's hitting and maintaining the right temperature. Experiment with the failsafe
  to ensure it's working correctly.
  7) Make **Sure** your temperature sensor is always immersed in the water. If the water
  evaporates and the sensor is dry, the kettle may get stuck on. That's dangerous.
  
  Enjoy, don't kill yourself with it please, and let me know if you try it out, I'd love
  to hear your feedback or experience with it.
  
  All the best,
  Cathal
*/

//Pins in use for Cyclercan (change as required):
const int TempPin = A0;
const int HeatPin = 13;
const int FiringPin = 11; // Set this pin to HIGH (i.e. w/switch) to start the cycler.

//Temperatures used for cycling: Change according to enzyme and primers used:
float TargetTemp = 64;
float FailSafeTemp = 70;
float GlobalError = 0.5; //Within how many degrees to maintain temperature.
float TempHolder; //Used to hold temperature readings per-cycle.

//When not pulsing, serial data must be paced but delays can't be used or program flow is interrupted.
//The following two values only apply to the PushData function.
long TimeHolder; //Used to pace data output when temperature is stable
long DataInterval = 1500; //Minimum time to wait between pushing serial data

//Timer parameters used to control heat-pulse delivery:
unsigned long RestTracker; //Used to track how long a between-pulse rest has lasted.
unsigned long HeatTracker; //Used to track how long a heat-pulse has lasted
//Heat Pulsing parameters; for fine-tuning your setup.
const int HeatPulseDur = 1000; //Sets the amount of time in milliseconds the heat-source is given each pulse
const int RestPulseDur = 1200; //Sets the time between pulses while temperature equilibriates and/or sensor updates

boolean DataLogging = true; //Alternative to Verbose; outputs csv.
boolean Debug = false; // Tell me everything, including annoying temperature read data
boolean WaitTilPinPull = true; //Sets the arduino to wait for firingpin to pull before going.

void setup()
 {
  Serial.begin(9600); //opens serial port, sets data rate to 9600 bps
  pinMode(FiringPin,INPUT);
  pinMode(TempPin,INPUT);
  pinMode(HeatPin,OUTPUT);
  if(DataLogging){
    delay(5000); //Gives you time to set up the serial monitor
    Serial.println("Time(s),Target(C),Actual(C)");
  }
 }

void loop(){
  
  while(WaitTilPinPull){ //Check are we in preflight mode, and don't start til the pin is pulled.
   digitalWrite(HeatPin,LOW); //This is just a failsafe, it'll already be low..
   if(DataLogging){PushData(0);}
   if(digitalRead(FiringPin) == HIGH){
     WaitTilPinPull = false;
   }
  } //End preflight mode.
  
   TempHolder = ReadLM35(TempPin); //Set temperature-handler to current sensor reading
   if(TempHolder >= FailSafeTemp){ //An overheat failsafe to account for potential clock malfunction/overflow
    while(true){ //The perma-true query means yes, this gets locked into a while loop forever. It's a failsafe, after all.
     digitalWrite(HeatPin,LOW);
     Serial.print("Failsafe temperature ");
     Serial.print(FailSafeTemp);
     Serial.println("C reached, system shutdown");
     delay(1000);
    }
   } //End failsafe
   HoldTemp(TargetTemp); //Maintain temperature at preset value
 }

void HoldTemp(float TargetTemp){
      if(TempHolder < (TargetTemp-GlobalError)){ //If temperature is not yet at target...
        if(DataLogging){PushData(TargetTemp);}
        HeatPulse(); //Calls Heatpulse to deliver a pulse of heat. Lovely.
      } else{ //That is, if the temperature is at least TargetTemp-GlobalError..
          digitalWrite(HeatPin,LOW); //This is **critical**; otherwise negative control of the pin is left entirely to a function
                                     // (HeatPulse()) that may or may not be called, above!
          if(DataLogging){PushData(TargetTemp);} //Keep on loggin'
        }
    }

void HeatPulse(){
//This function was written to use timer variables so that the code wouldn't depend on "delay()" functions to work;
// this makes things more flexible, but due to the potential for datatype tomfoolery I've included failsafes in the main loop.
// It wouldn't be a good idea to remove the failsafes or put any while or delay functions in this function unless you know what
// you are doing and debug it carefully; a heater that gets stuck to "on" is pretty bad news.

  if((millis() - HeatTracker) > HeatPulseDur){
   digitalWrite(HeatPin,LOW);
   if(Debug){Serial.print("millis() = ");Serial.print(millis());Serial.println(" - Ran Heat-off if-loop in HeatPulse()");}
  }

  
  if((millis() - HeatTracker) > (HeatPulseDur + RestPulseDur)){
   HeatTracker = millis();
   digitalWrite(HeatPin,HIGH);  
   if(Debug){Serial.print("millis() = ");Serial.print(millis());Serial.println(" - Ran Heat-on if-loop in HeatPulse()");}
  }
  
}


void PushData(float Targ){
  if((millis() - TimeHolder) > DataInterval){
    Serial.print(millis()/1000);
    Serial.print(",");
    Serial.print(Targ);
    Serial.print(",");
    Serial.println(ReadLM35(TempPin));
    if(Debug){
     Serial.print("HeatTracker: ");
     Serial.print(HeatTracker);
     Serial.print(" - RestTracker: ");
     Serial.print(RestTracker);
     Serial.print(" - millis()-HeatTracker= ");
     Serial.print(millis() - HeatTracker);
     Serial.println(); 
    }
    TimeHolder = millis(); //Reset TimeHolder
  }
}

float ReadLM35(int tempPin){
 float temp;
 boolean SensorDebug = false;
 int ReadNums = 100; //Set to ten, I experienced temperature staying generally 3/4C above target; erroneous sensor readings. Keep high.
 if(SensorDebug){Serial.println();} //Keeps the debug a bit tidier
 for(int i = 1; i < (ReadNums+1); i++){ //Read the sensor value five times and add them all up.
   temp = temp + analogRead(tempPin);
   if(SensorDebug){Serial.print("Debug: Reading #");Serial.print(i);Serial.print(": ");Serial.println(temp);} //Spews counts
 }
 temp = temp / ReadNums; //Average of five reads (for more accuracy, fewer outliers)
 temp = (5.0 * temp * 100.0)/1024.0;  //convert the analog data to temperature 
 return temp;
}
//======End Code Dump=======
GeneralWaterBathProto2.pde
IMG_20110612_141346.jpg
EggCookingArduino.png
Kettle95CTest.png

ByoWired

unread,
Jun 12, 2011, 11:00:20 AM6/12/11
to DIYbio


On Jun 12, 9:33 am, Cathal Garvey <cathalgar...@gmail.com> wrote:
> Hey all,
> I made some code to control a water bath, and it's working pretty nicely
> with a small camping kettle I have here....

Do research water baths have a way of circulating water so you don't
get thermoclines (temperature stratification) in the bath?

Have you placed your temperature sensor in various parts of the bath
to ascertain you have uniform temperatures?

If temperature stratification exists, does it matter to your
application?

Cathal Garvey

unread,
Jun 12, 2011, 11:12:28 AM6/12/11
to diy...@googlegroups.com
I order:
Often,
No,
No.

I could certainly put a little servo-controlled agitator into the bath to enforce uniformity, but I simply don't need it at present. If anyone else would like to, it'd only require a cheap servo and a small code addition. Try not to use delay() if you do though, because that could potentially screw up the timing of heater on/off. The program as-written uses timestamps to control everything so that control processes and serial output can be run in parallel. I'll probably merge a lot of those developments back into CyclerCan after the Science Gallery workshops.

The egg was strange but flavoursome, by the way. Cooking at 64C for 45 mins yields an egg with a just-firm yolk and semi-liquid whites. One of the two major proteins in egg yolk hardens at 62, the other at 80, so the whites and yolk end up having similar textures. I imagine my use of an egg from our garden may have altered the precise cooking parameters; our hens are totally free range, which tends to lead to more carotenoids in the yolk. Additionally, as the egg was pretty fresh it was probably a little more alkaline than the average shop-bought egg, as less CO2 would have escaped through the shell.

Worthy of further experimentation. Unfortunately I lost the serial data from that cooking run, so I'll have to try it again and start optimising! I'll hack in some timer code soon enough so I can pre-program cooking times and tweak parameters to arrive at the "perfect" egg.


--
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To post to this group, send email to diy...@googlegroups.com.
To unsubscribe from this group, send email to diybio+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/diybio?hl=en.

Mac Cowell

unread,
Jun 12, 2011, 3:37:52 PM6/12/11
to diy...@googlegroups.com, diy...@googlegroups.com
Couple thoughts:

A variety of folks are working on thermocyclers and writing their own control software.  It'd be nice if we could stitch all the best parts together to make all the thermocyclers better.  Not sure how big of a project that is, but I think it's an awesome goal.  

Bioboard guys + openpcr + cyclercan + other PCR devs + pachube = better lab equipment for all.

Mac

231.313.9062 // @100ideas // iPhoned

Cathal Garvey

unread,
Jun 12, 2011, 6:05:05 PM6/12/11
to diy...@googlegroups.com

Goodness knows my code could do with better PID, preferably something adaptive so it can be used with variable setups. I only rolled my own code because AI didn't have time to figure out anyone else's! :)

Looking forward to learning from OpenPCR soon though. That'll be my workhorse when I get it, for reproducibility and reliability.

On 12 Jun 2011 20:38, "Mac Cowell" <m...@diybio.org> wrote:

Andrew Barney

unread,
Jun 13, 2011, 2:44:20 AM6/13/11
to diy...@googlegroups.com
Hey Cathal, great work!

I was actually planning on building an arduino controlled waterbath
myself. I have already completed a diy relay controlled outlet very
similar to the one on instructables and the one by sparkfun
electronics. I also bought a commercial outlet from ladyada that seems
to do the same thing. I was planning on using it in conjunction with a
hotplate or an electric tea kettle. I just need to order some new temp
sensors, since i seem to have misplaced my old ones. I've used the
lm35's before, and they are reliable. Cathal, did you happen to
enclose your temp sensor in silicon to make it waterproof? I was
planning on doing that with mine, as well as wiring it to a servo pwm
cable. A mechanical relay is not exactly ideal for this sort of thing
though, perhaps i will build one with a solidstate relay in the
future. PID would be excellent, i look forward to seeing that in the
future.

Yeah, my thoughts as well. I was also thinking that this could be used
as a crude thermocycler. A hot bath in one pan, and a pan of ice water
in the next. Seems like it should work.

http://www.instructables.com/id/SEEED-Studio-Arduino-5V-Relay-module-Digita/
http://www.sparkfun.com/tutorials/119

DSCF0335.JPG
DSCF0336.JPG
DSCF0339.JPG

Cathal Garvey

unread,
Jun 13, 2011, 4:28:14 AM6/13/11
to diy...@googlegroups.com

Cool! Yea, I encased it in Sugru, a really nice brand of modelling-clay-like silicone. The rest of the leads back to the arduino were still insulated so I just taped them together.

Solid State Relays have been working great for me but take care to ensure your current draw isn't too high: you guys have much lower AC voltage over there so I'd expect higher current for the same wattage.

On 13 Jun 2011 07:44, "Andrew Barney" <kee...@gmail.com> wrote:

JonathanCline

unread,
Jun 14, 2011, 11:08:16 AM6/14/11
to DIYbio


On Jun 13, 1:28 am, Cathal Garvey <cathalgar...@gmail.com> wrote:
> Cool! Yea, I encased it in Sugru, a really nice brand of modelling-clay-like
> silicone.

Since silicone is a thermal insulator as well, I wonder if that
biases
your readings. There are some interesting 3M potting compounds
which promise good thermal conductivity.




--
## Jonathan Cline
## jcl...@ieee.org
## Mobile: +1-805-617-0223
########################

ByoWired

unread,
Jun 15, 2011, 7:56:10 AM6/15/11
to DIYbio


On Jun 13, 4:28 am, Cathal Garvey <cathalgar...@gmail.com> wrote:
> Cool! Yea, I encased it in Sugru, a really nice brand of modelling-clay-like
> silicone....

I agree with Mr. Cline. Encasing a sensor in a clay-like material
will probably all but kill any dynamic response your control system
might have. Even a material that is thermally conductive should have
a wall thickness as thin as possible if you're hoping to have any
reasonable control over the system.

Simon Quellen Field

unread,
Jun 15, 2011, 11:01:20 AM6/15/11
to diy...@googlegroups.com
Actually, no.

What is important is that the time constant of the sensor be less than half of the time
constant of the water bath. (See Nyquist).

The thermostat in a swimming pool is awful. It has several degrees of hysteresis,
and cycles on the order of minutes. But the temperature of the pool is remarkably
constant over long periods, because it has a large thermal mass.

Consider the thermometer in a water bath that is stirred only by the convection of
the heater. The water near the thermometer will have a thermal mass that dwarfs
that of the little bit of silicone around the thermometer.

If the water bath was small, say only 100 times the mass of the thermometer, then you
might start having stability problems. But his microcontroller is not sampling the
thermometer all that fast anyway. There is plenty of time for the thermometer to warm
up between samples.


-----
Get a free science project every week! "http://scitoys.com/newsletter.html"




ByoWired

unread,
Jun 15, 2011, 1:45:31 PM6/15/11
to DIYbio


On Jun 15, 11:01 am, Simon Quellen Field <sfi...@scitoys.com> wrote:
> Actually, no.


I guess for a control system to keep water at its boiling point.

Simon Quellen Field

unread,
Jun 15, 2011, 8:44:48 PM6/15/11
to diy...@googlegroups.com
I am not clear on what your point was.
You don't need any control system to keep water boiling.
A kettle can do that.
Physics ensures that the water will be at the boiling point as
long as there is water.

The point I was making is that a thermometer coated in a bit of silicone
will still respond to temperature fast enough to keep the temperature of
any decent sized water bath constant.

The LM35 temperature sensor he is using is accurate to 0.5 degrees Celsius.
He is using a 650 watt heater (that's input watts, so we will have to guess at
how many actual watts get to the water, but to be conservative, let's say it is
100% efficient).
650 watt seconds is 155 calories. So he can change 310 milliliters of water
0.5 degrees Celsius in one second. That means that if he is sampling his
LM35 more than once a second, he is wasting computer cycles.

He didn't say what the capacity of the kettle was. When I Google for 650 watt
camping kettle, I get kettles of 7 to 12 quarts. But let's say his kettle was smaller
than that, say 2 liters. It will take 6.45 seconds to raise that much water by 0.5
degrees Celsius.

I claim that in that 6 seconds, the thermometer and the silicone will be at the
same temperature as the surrounding water. You would need a much better thermal
insulator than silicone to prevent that.

He is turning the heater element on for a second, and off for 1.2 seconds, as long
as the temperature is not where he wants it. In 2 seconds, the LM35 and silicone
are going to be within 0.5 degrees of one another.

Cathal -- another fail-safe you might add is an empty kettle detector, if the kettle
doesn't come with one. Either sample the resistance between a pair of wires at
the bottom of the pot, or use a second LM35 at the bottom and quit if it is above
boiling. You might be able to do it in software, however. If the temperature rises
faster than a half degree every second, then you have less than 155 milliliters of
water, and you should quit, since the egg is no longer submerged, and breakfast
is ruined.

It would be interesting to see a graph of the actual temperature over time, as the
kettle heats from room temperature to your 64 Celsius default target. Then we can
calculate the actual efficiency of the heat transfer.

-----
Get a free science project every week! "http://scitoys.com/newsletter.html"





--

Simon Quellen Field

unread,
Jun 15, 2011, 9:21:05 PM6/15/11
to diy...@googlegroups.com
I forgot to account for the 1.2 seconds of off time.
So the 650 watt kettle is only on for 1 second out of every 2.2 seconds:

That's 71 calories:

So it will take 14 seconds to see a 0.5 degree change in 2 liters of water.
That's half an hour to bring 2 liters of room temperature water to a boil at sea level.
The kettle alone would take 7.5 minutes to boil 2 liters.
Cathal -- can you time how long it takes to boil 2 liters, and see how far off I am?

Being the kind of guy who does experiments, I just filled my wife's 1500 watt
electric kettle to its full 1.7 liters, and times how long it took to come to a boil.
The water started out at 22 Celsius, so there was a 78 degree temperature
difference. It took 373 seconds to boil 1.7 liters.

Raising 1700 milliliters 78 degrees is 132,600 calories.
132,600 calories in 373 seconds is 1487 watts:

It appears the kettle is very efficient at boiling water.


-----
Get a free science project every week! "http://scitoys.com/newsletter.html"




ByoWired

unread,
Jun 15, 2011, 11:59:28 PM6/15/11
to DIYbio


On Jun 15, 8:44 pm, Simon Quellen Field <sfi...@scitoys.com> wrote:
>...
> You don't need any control system to keep water boiling....

Sorry for such a cryptic statement. You are quite correct about the
simplicity of temperature control during the boiling of water. Which
is why it would be good to test this device at lower temperatures. I
think the original test kept the kettle controlled at 95 C. If
boiling water is your goal, then that goal appears to have been met.
But if this is meant to be some kind of scientific device, I'm just
guessing it might be good to test it at other temperatures and get
some idea of its dynamic response. If control systems are not
designed properly, they can go into oscillations that render them
useless. Whether or not the clay-covered sensor has an adequate time
constant is easy enough to test. It's important to not have
overshoots and so forth in a temperature bath because the whole
purpose of such a bath (usually) is to provide better than normal
temperature stability. However, if your goal is to poach an egg, well
then, bon appetit.

Cathal Garvey

unread,
Jun 16, 2011, 4:32:33 AM6/16/11
to diy...@googlegroups.com
The volume of the kettle is only 0.5L, so it heats a bit faster than a larger kettle of the same wattage might. As Simon suggests though, the timing of heat/rest can be tuned to slow down the heating duty cycle if you're worried about precision; the parameters provided are there to allow fine-tuning if needed.

I didn't just test this at 95C. I tested it at a range of temperatures from 50C to 95C; the 95C tests were more rigorous because I wanted to use it to demonstrate water-bath PCR, and because I wanted to test the failsafes, but I also tested it at 64C for egg-making.

If you like data, it outputs CSV, and you can draw some lovely graphs showing the sensor reading variance versus the target temperature; even if the temperature is lagging behind the water bath you'd expect the sensor to read the peak temperatures if it was overshooting or oscillating a lot, but it doesn't vary that much. In fact, I didn't really push it to see how accurate it *could* get, because I was in a hurry preparing other things for the biohacking workshops.

As to choice of insulator, obviously it'd have been nicer to use something more thermally conductive. However, sugru was all I had to hand that was A) Waterproof, B) Temperature resistant and C) Electrically insulating. Using a specialised compound would be ideal, of course. Alternative methods of casing the sensor could also be used nicely I'm sure: insulate wires, add thermal grease to sensor head, encase in foil comes to mind as a quick route...but I wanted something tough and re-usable.

If it makes you feel better, I spent a long time making the layer of sugru at the sensor head as thin as possible! :)

Anyway.. it made me a peculiar, novel sous-vide egg which made it worthwhile even if it's not perfect. Also, I can use it for making better green-tea, which prefers 80C water rather than boiling. I'd love to see a better implementation of it of course, because water baths are stupidly expensive for such a simple instrument; programmable kettles are the way to go for now I think.


--
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To post to this group, send email to diy...@googlegroups.com.
To unsubscribe from this group, send email to diybio+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/diybio?hl=en.

Simon Quellen Field

unread,
Jun 16, 2011, 11:08:21 AM6/16/11
to diy...@googlegroups.com
Excellent.
So now we have everything we need to do a simple experiment.

I claim that wrapping the sensor in a wad of bubble gum won't make a bit
of difference. You are already more than an order of magnitude over-engineered
for the resolution of your controls.

So cook another egg, and collect the CSV data.
You might want to do a few of them, so we can see what the variance is.
Of course, the egg is not required. ;-)

Then put a few sticks of gum in your mouth and chew it until it is soft, and
wrap the sensor with the wad of gum, and run another series.

I predict the results will be statistically indistinguishable from the control series.

The heat capacity of the gum wad is not greater than that of the surrounding water.
In the 1.6 seconds it will take to raise the 500 ml of water by half a degree, the
wad of gum will also rise by half a degree.

This is not like measuring the temperature of something tiny, where the thermal
mass of the sensor is important. This is a half liter of water, which has a huge
heat capacity. It's being heated with a 650 watt heating element. The wad of
gum is way down in the noise.

However, if you would like to ensure that the water bath temperature is stable
at levels an order of magnitude greater than the sensor can measure, just add
water. Use the 12 quart pot, and you will find it difficult to locate a thermometer
that can measure the temperature difference from second to second, and even
more difficult to afford one.
;-)

-----
Get a free science project every week! "http://scitoys.com/newsletter.html"




Mac Cowell

unread,
Jun 16, 2011, 4:38:19 PM6/16/11
to diy...@googlegroups.com
So imagine you are just trying to precisely heat 50 ul (0.05g) of water; just a droplet.  Maybe in a PCR tube.  Perhaps with infrared light or with thermal conduction.  What approaches are available for determining the temperature of the sample?


231.313.9062 // @100ideas // iPhoned

Simon Quellen Field

unread,
Jun 16, 2011, 4:51:10 PM6/16/11
to diy...@googlegroups.com
I would put it into good thermal contact with a large thermal mass,
whose temperature I could control easily.

Cathal's water bath would do fine.

But if I really had to keep it small, or have several different temperatures
close to one another in a microfluidics chamber, I might use a platinum
wire, and run current through it while watching the voltage. Since the
resistance is a function of temperature, and can be calculated from the
voltage and the current, I would have what I needed -- a heater that can
measure itself.

Other approaches might be to embed a liquid crystal under the sample,
and watch the color change with temperature.

-----
Get a free science project every week! "http://scitoys.com/newsletter.html"




John Griessen

unread,
Jun 16, 2011, 4:55:14 PM6/16/11
to diy...@googlegroups.com
On 06/16/2011 03:38 PM, Mac Cowell wrote:
> So imagine you are just trying to precisely heat 50 ul (0.05g) of water; just a droplet. Maybe in a PCR tube. Perhaps with
> infrared light or with thermal conduction. What approaches are available for determining the temperature of the sample?

1. infer from container temperature.
1a. Forcing convection to happen by stirring agitating will help this approach.
2. integrate a sensor into your container.
2a Add cost to your disposable container since sensors use wires, connectors...try 1. again.
3. measure temperature by non-contact IR.
3a Face huge noise to signal ratio. Noise in container to container
variation, 1/F noise, small end of the signal range noise floor. Try 1 again.

ByoWired

unread,
Jun 16, 2011, 4:56:31 PM6/16/11
to DIYbio


On Jun 16, 11:08 am, Simon Quellen Field <sfi...@scitoys.com> wrote:
> ....
>
> The heat capacity of the gum wad is not greater than that of the surrounding
> water....This is a half liter of water, which has a
> huge
> heat capacity....The wad of
> gum is way down in the noise.
>

It's important to distinguish the difference between heat capacity and
thermal conductivity.
Air has very low heat capacity, so why doesn't it heat up really,
really fast? It's because air has horrible thermal conductivity.
Imagine a temperature sensor surrounded by air. The air around it
would have virtually no heat capacity, so why doesn't it respond
immediately to changes in temperature outside of it? It's because the
air can't conduct heat very well.

It's also important to distinguish the difference between heat and
temperature. People confuse the two concepts all the time.
You walk into a room that has been at 5 C all day. You touch a piece
of steel and then you touch a blanket. Why does the steel feel colder
even though you know it must be at 5 C just like the blanket? It's
because the steel can transfer heat much faster than the blanket.

Generally speaking, when you build a control system, you don't want to
bundle your sensor in a blanket.

ByoWired

unread,
Jun 16, 2011, 4:59:10 PM6/16/11
to DIYbio


On Jun 16, 4:38 pm, Mac Cowell <m...@diybio.org> wrote:
> So imagine you are just trying to precisely heat 50 ul (0.05g) of water; just a droplet.  Maybe in a PCR tube.  Perhaps with infrared light or with thermal conduction.  What approaches are available for >determining the temperature of the sample?

A cheap approach would be to rely on a large thermal mass, such as a
well-controlled thermal bath, or block of metal, something with a
large thermal capacity. You keep the thermal mass accurately
controlled at the temperature you want, then insert your PCR tube, or
whatever, into that thermal mass.

Cathal Garvey

unread,
Jun 16, 2011, 5:03:13 PM6/16/11
to diy...@googlegroups.com

You could potentially also use optical measurement of pH with a colour-changing dye if you have a buffer like Tris in your sample. The..er..isoelectric point, I think, of tris changes with temperature and will affect the pH and therefore the colour of the indicator dye. That was a suggestion offered by someone for verifying that the OpenPCR generated the same temperature within the samples as estimated by an embedded sensor. Because sticking an LM35 into a PCR tube would definitely have screwed up the thermal characteristics, a pH based approach made more sense.


>>>> diybio+un...@googlegroups.com.
>>>> For more options, visit this group at
>>>> <http://groups.google.com/group/diybio?hl=en>

>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "DIYbio" group.
>>> To post to this group, send email to <diy...@googlegroups.com>
>>> diy...@googlegroups.com.
>>> To unsubscribe from this group, send email to

>>> diybio+un...@googlegroups.com.
>>> For more options, visit this group at
>>> <http://groups.google.com/group/diybio?hl=en>
>>> http://groups.google.com/group/diybio?hl=en.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "DIYbio" group.
>> To post to this group, send email to diy...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> diybio+un...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/diybio?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "DIYbio" group.
>> To post to this group, send email to diy...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> diybio+un...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/diybio?hl=en.
>>
>

Andrew Barney

unread,
Jul 19, 2011, 6:35:15 PM7/19/11
to diy...@googlegroups.com
I had an idea today. What about replacing the water with mineral oil
and putting a fan to circulate the oil to keep it at an even
temperature? Mineral oil shouldn't conduct electricity, so I'm
thinking by using the fan to circulate it around, it could help keep
things at a stable temperature.

-Andrew

> >>> On 16 June 2011 04:59, ByoWired < <byowi...@gmail.com>byowi...@gmail.com

Cory Tobin

unread,
Jul 19, 2011, 6:48:23 PM7/19/11
to diy...@googlegroups.com
> I had an idea today. What about replacing the water with mineral oil
> and putting a fan to circulate the oil to keep it at an even
> temperature? Mineral oil shouldn't conduct electricity, so I'm
> thinking by using the fan to circulate it around, it could help keep
> things at a stable temperature.

All my stuff would then be covered in oil :[


-cory

shopade adebayo

unread,
Apr 2, 2014, 8:21:20 PM4/2/14
to diy...@googlegroups.com, cathal...@gmail.com
the circuit diagram is not posted. can i have the circuit diagram cos am finding it difficult to get the actual circuit diagram. thanks

Avery louie

unread,
Apr 7, 2014, 9:50:14 AM4/7/14
to diy...@googlegroups.com

It looks like the kettle is hooked to the digital side of the relay on pin 13.  The "hot" side of the relay is hooked up so that I can break or make the circuit to turn on the water heater.  Check out this diagram or do some go ogling to figure out how relays work:

http://tequals0.files.wordpress.com/2014/04/sketch7105850.jpg

--
-- You received this message because you are subscribed to the Google Groups DIYbio group. To post to this group, send email to diy...@googlegroups.com. To unsubscribe from this group, send email to diybio+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diybio+un...@googlegroups.com.

To post to this group, send email to diy...@googlegroups.com.

Luis Zaman

unread,
Apr 7, 2014, 8:50:38 PM4/7/14
to diy...@googlegroups.com, cathal...@gmail.com
I have a slightly different waterbath I built for my experiments in the lab. I needed to have rapid cooling in addition to rapid heating. This may help some!


Luis

Avery louie

unread,
Apr 7, 2014, 8:53:50 PM4/7/14
to diy...@googlegroups.com
nice blog!  I will add it to the list of diybio blogs on my blog.  We can have a webring...if you remember what those are.

--A


--
-- You received this message because you are subscribed to the Google Groups DIYbio group. To post to this group, send email to diy...@googlegroups.com. To unsubscribe from this group, send email to diybio+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diybio+un...@googlegroups.com.
To post to this group, send email to diy...@googlegroups.com.
Visit this group at http://groups.google.com/group/diybio.

Luis Zaman

unread,
Apr 7, 2014, 8:57:37 PM4/7/14
to diy...@googlegroups.com
For sure! Those are definitely at the limit of what I remember about the early internet days :). 


You received this message because you are subscribed to a topic in the Google Groups "DIYbio" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/diybio/NP6gMhCNt_E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to diybio+un...@googlegroups.com.

To post to this group, send email to diy...@googlegroups.com.
Visit this group at http://groups.google.com/group/diybio.

Dakota Hamill

unread,
Apr 7, 2014, 9:00:09 PM4/7/14
to diy...@googlegroups.com
I remember pasting a few crappy astronomy pictures of galaxies and
planets on a geocities site and thought I was the shit
> https://groups.google.com/d/msgid/diybio/CADNisWsxNZNA-zFhp3RzuW%3D0vNJmw5P7%3DhGo8enf3n%3DmscbA7A%40mail.gmail.com.

Cathal Garvey

unread,
Apr 8, 2014, 5:03:18 AM4/8/14
to diy...@googlegroups.com
All in favour of a webring. At the least we should be more diligent to
host explicit links sections. Anyone know their way around HTML "rel"
elements etc, so we can meta-up our links and rings? I'm conscious of
assisting newer, less evil search engines where possible. :)

On 08/04/14 01:50, Luis Zaman wrote:
> I have a slightly different waterbath I built for my experiments in the
> lab. I needed to have rapid cooling in addition to rapid heating. This may
> help some!
>
> http://blog.labfab.cc/?p=47
>
> Luis
>
>
> On Sunday, June 12, 2011 9:33:42 AM UTC-4, Cathal Garvey wrote:
>>
>> Hey all,
>> I made some code to control a water bath, and it's working pretty nicely
>> with a small camping kettle I have here.
>> Ingredients: Arduino, LM35dz (Temperature sensor), SMT 2000/4 (Solid State
>> Relay), 650W camping Kettle.
>>
>> I've attached pictures to show my setup, and a sample graph of
>> temperatures I've set and reached.
>> Yes, I'm cooking an egg sous-vide to test it out in that picture. I'll let
>> you know how it goes, I'm waiting for 2700 seconds on the serial monitor
>> 'til it's done, according to this article<http://www.edinformatics.com/math_science/science_of_cooking/eggs_sous_vide.htm>(45 mins at 64C).
>> Here's the code:
>> //======Begin Code Dump======
>> /* Kettle Water Bath
>> By Cathal Garvey, @onetruecathal, cathal...@gmail.com <javascript:>
--
T: @onetruecathal, @IndieBBDNA
P: +353876363185
W: http://indiebiotech.com
0x988B9099.asc
signature.asc
Reply all
Reply to author
Forward
0 new messages