Controlling a Peltier with a Basic stamp microcontroller

Thread Starter

TsThorsell

Joined Aug 14, 2008
4
Hello everyone.
I'm planning out a small project in air conditioning which will need low temperature for dehumidification and high temperature for reheat. I'm set on using a peltier element to produce the two temperatures since the loads is small. However, I run into trouble on the control side, probably due to my very small experience in electronics since I am a buildings engineer, but this is my plan:

I think I will use a Basic stamp to be the brain of the system for two reasons, it is a relatively cheap solution with great flexibility and secondly I have always wanted to play around with a micro controller (Basic stamp seems like a good one to learn on).

I will attach the cold side of the peltier directly to a cooling fin and control the cold temperature directly by adjusting the power input into the peltier element. This is where I run into my first problem:

1. How do I go from the PWM signal created by the BASIC Stamp to be able to feed the peltier which operates from 0-15.4 volts DC and 0-15 amps?

To get the high temp I am planning to use a water block in between the hot side of the peltier and a huge fan driven heat sink. The idea here is that if I need heat then I circulate water through the water block to collect it and if I do not need that much heat then I circulate less water and more heat would have to be dissipated via the the heat sink. This leads to a similar problem as above:

2. Can any 12vdc pump motor be controlled by the PWM signal of the Stamp? If not what is needed between the out put of the Stamp and the pump motor?

I have searched high and low for the answer to the first question without any luck, I now rely on you.

Regards
Thomas
 

SgtWookie

Joined Jul 17, 2007
22,230
I'm set on using a peltier element to produce the two temperatures since the loads is small.
Peltier devices are great. What's the temperature differential rating between sides for your particular device? Usually it's somewhere around 30°F.

I think I will use a Basic stamp to be the brain of the system for two reasons, it is a relatively cheap solution with great flexibility and secondly I have always wanted to play around with a micro controller (Basic stamp seems like a good one to learn on).
They're actually rather expensive and slow, but they are very good for a beginner as the Basic language is relatively easy to learn. If you wish to have a stand-alone display such as an LCD, a BS2px24 would be a decent choice, although pricey at $90 USD. If you can settle for serial communication via the programming port to something like Windows Terminal, a lower-level BS2 could be used. The Board of Education is a pretty decent breadboard/programmer station. You might opt for the RS-232 version and use a USB to RS-232 converter rather than purchasing the USB version.

Microchip's PIC uC's are considerably faster, and orders of magnitude less expensive. The cost of programming them in a similar Basic to the Stamps is rather high initially, but the cost differential is completely made up by the time you implement your 4th uC project; the compiler and programmer are non-recurring costs, while the uC's themselves are recurring costs for each project.

A PICkit 2 Debugging kit which includes the PICkit 2 programmer, a development board with a 44-pin PIC16F887 uC and a couple of unpopulated boards, MPLAB development software, C programming language demos, Assembler/linker will cost $50 USD from Microchip Direct. A Basic Stamp 2compatible compiler costs $250 USD. The uC's themselves (PIC16F887, for example) cost less than $2/each when purchased in small quantities. There is a tremendous variety of PIC uC's available.

I will attach the cold side of the peltier directly to a cooling fin and control the cold temperature directly by adjusting the power input into the peltier element. This is where I run into my first problem:

1. How do I go from the PWM signal created by the BASIC Stamp to be able to feed the peltier which operates from 0-15.4 volts DC and 0-15 amps?
You could use an [edited] IRLZ44, which is a logic-level controlled enhanced N-channel power MOSFET, to control the ground side of the Peltier device. The MOSFET is rated for 49A. It is a good idea to use MOSFETs that are rated for much more current than the application demands. This reduces heat dissipation within the MOSFET itself; when a MOSFET gets hot, it increases in resistance, which will decrease it's efficiency. [Note: the IRFZ44 is a traditional power MOSFET which uses Vgs of 0 for off and 10 for on. The IRLZ44 is a logic-level MOSFET.]

To get the high temp I am planning to use a water block in between the hot side of the peltier and a huge fan driven heat sink. The idea here is that if I need heat then I circulate water through the water block to collect it and if I do not need that much heat then I circulate less water and more heat would have to be dissipated via the the heat sink.
You can control the temperature by varying the duration of the PWM.

You can actually reverse the hot/cold sides by reversing the polarity across the Peltier device. However, you do not want to rapidly change from hot to cold or vice versa, as this would place a great deal of thermal stress on the device, causing early failure.

This leads to a similar problem as above:

2. Can any 12vdc pump motor be controlled by the PWM signal of the Stamp? If not what is needed between the out put of the Stamp and the pump motor?
It depends upon the type of pump. If the motor in the pump is a brushed DC motor, then I would say yes.
 
Last edited:

Thread Starter

TsThorsell

Joined Aug 14, 2008
4
Wow, talk about quick response, I love it.

I would not mind getting another controller but I would like to get one that do not have to much of a learning threshold. Do you know of any particular one that come with an extensive tutorial or learning package like the books for the Basic stamp. What programmer/software is the best (easiest to use)?

