PWM control of two 150W devices depending on temperature, where to start?

Hi there,

I have just unpacked and played with my new Leonardo board and I think it's fantastic. I've been fiddling with programming and things, but never with Arduino, Leonardo in my case.

I purchased a kit containing mostly what I needed, but I'm still waiting for a few more parts to be delivered.

I'd like to build a water chiller using peltier/TEC devices. I want to use two TECs each 15.4V @ 10A which is 154W MAX. Two of them is over 300W. I don't need to run it all the time, but only enough according to liquid's temperature. Say the liquid's temperature range is 0-100°C and TECs max voltage is 15.4V or max current is 10A.

When writing code, which data should I use to control TEC's usage (Volts or Amps)? I'd like to use PWM signal for this. Something like: if liquid temp is 0°C then use 0% of TEC's power. If it's 50°C use 50% of power etc.

With regards to MOSFETS, what is the best way to do this? Do I connect a PWM pin to MOSFET's Gate pin? Also what MOSFET in terms of Volts and Amps should I get for thse 154W TECs? If I understand it correctly I would need two MOSFETs output current capaable of 10A at 15.4V?

I would appreciate all advises!

Thanks in advance!

Edit:

Ok, I've managed to get this done. Now I need to implement the idea to Peltiers.

http://youtu.be/RtIVdAp6XRU

I don't use many parts, but I believe some diodes etc could be added for safety.

http://forum.arduino.cc/index.php?topic=56263.0 http://forum.arduino.cc/index.php?topic=81969.0 http://forum.arduino.cc/index.php?topic=83921.0 http://forum.arduino.cc/index.php?topic=119948.0

Typically, you don't use PWM for heating & cooling. (The temperature doesn't change instantly, so there's no need to switch it on & off thousands of times per second.)

The normal set-up is a simple on-off feedback system - If the temperature is above zero degrees turn the cooling on, if the temperature is below zero degrees, turn the cooling off. In practice there is some hysteresis or "swing", so the cooling might turn off at zero, but won't turn-on 'till you hit 1 degree. You can adjust that range, depending on your requirements.

DVDdoug: Typically, you don't use PWM for heating & cooling. (The temperature doesn't change instantly, so there's no need to switch it on & off thousands of times per second.)

The normal set-up is a simple on-off feedback system - If the temperature is above zero degrees turn the cooling on, if the temperature is below zero degrees, turn the cooling off. In practice there is some hysteresis or "swing", so the cooling might turn off at zero, but won't turn-on 'till you hit 1 degree. You can adjust that range, depending on your requirements.

That's what I was thinking. I am replacing my existing liquid cooling loop, such as radiators to one big reservoir with one powerful pump, so yes, what you are saying should be sufficient to control peltiers. How about electricity usage. Can PWM help in this area?

I'd expect PWM (switching on and off 1000's of times a second) to cost more but ......

Mark

PWM control is unlikely to result in significant power savings for applications like this. I've heard but have not verified that PWM switching reduces the lifetime of Peltier devices, as well.

Peltier devices are not very efficient at heating or cooling, so if power consumption is a serious concern, they are probably not the way to go.

holmes4: I'd expect PWM (switching on and off 1000's of times a second) to cost more but ......

Me too. Each time the transistors pass through the linear region when switching on or off, they will dissipate a little bit of waste heat. The lower the frequency, the less waste.

Although, we're probably talking about 1¢ of electricity per month or something on that order.

Peltiers are more efficient at below maximum rated current. Therefore, except when you really need to run them at maximum power, it is better to run them only at whatever power is needed. This can be done using PWM in conjunction with a series inductor and flyback diode to smooth out the current. In order to keep the inductor size reasonable, this requires a high PWM frequency, which in turn means that the mosfet driving the Peltiers will need a proper mosfet gate driver to keep the switching losses low, and a low ESR decoupling capacitor to keep radiated interference low..

Since you are planning to use 2 Peltier devices, another (simpler) approach is to connect them in parallel when high power is needed, and in series when lower power is sufficient.

The power consumption is not a priority, but I always consider it.

I’d still like to use PWM to at least use say 5 different power levels, but also 2 or more different PWM signals, seperately for peltiers and ie water pump.

Attached is the Fritzing breadboard schematics and a jpg. I can’t really test it yet as I’m still waiting for the PSU.

