Go Down

Topic: Peltier Reliability issues (Read 12183 times) previous topic - next topic

TomGeorge

Hi, yes basically what you need to do is.

Start
Check temperature.
if lower than set point then increase PWM a little amount
if equals set point plus or minus hysteresis value do not adjust PWM.
if higher than set point then decrease PWM a little amount.
loop back to start.

This is a crude representation of how to control the PWM.
You can use PID, control there is a PID library  that will help and may be needed to get the accuracy you require.

How much experience have you had with electronics, c++, programming and hardware?

Tom...... :)
Everything runs on smoke, let the smoke out, it stops running....

mauried

You really should have a low pass filter between the H bridge and the Peltier,so the current flow through the peltier is constant, otherwise at PWM values less than 100%, the heat dissipation in the peltier will be higher than needed,and its efficiency reduced.
The heat pumping capacity of a peltier is proportional to the current flow and inversly proportional to the heat differance between the hot and cold sides, but the power dissipation in the peltier is proportional to the square of the current.

dlloyd

#47
Nov 05, 2014, 04:10 am Last Edit: Nov 05, 2014, 04:12 am by dlloyd
I agree with mauried. I don't see a filter on your PWM and I'm quite sure this is your main problem. You'll need to convert the signal to DC with preferably <10% ripple. I've read a few research papers and most everything points to either using very low pwm frequency (10-100Hz) or filtering the pwm signal. This paper here, coincidentally, has 980Hz pwm and gives the design specs for their filter. Please read...

Temperature Control using Peltier Element by PWM Method

Also note that as you progress with your project, you may find it beneficial to use the 16-bit PWM capabilities of the DUE. This will take a bit of register level programming, but it works great.

mdbonneaux

Also note that as you progress with your project, you may find it beneficial to use the 16-bit PWM capabilities of the DUE. This will take a bit of register level programming, but it works great.
The Due is, sadly, limited to 12-bit for read and write.

I'm going to look into getting a filter for this setup but in the meantime I'm going to start working on the calibration (or getting the software for it functional at least).

@Tom- technically this is still my first major arduino project but... I've been on this off and on since april and it's gone through many many versions: started off getting an LED brightness controlled with buttons, moved up to integrating the hbridge and controlling the speed on a small motor, tinkering with the peltier, integrating a touch screen from 4D Systems to control things, moving back to a serial connection for communication with and control of the system, and now I'm here.  Over the span of the project I've also rebuilt an rc car with a Uno and RF receiver and one or two other things.  I'm not so great with c++ on the desktop, but I think I can manage with arduino lol.

Time to go start writing if/thens and/or switch cases and get this going.

(PS- I'll check out the heatsink compound once I get the software going again.  It's still definitely on the list.)



Guys, thank you for your patience with me.  Truly.  I know I need to stop skimming as much as I do when reading (I do it with everything- forums, text books, fiction, etc).  It's caused me a bit of frustration in this thread and I know it's done the same to you guys.  It's something I'm working on.

dlloyd

#49
Nov 05, 2014, 05:58 pm Last Edit: Nov 05, 2014, 06:13 pm by dlloyd
Quote
The Due is, sadly, limited to 12-bit for read and write.
It's only analogWriteResolution() that's limited to 12-bit. However, the DUE will very happily do 16-bit PWM if you tell it to. You never know, it might be handy to control the PWM's duty cycle with 65,535 different settings.

39.7.38 PWM Channel Duty Cycle Register
Only the first 16 bits (channel counter size) are significant.

mdbonneaux

It's only analogWriteResolution() that's limited to 12-bit. However, the DUE will very happily do 16-bit PWM if you tell it to. You never know, it might be handy to control the PWM's duty cycle with 65,535 different settings.

39.7.38 PWM Channel Duty Cycle Register
Only the first 16 bits (channel counter size) are significant.

I... the only 2 ways I'm familiar with for doing PWM on an arduino is either analogWrite or manually writing in a digitalWrite at a super-high rate. I'm going to have to look this up.

dlloyd

From another project of mine, I've reduced the code to a small sketch that will set up and use the hardware complementary PWM feature of the Due.

Here, you can use up to 4 channels, each with an inverted output and dead-time control.

The PWM frequency on each channel is 1281 Hz, each with 16-bit duty cycle control.

Code: [Select]
//declare variables
 unsigned short duty0 = 15000;
 unsigned short duty1 = 30000;
 unsigned short duty2 = 45000;
 unsigned short duty3 = 60000;

void setup() {
  pwmc_setup();
}

void loop() {
 pwmc_duty(duty0, duty1, duty2, duty3);
}

