100Khz PWM signal

I'm trying to control the temperature of two TEC coolers (peltier cells) using an arduino. I was planning on a Nano but I'll go with whatever can fulfill my needs.

I am basing my circuit on the one mentioned in the response here. According to the poster I would need a PWM signal at around 100Khz to control the MOSFET. At this point I don't plan on using the second phase shifted signal they mention.

As far as I know arduinos don't support PWM at that high of a frequency normally, but I have seen mentions of it being possible. I am looking for the easiest way to program this, with control over the duty cycle as well.

On a side note could someone confirm that this MOSFET would be able to control at least 12v 4A when the arduino's 5V logic is used to control the gate?

Please let me know if I need to supply any additional information or if this isn't the correct place to post.

Such high frequency PWM may be useful with motors or solenoids, but are not required for Peltier elements.

The MOSFET looks good, supports up to 16A from a 5V signal.

Awesome thank you :smiley:

What frequency range would you recommend? I would still like to use the low pass filter they mentioned for whatever frequency I go with. I think I saw somewhere peltier cells don't perform well with more than 10% ripple.

The PWM frequency isn't that critical. The temperature can't change that fast! :wink:

Sometimes a frequency above the audio range is used in case something vibrates or in case electrical noise gets-into a nearby audio system.

PWM is rarely used with heating/cooling. i.e. Your heater comes-on "full blast" when the temperature is below target and then it goes off when the temperature is above target. Your refrigerator and air conditioning also switch on & off.

...A "special kind" of PWM is used internally with switching (aka "switchmode") power supplies (for regular constant-voltage supplies as well as constant-current power supplies that are used for high-power LEDs and maybe used with Peltier devices). But, the voltage & current coming out of a switching power supply is regular-old DC.

Switching power supplies have a transformer (and sometimes inductors) and those can be made smaller/lighter/cheaper for when the switching frequency is higher.

DVDdoug:
The PWM frequency isn't that critical. The temperature can't change that fast! :wink:

PWM is rarely used with heating/cooling. i.e. Your heater comes-on "full blast" when the temperature is below target and then it goes off when the temperature is above target. Your refrigerator and air conditioning also switch on & off.

The issue is with peltier cells it does change that fast. Within maybe 30 seconds the surface of my peltier cell will go from 19C to -34C; you can watch a droplet of water freeze when placed on top of it. Then as soon as you turn the power off, watch it turn back to liquid in the same amount of time. This is because when peltier cells are turned off they send the heat they produce as well as what they removed right back to the "cold side". With a lower frequency PWM you might not notice the difference, but you are still wasting power trying to fight this effect.

So ideally instead of turning it off, you would want to keep it on but lower the duty cycle of the PWM. You also want to filter the signal, so the peltier sees more of a constant signal, rather than just the raw PWM where it would still technically be being turned off and on.

TECvest60:
This is because when peltier cells are turned off they send the heat they produce as well as what they removed right back to the "cold side". With a lower frequency PWM you might not notice the difference, but you are still wasting power trying to fight this effect.

Sorry, but that is bad physics. What must happen when it is turned off, is that the residual heat is transmitted from the hot side to the cold side until it reaches thermal equilibrium. There is no way you can "waste power" this way.

within maybe 30 seconds the surface of my peltier cell will go from 19C to -34C; you can watch a droplet of water freeze when placed on top of it. Then as soon as you turn the power off, watch it turn back to liquid in the same amount of time.

Peltier cells are excellent heat conductors. That is all there is to the above observation. It has nothing to do with "wasting energy".

Filtering the power supply can improve the efficiency of Peltier devices, but that is for a completely different reason.

Sorry what I mean is I will waste more power trying to cool something, when the heat I already removed along with what the peltier produces returns to the cold side and starts warming it up.

As far as I understand PWM is the simplest way to control the temperature of the peltier without completly turning it off, and letting the cold side warm back up. When powered peltier cells prefer a constant DC signal with less than 10% ripple. This is easier to achieve from a PWM signal with a higher frequency and a filter.

I would just like to know a good frequency that an arduino can produce that can be easily smoothed out to less than 10% ripple even when using a low duty cycle, say 20%.

Filtering the PWM signal is a bad idea, it will result in much power loss in the driver. Unless adjustable switching voltage or currrent regulators are used, where coils (inductors) flatten the regulator output.

If somebody fears about ripple on the Peltier power line, he should not use PWM at all. But what could be done then to stabilize the temperature? The only remaining solution is turning the Peltier on and off as required, and this can be done by PWM so fast that the Peltier does not undergo possibly disruptive temperature cycles. What's 30 seconds for a temperature difference of 53°C, if the standard Arduino PWM switches at 480 or 960 Hz?

