Using Arduino to Control Peltier elements, and read out temperatures

Dear all,

I am fairly new to electronics tinkering - but I am a natural scientist, and believe I can handle it. But I'd need some guidance.
What I want to do is to build a cooler (something like a mini-fridge), using two cooling mechanisms (Linde cooling, and cooling by electrothermal plates - also known as Peltier elements). More specifically, what I want to do is Arduino to control the cooling power of the device. I want to monitor the temperature in different parts of the fridge (at least 5 points - better ten) using some temperature sensor (would prefer type-K thermocouples, but thermistors also seem to work - but have no experience with them). I want to start with Peltier elements (and save the conversion to Linde machines later - they require handling some chemicals).
For the Peltier elements: they have a fairly large power consumption (around 100 to 200 Watts, depending on their size), and I would want to control several of them (because I really want to cool quickly!!! thats one of the main points of this! it is summer, mind You! :smiley: ).
Also, I want to record the data - such as temperature, power consumption of Peltiers, power control parameters of Arduino board to the Peltier elements etc - on an SD card for later read-out and evaluation.
Oh, and I want to control a status LED (there are color-changing LEDs available - that should be good enough... maybe a nice sounding buzzer). And probably some control buttons (e.g. one that starts the cooling program).

So, here are my questions:

  1. Would Arduino be able to handle all those tasks (measure 5 to 10 different temperatures, ideally simultaneously; control power of the Peltiers; measure power consumption of Peltiers)? or would I need a special version of Arduino (such as Arduino Mega)?
  2. Which components would I need? Any shield (add-on) boards required? I suppose I would need the SD car shield, at least, to do the recoding to
  3. What would You use to control the power of the Peltiers? A MOSFET? How to connect to to Arduino?

Any suggestions on this? I am looking forward to hear from You! Best regards,
Björn

  1. Make a list of all the IO you need to connect, that will tell you how many you need. Mega2560 may be overkill, maybe just a Uno and perfoard with a shift register & analog demux is all you need.
  2. Sure SD, or serial EEPROM and send the data out via serial to a PC when commanded, or ... Lots of options.
  3. MOSFET would be good, the lower the Rds the better (current thru the device x Rds at full on is the power it will dissipate). At digikey, search for N-channel Mosget, single FETs, in stock, then logic level, through hole. Will bring up a list of 13 pages. Sort by Rds, find one that is low Rds and that can handle your voltage source.
    Your V+ to peltier device to MOSFET drain pin, source pin to ground.
    Arduino can drive the gate pin thru a 100 ohm resistor, with a 1K to ground to ensure the MOSFET stays off while arduino boots up.

If you use the Maxim (formerly Dallas Semiconductor) DS18B20 thermometer devices you can hook many to a single pin and have them all store a reading at once. Then you can read out the values 3/4 of a second later. They can measure from -55 to +125°C. The only interface hardware needed is a 4.7k pull-up resistor.

john,
How'd you make out with the -65C weather balloon guys?
I'd search for the thread, but the forum search tool appears to have brains behind it whatsoever, shows hits in apparent random order, not very useful.

CrossRoads:
john,
How'd you make out with the -65C weather balloon guys?
I'd search for the thread, but the forum search tool appears to have brains behind it whatsoever, shows hits in apparent random order, not very useful.

They wanted -100°C! The T-type thermocouple should work with some signal conditioning and cold-junction compensation. Have not seen anything in that thread for a while and since the specifications were too vague I didn't contact them about it.

Hey, You two!

Thanks for all the detailled answers and good indications! I am still working on them - since I am kind of doing a head start here (novice in electronics).