I do realize from your answers that I was not clear. The peltier will be controlled against a set point temperature on the cold side. I will then use the hot side of the same peltier to extract needed heat. In my particular application I know that the amount of cooling is going to be larger than the amount of heating needed. I think that the proposed method is good to only extracting the needed amount of heating by the water and the rest have to be vented into the ambient air.

Thanks
Thomas
 

SgtWookie

Joined Jul 17, 2007
22,230
Wow, talk about quick response, I love it.
It's not always so quick. You just got lucky ;)

I would not mind getting another controller but I would like to get one that do not have to much of a learning threshold. Do you know of any particular one that come with an extensive tutorial or learning package like the books for the Basic stamp. What programmer/software is the best (easiest to use)?
You'll get as many opinions about that around here as you might get about religion or politics in a pub. ;) There are a number of proponents for a broad variety of vendors. I've heard Atmel's offerings are very good, inexpensive, there is plenty of support, and the compilers are free. I have not researched them myself.

If this is to be a one-off project, then a Basic Stamp would be a fairly low learning curve way to go, with a moderate start-up cost. (Board of Education, tokenizer, Stamp, etc.).

However, if you think you might develop multiple uC projects, or actually enter production with something, then a Basic Stamp would become prohibitively expensive due to the recurring costs of each Stamp purchased.

In your particular project, the relatively slow speed of the Stamp uC won't pose any problems, but it would be quite a hinderance for more sophisticated applications.

I do realize from your answers that I was not clear. The peltier will be controlled against a set point temperature on the cold side. I will then use the hot side of the same peltier to extract needed heat. In my particular application I know that the amount of cooling is going to be larger than the amount of heating needed. I think that the proposed method is good to only extracting the needed amount of heating by the water and the rest have to be vented into the ambient air.
Fair enough ;)
 

Thread Starter

TsThorsell

Joined Aug 14, 2008
4
Hello Again,

Thank you SgtWookie for directing me away from the Basic Stamp I'm now leaning towards using a AVR Butterfly board since it has almost all hardware I could wish for on board at a great price (AND I have found a great book on it).

I will use pwm signal to drive and control both a peltier and one or two pumps. SgtWookie suggested to use the IRFZ44 on the ground side but how do I hook it up? Could some kind soul provide me with a circuit diagram that would work? I might need to run the peltier in both directions hence cooling or heating. How would a circuit look for that?

Regards
Thomas
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, if you're going to run it in both directions, then you will need an H-bridge, which is considerably more complicated than a simple PWM circuit.

For maximum simplicity, you could use a VNH2SP30-E, which is an Automotive Fully Integrated H-Bridge Motor Driver. ST Microelectronics manufactures them; they are available at Mouser.com and other vendors. Individually, they are about $10.50, but are very easy to use for low-voltage (<40v) medium-current (<30A) motor control. They do require installation on a circuit board that has a custom layout for a heat sink. Since you are planning on a rather high duty cycle, you should opt for a larger area of the board being a heat sink to keep the temperature of the IC under control.

If you really don't need to reverse the direction of current through the Peltier device, you could stay with just the source voltage, the [edited] IRLZ44 and a current sense resistor of perhaps 0.1 to 0.5 Ohms.
[Note: the IRFZ44 is a traditional MOSFET which normally uses a Vgs of 0 for off and 10 for ON; the IRLZ44 is a logic-level MOSFET. Sorry for the error; I've typed IRFxxx for so long, it's hard to get used to typing IRLxxx]

Have a look at the attached schematic. The "ToAVR" will be a voltage level that can be read by an ADC on the AVR. Since I = E/R, and R is known, you can calculate the Peltier current from reading the voltage across Rsense.
 

Attachments

Last edited:

Thread Starter

TsThorsell

Joined Aug 14, 2008
4
Thank you so much SgtWookie I will go with the MOSFET design for now but I will certainly look into using the H-bridge. My problem is that I have no means to make that circuit board.

Regards
Thomas
 

Riverdan

Joined Jun 16, 2010
1
Thomas, I thank I am on the same track as you, only I want to turn a very well insulated room into a cooler between 33F and 47F. I found that after a while a basic stamp is limited. Here is where I am at: I bought a Pickit2 for $49.95, I using a 2x16 LCD $11.95, a PIC16F887 $4.50, MCP9700A sensor $0.34 The copy and paste code form this site: http://www.micro-examples.com/public/microex-navig/doc/086-mcp9700a-thermometer.html and their compiler. Program with PicKit2 “HEX” Like you I need to control, I think a wire wound resistor to fool the AC sensor PWM control W/MOSFET. What I have left is to set the Temp and control the Mosfet. The Pic16f887 does a Lot.
 

Nik

Joined May 20, 2006
55
I've used peltier-effect HPLC-column heater/coolers, which use current to match a fair-sized DC motor. For thermostatted heating and cooling, you're talking multiple-Amp H-bridge with appropriate PWM and heat-sinking.
 
Top