Difference between revisions of "TEC Driver"

From Black Metal Forest
Jump to: navigation, search
(Created page with "The finished 10 Amp H-bridge (TEC Driver) <div style="float:right;>__TOC__</div> The 10A...")
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[File:Hbridge.jpg|500px|link=https://photos.app.goo.gl/QxL8GSttC88cfcYi7|thumb|left|The finished 10 Amp H-bridge (TEC Driver)]]
 
[[File:Hbridge.jpg|500px|link=https://photos.app.goo.gl/QxL8GSttC88cfcYi7|thumb|left|The finished 10 Amp H-bridge (TEC Driver)]]
 
<div style="float:right;>__TOC__</div>
 
<div style="float:right;>__TOC__</div>
The 10A H-bridge was primary designed to drive TECs (Thermal Electric Coolers). The DAX Robot design contains a TEC refrigerator unit to cool food in it's drawer compartment. This board works by taking a DC input Voltage, and providing a variable bipolar constant voltage or constant current output. It uses a large filter to remove the ripple caused by PWM since TEC's are much less efficient when driven directly with PWM. This board can also drive DC motors and other loads.  
+
The TEC Driver is a 10A H-bridge with a LC Filter primary designed to drive TECs (Thermal Electric Coolers). The DAX Robot design contains a TEC refrigerator unit to cool food in it's drawer compartment. This board works by taking a DC input Voltage, and providing a variable bipolar constant voltage or constant current output. It uses a large filter to remove the ripple caused by PWM since TEC's are much less efficient when driven directly with PWM. This board can also drive DC motors and other loads.  
  
 
It's Features are:
 
It's Features are:
Line 41: Line 41:
  
 
The largest issue is that the TEC's are only able to reduce the temperature of the drawer about 23C compared to outside (see pink "Diff" trace). If it is a hot day outside, say 35C, then the TEC's will only be able to get the drawer compartment down to about 12C. Since delivering cold food on a hot day is not possible with this TEC refrigerator, it was decided to shelve this feature of the DAX project.
 
The largest issue is that the TEC's are only able to reduce the temperature of the drawer about 23C compared to outside (see pink "Diff" trace). If it is a hot day outside, say 35C, then the TEC's will only be able to get the drawer compartment down to about 12C. Since delivering cold food on a hot day is not possible with this TEC refrigerator, it was decided to shelve this feature of the DAX project.
 +
 +
==Design==
 +
At the heart of the TEC Driver is an [https://www.allegromicro.com/en/Products/Motor-Drivers/Brush-DC-Motor-Drivers/A4956 Allegro A4956]. The A4956 is a H-bridge MOSFET driver with Current Sense output and Current Limit. Control is done using logic Enable and Direction pin. An analog voltage input sets the current limit, such that, if (0.01Ohms * Amps) is more than the input voltage, then the output shuts off for a short amount of time. In English, 1.2V sets the limit to 12A.
 +
 +
 +
  
 
==Control Levels==
 
==Control Levels==
 
There are many what I call "control levels" that set PWM, or Constant Voltage, or Constant Current or more.
 
There are many what I call "control levels" that set PWM, or Constant Voltage, or Constant Current or more.
 +
Every control mode ends up with a PWM value set. The PWM is slope rate limited to avoid the LC filter overshoot.
 +
It's hard for me to decide the hierarchy of control, even now. For example, when I setting a constant current, should the have the CC setting control a constant voltage which in turn controls the Pulse Width? That is up to a more proficient PID loop programmer to decide.
 +
 +
The following are control modes that are possible with the TEC Driver
  
 
'''PWM''': Controls the Pules Width of the output and has a maximum slew rate to prevent the LC output filter from overshoot and ringing.
 
'''PWM''': Controls the Pules Width of the output and has a maximum slew rate to prevent the LC output filter from overshoot and ringing.
Line 51: Line 61:
 
'''Constant Voltage (Input)''': Reads the input voltage value (say 24.5V) and then in order to set 12V on the output, it sets the PWM to %48.9. This can be a better choice than CV(output) because complex capacitive and inductive loads will not effect the H-Bridge Control loop leading which could lead to catastrophic unstability. On the other hand, high currents on the output will cause the Output voltage to droop in this mode.  
 
'''Constant Voltage (Input)''': Reads the input voltage value (say 24.5V) and then in order to set 12V on the output, it sets the PWM to %48.9. This can be a better choice than CV(output) because complex capacitive and inductive loads will not effect the H-Bridge Control loop leading which could lead to catastrophic unstability. On the other hand, high currents on the output will cause the Output voltage to droop in this mode.  
  
Constant Value  This can be a PI Loop that takes any setpoint value IE. RPM, Temp, position, and tries to go to it.
+
'''Constant Current (Digital)''':The Current sense pin on the A4956 is read and the PWM is reduced or increesed in a PID loop.
 +
 
 +
'''Constant Current (Analog)''':The Current Limit is set with a analog voltage (usually from a DAC). in this
  
Constant Current Passive:    (CCP needs Load Resistance value given to it, then it djust does the math once and sets the voltage
+
'''Constant Value'''  This can be a PID Loop that take any set point value from any external sensor. Encoders, Techometer, Thermometer. Usually these sensors would be connected directly to the host micro-controller, but could also be connected to the two I2C ports on the output end of the PCB.
  
*PWM
+
'''Constant Current Passive:''' The
**Constant Voltage Passive   
+
***Constant Current Active
+
****Constant Value
+
***Constant Current Passive
+
****Constant Value
+
**Constant Voltage Active
+
****Constant Value
+
***Constant Current Active
+
****Constant Value
+
***Constant Current Passive
+

Revision as of 02:50, 16 January 2020

The finished 10 Amp H-bridge (TEC Driver)

The TEC Driver is a 10A H-bridge with a LC Filter primary designed to drive TECs (Thermal Electric Coolers). The DAX Robot design contains a TEC refrigerator unit to cool food in it's drawer compartment. This board works by taking a DC input Voltage, and providing a variable bipolar constant voltage or constant current output. It uses a large filter to remove the ripple caused by PWM since TEC's are much less efficient when driven directly with PWM. This board can also drive DC motors and other loads.

It's Features are:

  • 8-25V Input
  • 10A Bipolar Output (output can be positive or negative)
  • 10% max voltage ripple
  • Analog Current Limit (Voltage Controlled)
  • Output Current Sense
  • Input and output Voltage Sense
  • Onboard temperature sensor (PCT2075)
  • Connections for External I2C temperature sensors




Driving Thermoelectric Coolers

Performance graph of the CPM-2F TEC

Thermal Electric Coolers, other wise known as Peltier devices, require proper driving to get the most cooling potential out of them. The goal is to pump the most energy (watts) from one side to the other, without generating to much heat on the cold side from "IR losses".

First, a TEC pumps heat the fastest when the difference between the two sides is Zero. I found in my experiments how important it is to cool the hotside down to room temperature in order to keep the tempe difference low and pump them most energy. The speed in which the refrigerator cools the container and the minimum temperature the refrigerator reaches is heavily dependent on keeping the hotside as cold as you can. Eventually using large heat sinks and a lot of airflow, we achieved a hot side that was only 10C above ambient.

Secondly, keeping IR losses under control is also very important. Increasing TEC Drive current begins to have diminishing returns after IR losses generates more heat then is removed. It may appear from the performance graph of the CPM-2F that 6Amps will achieve the biggest temperature difference and therefore the coldest temperature. It turns out that although though the temperature difference is large, both sides are heated by the IR losses. For example: 6 Amps gets 10C Coldside and 85C Hotside, while 4 Amps gets -10C Coldside and 55C Hotside. There is a sweet spot between generating to much heat, and pumping the most thermal energy.

Using PWM where can exacerbate the IR loss problem with TECs. Driving a TEC with 8A and 50% dutycycle is worse than a constant 4A. So a Large LC Filter is placed at the output to reduce PWM Current ripple to under 10%.

Using an LC filter creates it's own problem of large voltage spikes when the output is switched on. Ultimately I used a software solution to limit the slew rate of voltage changes. See The two Lt-spice filter simulation graphs.

As a final note, although TEC resistance is fairly flat throughout the temperature swing, Constant current driving is preferred for more predictable results.

Making a refrigerator with TEC's

Drawer Cooling Performance (Just cooling the air inside)

Making a refrigerator with TEC's is not a good idea. Commercial TEC refrigerators are usually gimmicky devices that cool one bottle of beer. In real refrigerator applications, mechanical pumps are much more cost effective for equal performance. Even with high performance insulation using Vacuum Insulated Panels, The two TEC's could not pump the energy out of the container fast enough to get it cold in a timely manner.

Looking at the performance graph, it takes about 45 minutes to reach fridge temps (4C). This 45 minutes of cooling is almost entirely lost every time the drawer opens, since there is no cold food inside like a home refrigerator to store the cold.

The largest issue is that the TEC's are only able to reduce the temperature of the drawer about 23C compared to outside (see pink "Diff" trace). If it is a hot day outside, say 35C, then the TEC's will only be able to get the drawer compartment down to about 12C. Since delivering cold food on a hot day is not possible with this TEC refrigerator, it was decided to shelve this feature of the DAX project.

Design

At the heart of the TEC Driver is an Allegro A4956. The A4956 is a H-bridge MOSFET driver with Current Sense output and Current Limit. Control is done using logic Enable and Direction pin. An analog voltage input sets the current limit, such that, if (0.01Ohms * Amps) is more than the input voltage, then the output shuts off for a short amount of time. In English, 1.2V sets the limit to 12A.



Control Levels

There are many what I call "control levels" that set PWM, or Constant Voltage, or Constant Current or more. Every control mode ends up with a PWM value set. The PWM is slope rate limited to avoid the LC filter overshoot. It's hard for me to decide the hierarchy of control, even now. For example, when I setting a constant current, should the have the CC setting control a constant voltage which in turn controls the Pulse Width? That is up to a more proficient PID loop programmer to decide.

The following are control modes that are possible with the TEC Driver

PWM: Controls the Pules Width of the output and has a maximum slew rate to prevent the LC output filter from overshoot and ringing.

Constant Voltage (Output):Read the two output voltages and A and B and gets the difference, B-A=Output Voltage.

Constant Voltage (Input): Reads the input voltage value (say 24.5V) and then in order to set 12V on the output, it sets the PWM to %48.9. This can be a better choice than CV(output) because complex capacitive and inductive loads will not effect the H-Bridge Control loop leading which could lead to catastrophic unstability. On the other hand, high currents on the output will cause the Output voltage to droop in this mode.

Constant Current (Digital):The Current sense pin on the A4956 is read and the PWM is reduced or increesed in a PID loop.

Constant Current (Analog):The Current Limit is set with a analog voltage (usually from a DAC). in this

Constant Value This can be a PID Loop that take any set point value from any external sensor. Encoders, Techometer, Thermometer. Usually these sensors would be connected directly to the host micro-controller, but could also be connected to the two I2C ports on the output end of the PCB.

Constant Current Passive: The