I have two STP60NF10 MOSFETs (100V, 60A, PDF attached), 2 x TEC1-12710 (15.4V@10A) 40x40mm and 2 x TEC1-12712 (15.4V@12A) 50x50mm.

Until I get a bigger copper plate I’m going to use use 10A peltiers for now.

PWM control.fzz (17.7 KB)

P60NF10.pdf (277 KB)

I'd still like to use PWM to at least use say 5 different power levels, but also 2 or more different PWM signals, seperately for peltiers and ie water pump.

Get PWM via analogWrite() out of your head, at least for a short while. You and run the whatsits for a second , 10 seconds etc just by using the concepts shown in the "blink without delay" example! All analogWrite ()/ PWM does is take a pin high or low after a bit of time.

You

I'll have to manage somehow, but if you could look at the above diagram, could you tell me what am I missing to make this setup as stable as possible? I'd appreciate it greatly :)

Fritzing diagrams are confusing, extremely error prone and really, just for rank beginners. Please learn to draw a proper schematic. It will take 10 minutes to learn how to draw a schematic using LTSpice (free to download) and you get to simulate your circuit to boot!

zYxMa: I have two STP60NF10 MOSFETs (100V, 60A, PDF attached), 2 x TEC1-12710 (15.4V@10A) 40x40mm and 2 x TEC1-12712 (15.4V@12A) 50x50mm.

That MOSFET is not logic level so you cannot drive if from the Arduino directly.

Also your circuit has no gate resistors so you may be overloading the Arduino pin (MOSFETs have a large gate capacitance which means inrush current will be well above the abs max of 40mA with a gate resistor.

However if you're using fast PWM with high power then MOSFET driver chip is a really good idea.

My favorite is the MIC4422, but there are many others. It works from a 10 to 18V power supply and will drive non-logic level MOSFETs directly as fast as they can switch, but you must have lots of decoupling on the driver chip. Add a 2k2 resistor between the Arduino and the MOSFET driver so that if the MOSFET fails (which might take the driver with it), the Arduino has some protection from the 12V (or whatever) supply.

Also for high current load like that I'd personally choose a better MOSFET - high voltage MOSFETs have poorer ratings all else being equal, choose a 30V MOSFET with Rds(on) of under 10 milliohms I'd suggest (and logic level if not using a driver). With a moderate heatsink and proper gate driver your MOSFET will work though. About 2W dissipated at 10A.

2k2 resistor? Please could you be more specific? :frowning:

Will this heatsink do the job?

You have a couple of options:

  1. Use the mosfets you already have in conjunction with mosfet gate drivers, such as the MIC4422 already suggested or the MCP1407. You will need heatsinks on the mosfets, but they don't need to be vary large heatsinks. The heatsink in your picture is OK but much bigger than you need.

  2. Get some logic-level mosfets with low Rds(on) and drive them directly from the Arduino (a 100 ohm resistor in series with the gate is recommended). One possible mosfet is IRLU8726. No heatsink needed as long as you don't use them with fast PWM (if you do, then you also need gate driver chips).

dc42: Peltiers are more efficient at below maximum rated current. Therefore, except when you really need to run them at maximum power, it is better to run them only at whatever power is needed. This can be done using PWM in conjunction with a series inductor and flyback diode to smooth out the current. In order to keep the inductor size reasonable, this requires a high PWM frequency, which in turn means that the mosfet driving the Peltiers will need a proper mosfet gate driver to keep the switching losses low, and a low ESR decoupling capacitor to keep radiated interference low..

Since you are planning to use 2 Peltier devices, another (simpler) approach is to connect them in parallel when high power is needed, and in series when lower power is sufficient.

If in parallel, do you mean two MOSFETs or just one MOSFET and two Pelteirs connected in parallel to that MOSFET?

If I understand correctly, the PWM frequency can be changed like this? http://playground.arduino.cc/Main/TimerPWMCheatsheet

What is the better option for me? I am planning to use 12A peltiers later in future.

Also, did I connect both Peltiers correctly on my duagram?

I tested LEDs, LED strips and electric motor with my MOSFET and they worked fine, but you say I need more component for powerful Peltiers, correct?

If I don't use PWM, but only ON or OFF when required, would I still need MOSFET driver etc?

This is my very thirst arduino project tho, so I'm not really sure what I'm doing :)