There are, however, a few questions that came up and that I'd like to ask:

  1. In the description to Arduino Uno, I find that the board itself is not capable of handling analog outputs. I had to read about it a bit, and now I seem to understand that what the MOSFET does is simply a repeated switching on and off of the power (called pulse width modification, PWM) - is that right? I found this shield for Arduino, which seems to be able to handle what I want to do: Power Driver Shield Kit - DEV-10305 - SparkFun Electronics - what do You think about this? My Peltier elements have a power consumption of 65 Watts each (max . 13.3 V or 9 A). I have now determined that I want to have 5 of those. The MOSFET shield seems to fit for my project - but what do You think about it? And: any suggestions for a good power supply for this MOSFET board (power supply to the MOSFETs, which will need up to 325 Watts if all 5 Peltiers run with their max. power)?
  2. Regarding the temperature measurement, johnwasser, thanks for pointing me to the DS18B20 thermometers - they seem to be perfectly suited. I rethought my device design, and now plan on having 15 temperature measurement points. How could I connect those thermometers to Arduino? Arduino only has 14 Digital I/O pins, but I suspect that some of them will be used by the MOSFET shield. How could I connect those 15 digital thermometers, after the MOSFET and the SD card data logging shield? And any suggestions for a DEMUX device for this purpose?
  3. With the MOSFET shield connected to Arduino, would it still be possible to connect an additional SD card shield? I see that those shields kind of feed through the Digital and Analog I/O pins - so it seems that the shields can simply be stacked. But is there anything else to keep in mind? What stacking order? For the MOSFET shield, the description says that the MOSFETs will get hot... maybe it should be on the top?
  4. I am not fully sure about my plan with measuring the power consumption of the Peltier elements... But originally I wanted to include a real time current-voltage-data logging for each of them (since it is part of the project to record the power consumption of cooling devices). Any suggestions as to ho to connect them?
  5. I have figured that it would be important to also include a fan for each one of the Peltiers. How could they be connected? I want to control each fan individually (based on the temperature of each Peltier heat sink - which is one of the temperatures I want to monitor).

Thanks again for all the good indications!! I am preparing a shopping list... may send that around later!

Enjoy the holiday weekend!!
Björn

Not sure why you need analog out, that is not in your description - did something change?

  1. Looks like a nice shield. Plenty capable of 13V/9A control.
    Check surplus sites for large power supplies.
  2. May get hot - 9A * 0.047ohm = 425mW, not too bad.
  3. Can you monitor the voltage drop across the MOSFET? Than calculate current from there. Adding a shunt resistor in series to measure the drop is another option. 10mohm 1%.
    2, 5. Sounds like you're gonna need a lot of IO.

Saw this posted elsewhere, could solve #2.

http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=11&products_id=129

I'd just as soon build up a set of hardware with the needed components, and then not have to worry about if this shield played with that shield or whose pins were interfering with whatever ... But then, I am an EE 8)

The DS18B20 is a "1-wire" device. It only requires a single digital output line to interface with a virtually unlimited number of sensors.

Example: DS18B20 temperature sensing | Archived Forum

bbccdde:
My Peltier elements have a power consumption of 65 Watts each (max . 13.3 V or 9 A).

I'm a bit confused at the specifications. 13.3V * 9A = 119.7W, almost twice the stated power requirement. Could it be that the rating is done at a lower voltage and current? Maybe 13V at 5A? You may want to measure the current draw at the operating voltage before you build a design around those specifications.

Note that the current limit of a MOSFET assumes a good heatsink. The little MOSFETs on the extruder controller board of a Makerbot are rated for something like 12 amps. Since they have no heatsink on them they will go into thermal shutdown after a couple of minutes with a 3-amp load.

You can calculate the average power drawn by each Peltier by multiplying the full power draw by the PWM ratio (PWM_Value/255). Then multiply by time to get watt-seconds.

Do you need to control each Peltier separately or are you ganging them just to get faster cooling? If they all use the same PWM value you only need one massive MOSFET. :slight_smile:

Peltier devices for heating or cooling applications is a real current hog with terrible efficiency. You will not be happy with the battery weight Vs actual cooling and duration you will end up with.

Lefty

CrossRoads:
I'd search for the thread, but the forum search tool appears to have brains behind it whatsoever, shows hits in apparent random order, not very useful.