void pwmc_setup()
{
  //Configure PWM channels 0,1,2,3 (PWML0,PWMH0,PWML1,PWMH1,PWML2,PWMH2,PWML3,PWMH3), (port C.2,C.3,C.4,C.5,C.6,C.7,C.8,C.9), (pins P34,P35,P36,P37,P38,P39,P40,P41)
  REG_PIOC_PDR = 0x3FC;  //B1111111100, PIO Disable Register
  REG_PIOC_ABSR = REG_PIOC_ABSR | 0x3FCu; //B1111111100, Peripheral AB Select Register

  REG_PMC_PCER1 = REG_PMC_PCER1 | 16; //Peripheral Clock Enable Register 1 (activate clock for PWM, id36, bit5 of PMC_PCSR1)
  REG_PWM_ENA = REG_PWM_SR | B1111; //PWM Enable Register | PWM Status Register (activate channels 0,1,2,3)

  REG_PWM_CMR0 = 0x10000; //Channe0 Mode Register: Dead Time Enable DTE=1
  REG_PWM_CMR1 = 0x10000; //Channe1 Mode Register: Dead Time Enable DTE=1
  REG_PWM_CMR2 = 0x10000; //Channe2 Mode Register: Dead Time Enable DTE=1
  REG_PWM_CMR3 = 0x10000; //Channe3 Mode Register: Dead Time Enable DTE=1

  REG_PWM_DT0 = 0xA800A8; //Channe0 Dead Time Register (168=2us for outputs PWML0,PWMH0)
  REG_PWM_DT1 = 0xA800A8; //Channe1 Dead Time Register (168=2us for outputs PWML1,PWMH1)
  REG_PWM_DT2 = 0xA800A8; //Channe2 Dead Time Register (168=2us for outputs PWML2,PWMH2)
  REG_PWM_DT3 = 0xA800A8; //Channe3 Dead Time Register (168=2us for outputs PWML3,PWMH3)

  REG_PWM_CPRD0 = 65535; //Channe0 Period Register (84mhz/65535=1.281khz=780.64us period)
  REG_PWM_CPRD1 = 65535; //Channe1 Period Register (84mhz/65535=1.281khz=780.64us period)
  REG_PWM_CPRD2 = 65535; //Channe2 Period Register (84mhz/65535=1.281khz=780.64us period)
  REG_PWM_CPRD3 = 65535; //Channe3 Period Register (84mhz/65535=1.281khz=780.64us period)
}

//Set the PWM duty-cycle
inline void pwmc_duty(unsigned short duty0, unsigned short duty1, unsigned short duty2, unsigned short duty3) {
  REG_PWM_CDTY0 = duty0;
  REG_PWM_CDTY1 = duty1;
  REG_PWM_CDTY2 = duty2;
  REG_PWM_CDTY3 = duty3;
}

LaserLance

#52
Nov 06, 2014, 05:01 am Last Edit: Nov 06, 2014, 05:06 am by LaserLance
The thermal compound is only meant to fill the tiny gaps between the heat sink and the TE element. Air conducts heat poorly, and there is air in the tiny gaps between the two surfaces so a thermal compound is used to fill these tiny gaps for better thermal conduction. You want as close to metal-to-metal contact as possible, so use the very bare minimum of thermal compound.

Instead of changing the frequency of the PWM signal, I would suggest changing the pulse width instead. I also recommend a frequency of 200KHz. Why? Because it's a high enough frequency that the filter components that you will need to use to get a current ripple of less than 3% will be smaller. Why 3%? Because a current ripple above 3% degrades the cooling efficiency.

I have attached a great document by Laird Technologies which gives a wealth of information about the nuances of TE module system design. Please pay special attention to how they recommend to attach the heat sink to the TE module, including the specific torque requirements of the screws you're using to hold the system together. You are using screws, right?

In addition to the attached document, the paper at the following link will give you a wealth of information on how to control a TE cooler with a PWM signal and it gives some schematic suggestions on how to go about this. You mentioned that you're looking for about 0.1°C accuracy and they've done that in this paper. http://www.maximintegrated.com/en/app-notes/index.mvp/id/1757

Laser-Lance

EDIT: I couldn't attach the document, so it's here: http://www.digikey.com/Web%20Export/Supplier%20Content/Laird_776/PDF/Laird_Thermal_Handbook_0110.pdf?redirected=1

Grumpy_Mike

If you have a gap to bridge thermally then use gap filling pads like this one:-
http://www.directindustry.com/prod/getelec/thermally-conductive-gap-fillers-12542-336278.html

They come in a variate of thicknesses and are very good. I used them in a set top box I designed once and they became standard thought the company.

Go Up