Hi. I have 2 questions concerning Peltier temperature control.
There are two methods available for my project, to maintain a temp of -30C, +/- 0.1 (realistically, I will be happy with +/-0.5C
Sensor - TMP36 TO-92 located near cold site (-40 - 150) to avoid negative voltage - easier I guess (ladyada)
Which is the better method? (opinion)
PWM the heatsink cooling fan, which is easy, but how effective.
PWM the Peltier voltage - I have previously been advised against this, but I see others using it, providing the voltage is not cycled on/off.
What is being read by the analog pin connected to the temperature sensor?
voltage
a number 0 - 1023. I'm a little confused about this one. With digital pins it's HIGH and LOW. In this case I want to read a set point voltage of 0.2v (-30C) and maintain that by one of the PWM methods above.
to maintain a temp of -30C, +/- 0.1 (realistically, I will be happy with +/-0.5C
Reading through the analogPort has often one or 2 bits jitter so no to accurate.
The DS18B20 digital temp sensor is accurate to 0.5C between -10 and +85 , but its range goes from -55 to +125 . It can be read with 4 bits after the decimal point == stepsize 0.0625C (1/16 degree). Optionally do some calibrations and add an offset.
While I think of it. Can jitter be managed with a delay? The cooling system has a reasonable degree of inertia. Temp wont change significantly over .5 - 1 second.
PWM the heatsink cooling fan, which is easy, but how effective.
PWM the Peltier voltage - I have previously been advised against this, but I see others using it, providing the voltage is not cycled on/off.
Definitely control power to the Peltier, not the fan. Full power to the Peltier with insufficient cooling sounds like a good way to damage the Peltier. I've had good results with PWM control using a DS18B20 for temperature feedback (running continuously for several years now). If you are using a '328 (or '168) based Arduino, Timer 0 runs PWM on pins 5 & 6 at just under 1 KHz (the others are about 490 Hz) so I'd recommend using Timer 0 (or you can change the frequency of another timer).
While I think of it. Can jitter be managed with a delay? The cooling system has a reasonable degree of inertia. Temp wont change significantly over .5 - 1 second.
do multiple readings and average them, integer dividing by a power of 2 can be optimized by the compiler;
unsigned int sum = 0;
for (int i=0; i<32; i++) sum += analogRead(TEMPSENSORPIN);
sum /= 32;
using a float for sum might give additional precision, but float math is a performance (relative) expensive ...
Other trick is to use a running average (aka low pass) which can be coded like this:
temp = (temp * 7 + analogRead(TEMPSENSORPIN))/8;
as you state "Temp wont change significantly over .5 - 1 second." this might more useful as it follows temp changes 'slower'
Just give both methods a try (at room temp) to see their effects,
I have been reading about PWMing the TEC and it seems complex, except for hard banging which I understand is not the best treatment for a Peltier. I need to regulate the current to the TEC. In simple terms, I don't know where to start.
My current set up (to which the TEC control will be added) is supplied by a 12v 1.5 amp power supply, which also supplies the Arduino.
I need to add temperature sensing and current control for the TEC (12v, 68.5 watts, 8 amp, 68C DeltaT), which needs its own power supply - 12 V 8.5amp or 12 - 15v 12.5amp, and a breakout board for current control...
I don't know of the top of my head how to build a current regulator. Conceptually, resistance needs to change in response to temperature read by the Arduino... there needs to be a means of controlling resistance. The system is closed loop with temperature sensing as the variable.
How do I know how much current to supply to the Peltier for the desired effect? I imagine, it would work something like this. Supply maximum amps until temperature is reached and then regulate current about the set point temperature, read by Arduino, feeding back to current regulator.
geoland:
2. What is being read by the analog pin connected to the temperature sensor?
voltage
a number 0 - 1023. I'm a little confused about this one. With digital pins it's HIGH and LOW. In this case I want to read a set point voltage of 0.2v (-30C) and maintain that by one of the PWM methods above.
The reading you get from the analogRead() call is (1024 * input_voltage/reference_voltage). The default reference voltage is the 5v supply, but you can change it by connecting the AREF pin to a different reference (e.g. the 3.3v output) and calling analogReference() to say you have changed it.
Changing the analog reference from 5v to 3.3v will give you slighty better resolution, i.e. around 0.49 deg c resolution at 5v vs. 0.32 deg C resolution at 3.3v.
The reading you get from the analogRead() call is (1024 * input_voltage/reference_voltage). The default reference voltage is the 5v supply, but you can change it by connecting the AREF pin to a different reference (e.g. the 3.3v output) and calling analogReference() to say you have changed it.
Changing the analog reference from 5v to 3.3v will give you slighty better resolution, i.e. around 0.49 deg c resolution at 5v vs. 0.32 deg C resolution at 3.3v.
Thank you, that makes sense now. I intend using aRef 3.3v for better resolution.
With a bit more reading, I see that a current regulator is not the right terminology for increasing and decreasing current. I guess it needs to be a variable current limiter.
With a bit more reading, I see that a current regulator is not the right terminology for increasing and decreasing current. I guess it needs to be a variable current limiter.
That is the normal method that transistors driven by PWM commands use to control the load. A simple switching transistor is a current amplifying device after all.
Simple PWM control of a TEC: Use a logic level N-channel MOSFET as a low-side switch (ie, between the TEC and GND). A FET with low Rds(on) will minimize losses and reduce/eliminate the need for a heatsink. I haven't tried using the Arduino PID library (wrote my own code before this was available) but it will likely save you some effort in closing the loop.
Simple PWM control of a TEC: Use a logic level N-channel MOSFET as a low-side switch (ie, between the TEC and GND). A FET with low Rds(on) will minimize losses and reduce/eliminate the need for a heatsink
Thank you, that's mighty helpful. More reading comes up with these, which seem to be popular;
The IRL520 is a logic level FET but it's Rds(on) is way too high. The power dissipated by the FET would be over 17W at 8 amps - hard to keep that cool. The IRFZ44 is not a logic level FET as it's "on" resistance is spec'd at Vgs = 10V. Both of these appear to be pretty old devices. I'd look for something newer. For example, the IRLB8743 has a max Rds(on) of only 4.2 mOhms at Vgs=4.5V. FET power dissipation would be 0.288W at 8 amps - no heatsink needed. There are less expensive parts with acceptable specs if cost is a concern.
Wiring is: Arduino PWM pin to series current limiting resistor, resistor to FET gate; FET source to GND (in common with the Arduino GND); TEC- to FET drain; and TEC+ to 12V.
Note: The 68.5W spec for your TEC refers to it's heat pumping capability, generally at 0 degrees delta-T. It could also burn 96W (8A*12V from your specs) while pumping that heat. Your hot-side heatsinking would have to get rid of the sum of those two. The actual numbers may be different depending on your application; would also need to see the curves from the TEC spec.
They are not too easy to find and ship OS at a sensible price.
These are not too easy to find.
IRLIZ24N International Rectifier logic level N-channel FETs - 55 volt, 14 amp, with an Rds of 0.075 ohm at 5 volts Vgs, 0.060 ohm at 10 volts Vgs.
FDP8878 N-Channel MOSFET has been designed specifically to improve the overall efficiency of DC/DC converters using either synchronous or conventional switching PWM controllers. It has been optimized for low gate charge, low rDS(ON) and fast switching speed.
rDS(ON) = 15m?, VGS = 10V, ID = 40A
rDS(ON) = 19m?, VGS = 4.5V, ID = 36A
High performance trench technology for extremely low rDS(ON)
OK - can't tell where you are located or what price you need. I last bought the IRLB8743 through Avnet Express ($0.55 ea). Also available from Mouser ($1.41).
As well as checking that Rds(on) is quoted at logic level gate-source voltage (i.e. around 4.5v, not 10v), you need to check that it is quoted at at least the drain current that it will pass in your circuit (17A).
Unlike bipolar transistors, mosfets share current well when connected in parallel. So, if you have problems sourcing a mosfet with a very low Rds(on) at 17A current, you could use two or three mosfets with a higher Rds(on) at one half or one third the current.
Not really. At 4.5v Vgs they are only good up to 8A, and the Rds is rather high (75 milliohms max). You could use 3 in parallel, but they would still get quite hot.
I read the original requirement as 8A so one of those should be fine (~1W dissipation). My quick search shows it to be a little bit cheaper than the IRLB8743 so back to the OP: where are you located and what are your cost constraints? Would something like the STP60N3LH5 be easier/cheaper for you to source?
Back to your sensor question (since this is the Sensors forum 8)), you mentioned wanting at least +/- 0.5 deg C accuracy but the TMP36 appears to only be +/- 2 deg C. Is that going to fit your needs? The DS18B20 robtillaart mentioned earlier does spec +/- 0.5 deg C accuracy.