TEC Driver

From Black Metal Forest
Jump to: navigation, search
The finished 10 Amp H-bridge (TEC Driver)

The TEC Driver is a 10A H-bridge with a large LC filter 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.


  • 8-25V Input
  • 10A Max Output Current
  • Bipolar Output Voltage (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


The LTspice test circuit with switches instead of MOSFETs
The top graph shows voltage overshoot without a slew-rate limit, the bottom graph shows slew-rate limiting

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, where the Enable pin is Pulse Width Modulated at a carrier frequency of 40khz. 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.0V from the DAC sets the limit to 10A.

A large LC filter removes the PWM AC component, resulting in less than 10% ripple on the output. The LC filter creates a large overshoot that can damage the load. To avoid this, a voltage slew-rate of about 5v/ms implemented in software. The graphs on the right shows the improvement.

Testing went well with nearly no layout or design mistakes. At about 6A the inductors get extremely hot due to their high internal resistance. The inductors make a lot of noise but that's to be expected.

I wanted to make sure that dogs were not annoyed by the high pitched sounds it made so had a co-workers dog come over and take a look at the TEC Driver when it was running. It took no notice of it at all.

Control Modes

There are many "control modes" that set PWM, Constant Voltage, Constant Current and more. Every control mode ends up with a PWM value set. The PWM is slope rate limited to avoid the LC filter overshoot.

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. There is no access to the setting output besides using this slew-rate limited PWM function.

Constant Voltage (Output):Read the two output voltages and A and B and gets the difference, B-A=Output Voltage. The PWM is adjusted until the output voltage is reached.

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 oscillation. On the down side, 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 increased in a PID loop.

Constant Current (Analog):The Current Limit is set with an analog voltage (usually from a DAC). This mode seams to be stable down to 300mA. Usually the analog current limit is used as a limit, not a control mode.

Constant Current Passive: Using a known load resistance as an argument, a output voltage is calculated and set with a Constant Voltage function.

Constant Value This can be a PID Loop that takes any set point value from any external sensor. Encoders, Tachometer, 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.

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, very slowly, and only with lots of insulation. 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.

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 too much heat on the cold side from "IR losses", here are some tips on how to do that.

1. 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 temp difference low and pump the 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, I achieved a hot side that was only 10C above ambient.

2. 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 too much heat, and pumping the most thermal energy.

3. Using PWM where can exacerbate the IR loss problem with TECs. Driving a TEC with 8A and 50% duty cycle is worse performing 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 its 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 LTspice filter simulation graphs.

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