I just use Google, with the site: modifier:
your search terms site:arduino.cc
Limiting by year is often useful -- just stick 2010 (there was a thread last year) or whatever is appropriate in the search string. Here's an example.
johnwasser weather balloon site:arduino.cc (note I'm using the 'Elmer' interface dialect there).

johnwasser:
If you use the Maxim (formerly Dallas Semiconductor) DS18B20 thermometer devices you can hook many to a single pin and have them all store a reading at once. Then you can read out the values 3/4 of a second later. They can measure from -55 to +125°C. The only interface hardware needed is a 4.7k pull-up resistor.

You can read faster if you're at 9-bit resolution. IIRC, in some situations, if you're using parasite power, that can slow things down too. (Yes, I should be not lazy and look that up.)

void DallasTemperature::requestTemperatures(void)
{
  _wire->reset();
  _wire->skip();
  _wire->write(STARTCONVO, parasite);

  switch (conversionDelay)
  {
    case TEMP_9_BIT:
      delay(94);
      break;
    case TEMP_10_BIT:
      delay(188);
      break;
    case TEMP_11_BIT:
      delay(375);
      break;
    case TEMP_12_BIT:
    default:
      delay(750);
      break;
  }
}

Then there's the possibility of taking readings asynchronously.

Dear all,

wow - I'm impressed! The reply-turnaround time and quality in this forum is amazing! Thanks!

I have a lot of good input now - thanks all!
Johnwasser: The values I gave for the Peltiers are what the supplier (well, ebay reseller) named as the maximum voltages or currents... I believe that those are nominal values not to exceed. The elements should have a power draw of 64 Watts each.

Thanks for the suggestion to calculate the power consumption of the elements based on the PWM ratio; I think I will go with that, and additionally measured the power drawn by all Peltier elements (i.e., the power supplied via all MOSFETs to the Peltiers) using a shunt resistor. And compare the two. That should give me a good idea using two different approaches. I was a bit concerned that the Peltier elements do not immediately draw their full power when their are "switched on" (each time the pulse is switched on by the PWM) - since resistance etc. of electric elements typically depend on temperature (which changes in those Peltier elements). But I believe that the approach with the shunt would help solve that issue.
But the cooling aspect for the MOSFETs is certainly an important one. I will definitely think about adding cooling elements.

Thanks all again for the input! I will see to get this set up - and then probably post some pictures :smiley:

Oh - Lefty: You are right: Peltiers are horribly inefficient for cooling purposes! But they are easy to use and control - and I certainly will not try to replace my AC with them! :wink: (I think my first project will be to cool a can of soda - or other drink - as fat as possible...) Just a fun project. But I also want to try to build a Linde machine later (using the same control electronics).

Best regards to You all! And: enjoy the holiday weekend!!!
Björn

The values I gave for the Peltiers are what the supplier (well, ebay reseller) named as the maximum voltages or currents... I believe that those are nominal values not to exceed. The elements should have a power draw of 64 Watts each.

I suspect the 64W number is Qmax, the maximum heat pumping capability of the TEC. 13.3V and 9A are the maximum voltage and current ratings of the device. You really need the datasheet to determine the actual performance you'll get (sets of curves showing heat pumped for various temperature deltas). If you can't find the correct datasheet, you can guesstimate from a comparable device (e.g., from Marlow, Ferrotec, etc). Don't forget your hot-side heatsinks will have to dissipate both the heat pumped as well as the power consumed by the TEC. Cooling five of these will be interesting. We want photos!

If you will be controlling TEC power via PWM, you want the PWM frequency to be around 1KHz according to most manufacturers. IIRC, the default frequency for the Arduino PWM pins controlled by Timer0 are just under 1KHz; the others are a little less than half that. Current through your shunt resistor will be pulsing with PWM so you may want to add a low pass filter to more accurately measure it.

Just be aware that Peltier devices have a maximum temperate difference across them. If you exceed this then they start acting as a simple heater on both sides. Last time I looked think this was about 30c. It might make a difference to your application.

Grumpy_Mike:
Just be aware that Peltier devices have a maximum temperate difference across them. If you exceed this then they start acting as a simple heater on both sides. Last time I looked think this was about 30c. It might make a difference to your application.

Years ago when I was playing with my first Peltier device I wired it up to a stiff DC power supply and the 1" square device proceeded to unsolder itself into it's individual little parts. Burned my finger on it too. So it went into the trash and I haven't touched one sense. :wink:

Grumpy_Mike:
Just be aware that Peltier devices have a maximum temperate difference across them. If you exceed this then they start acting as a simple heater on both sides. Last time I looked think this was about 30c. It might make a difference to your application.

Yep - that happens when the hot-side heatsink is inadequate (or non-existent!). If you add power to the TEC, the hot-side gets hotter and the cool(er) side just goes up with it. You can actually get delta-Ts of 60-70c but only when pumping very little heat, eg, cooling a passive device in a very well insulated box. For a given TEC current, delta-T drops as the amount of heat being pumped increases. The datasheets provide the specifics.

One other point for the OP: Be sure to use sealed TECs when cooling below the dew point. Condensation will kill your TECs.