Eventually a resistor can be used in parallel to the switching MOSFET, that reduces the heat reflow when the MOSFET is off.

And as with all Peltier cooling applications: a big enough cooler and fan will reduce the temperature difference by more than 50%. Remember that a temperature drop of 50° at the cold side will increase the temperature of the hot side by 50°, plus the heat produced by the electric power flowing through the Peltier.

This can give you a 100kHz PWM on an Uno with a reasonable degree of adjustment.

const byte pinOC2B = 3;     //port D3 -> pin 3

//100kHz = 10uS
//10uS / 62.5nS = 160
#define TOP     160

void setup( void )
{
    pinMode( pinOC2B, OUTPUT );
    
    //timer 2
    // mode 7, PRE=1
    TCCR2A = (1<<COM2B1) | (1<<WGM21) | (1<<WGM20);
    TCCR2B = (1<<WGM22) | (1<<CS20);
    OCR2A = TOP-1;
    OCR2B = 40;
    
}//setup

void loop( void )
{
}//loop

Keep in mind that to drive a MOSFET at 100kHz is probably going to require a proper MOSFET driver between the Uno and the FET. This is because MOSFETs have internal capacitance that requires charge be delivered and drained each time it is switched. If you have a resistive drive you’re going to slow down the transfer of charge (i.e. slow down switching) which can result in the MOSFET running hot and the circuit not operating as expected.

Consider something like the Microchip MIC4422AYN to drive the FET.

Hi,
What are you planning to use the Peltier for, what application?

Have you looked at the specs for the Peltier Device.
Can you post a link to data/specs please.

How will you power the device and how will you limit the current to it?
You cannot just put a potential across it and expect it to work reliably.
These devices have max current levels and max temperature differential specifications so that you do not destroy them.

So part of your control will need to monitor these values.

Can you tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom... :slight_smile:

I'm using two TEC1-12704s as part of my capstone project. My project is a water cooled vest for a person to wear. Both sides will have water blocks attached. The cold side will have a water/alcohol mixture so it doesn't freeze and the mixture will be pumped through a vest to cool the wearer. The hot side loop will take the heat to a 240mm PC radiator.

I haven't been able to find a datasheet for my specific peltiers because I purchased them locally. When I search them up there are datasheets from multiple manufacturers with slight differences on voltage limits and current draws. I have tested them with a bench power supply at the 12v I plan to run them at, and initally they draw 4A each and then after they've been running for a while slowly drop down to around 3.2A.

For now I am planning on powering this with my bench power supply, and I will develop my own way to provide stable power to it outside of this project. My plan is to control the peltiers with an arduino with this MOSFET mentioned above using PWM by changing the duty cycle. I will vary the duty cycle based on the temperature set by the user, software limiting it so it cannot go beyond the abilities of the hardware. Both the hot and cold sides will have a DS18B20 temperature probe inserted into the liquid nearby the two peltiers (I know this will not give me exact temperatures for the peltiers themselves so I plan to be generous with the software limits).

I will be graduating from an electro-mech technician course at the end of this semester. While I have decent expirence with electronics, this is probably still the most complicated circuit I have designed myself. My programming expirence is mainly in java from highschool. As far as arduino, it's very new to me, I've been aware of it for a while but only started working with it in January for my instrumentation course. I haven't retained as much of the electrical knowledge from my course, since I was more interested in the mechanial; pretty sure I've thrown myself into the deep-end.

Your Peltier should have it's part number stamped on it. Just Google that part number.

Also be sure to use heat sink compound between the Peltier plate and your water cooled heat sinks. Be sure the heat sinks are as flat and smooth as possible so the heat-sink compound has less work to do!

How are you clamping the heat sinks to the Peltier surfaces?

Paul

The part number is TEC1-12704 like I said I've searched for them on google, I got several different results. On average they seem to be good for 15ish volts and a little over 4A and -50ish to 80ish degree celcius.

Already have a nice Noctua thermal compound and machined the water blocks perfectly smooth. I'm going to bolt the water blocks together with the peltiers in-between, making sure to provide equal mounting pressure across them (just like a PC CPU). I have machined out little pockets for the peltiers and their wires so they can't slide out.

Actually, the part number, TEC1-12704, states the voltage is 12 volts and the current is 4 amps. Very common devices. I suspect there is only one company in China that makes them. I suppose you have more than one to play with?

Looks like you have the mechanical structures ready to go!

Paul