Thank you all ;)

Sorry for this bump, but I would really appriciate if somebody could just confirm the above post?

Parallel connection of two peltiers.

Thanks again!

zYxMa:

dc42: Since you are planning to use 2 Peltier devices, another (simpler) approach is to connect them in parallel when high power is needed, and in series when lower power is sufficient.

If in parallel, do you mean two MOSFETs or just one MOSFET and two Pelteirs connected in parallel to that MOSFET?

I meant connect the Peltier devices in parallel to run them at high power, and in series to run them at low power. However, this is not easy to do unless you use relays.

zYxMa: If I understand correctly, the PWM frequency can be changed like this? http://playground.arduino.cc/Main/TimerPWMCheatsheet

Yes.

zYxMa: What is the better option for me? I am planning to use 12A peltiers later in future.

That depends on what you mean by "better". Easier? More efficient? More accurate?

zYxMa: Also, did I connect both Peltiers correctly on my duagram?

I don't have time to untangle a Fritzing diagram. You can't run 10A through a breadboard anyway. Draw a proper schematic - a hand-drawn one will do.

zYxMa: I tested LEDs, LED strips and electric motor with my MOSFET and they worked fine, but you say I need more component for powerful Peltiers, correct?

To pass 10A or 12A, you need at mosfets with lower Rds(on), otherwise you will be spending a lot of effort keeping them cool. If you want to PWM the mosfets, or you choose mosfets that don't take logic-level gate drive, then you need mosfet driver chips too.

dc42:

zYxMa:

dc42: Since you are planning to use 2 Peltier devices, another (simpler) approach is to connect them in parallel when high power is needed, and in series when lower power is sufficient.

If in parallel, do you mean two MOSFETs or just one MOSFET and two Pelteirs connected in parallel to that MOSFET?

I meant connect the Peltier devices in parallel to run them at high power, and in series to run them at low power. However, this is not easy to do unless you use relays.

zYxMa: If I understand correctly, the PWM frequency can be changed like this? http://playground.arduino.cc/Main/TimerPWMCheatsheet

Yes.

zYxMa: What is the better option for me? I am planning to use 12A peltiers later in future.

That depends on what you mean by "better". Easier? More efficient? More accurate?

zYxMa: Also, did I connect both Peltiers correctly on my duagram?

I don't have time to untangle a Fritzing diagram. You can't run 10A through a breadboard anyway. Draw a proper schematic - a hand-drawn one will do.

zYxMa: I tested LEDs, LED strips and electric motor with my MOSFET and they worked fine, but you say I need more component for powerful Peltiers, correct?

To pass 10A or 12A, you need at mosfets with lower Rds(on), otherwise you will be spending a lot of effort keeping them cool. If you want to PWM the mosfets, or you choose mosfets that don't take logic-level gate drive, then you need mosfet driver chips too.

I'm sorry, I didn't realise I uploaded the wrong diagram. I'll reupload a new diagram once I get back to my PC. I was going to wire all this on a pcb. MCP1407 should be delivered to me tomorrow so I'll try with my existing MOSFETs first. Will I need any resistor, diodes? My local store should have these things.

When I asked what is better for me I probably meant what is easier, but reliable at the same time.

Cheers.

zYxMa: MCP1407 should be delivered to me tomorrow so I'll try with my existing MOSFETs first. Will I need any resistor, diodes? My local store should have these things.

I suggest the following:

  • A good decoupling capacitor between the Vdd and Gnd terminals of the MCP1407. I suggest 1uF ceramic.
  • A 10K resistor between the MCP1407 input and ground. This is to ensure that the MCP1407 (and hence the mosfet) stays off until the Arduino output pin mode has been set.
  • A resistor between the MCP1407 output and the mosfet gate, to limit the peak gate current and control ringing if your layout is less than ideal. I suggest 10 ohms, perhaps less if/when you use fast PWM. If you have a singls MCP1407 driving 2 mosfets, use a separate resistor for each mosfet.

You should position the MCP1407 close to the mosfet(s), so that the wiring (in particular the wire between the mosfet source terminal and MCP1407 Gnd) is kept as short as reasonably possible.

zYxMa: When I asked what is better for me I probably meant what is easier, but reliable at the same time.

I suggest you start with simple on/off control then. You can upgrade to smoothed PWM later.