I2C TEC controller

3A TEC controller for thermal control of laser diodes etc.

Similar projects worth following
This is a component of my direct UV printer, composed of a ADN8831 TEC controller, coupled to an ATTiny816 and 4-port SPI DAC for temperature setting and voltage/current limiting, used to maintain the laser diode at a constant temperature.

From the Datasheet;

The ADN8831 is a monolithic TEC controller. It has two integrated, zero drift, rail-to-rail comparators, and a PWM driver. A unique PWM driver works with an analog driver to control external selected MOSFETs in an H-bridge. By sensing the thermal detector feedback from the TEC, the ADN8831 can drive a TEC to settle the programmable temperature of a laser diode or a passive component attached to the TEC module.

The ADN8831 supports NTC thermistors or positive temperature coefficient (PTC) RTDs. The target temperature is set as an analog voltage input either from a DAC or from an external resistor divider driven by a reference voltage source.

A proportional integral differential (PID) compensation network helps to quickly and accurately stabilize the ADN8831 thermal control loop. An adjustable PID compensation network example is described in the AN-695 Application Note, Using the ADN8831 TEC Controller Evaluation Board. A typical reference voltage of 2.5 V is available from the ADN8831 for thermistor temperature sensing or for TEC voltage/current measuring and limiting in both cooling and heating modes.

Designs shared under the Creative Commons - Attribution - ShareAlike 3.0 license.

TEC Schematic A8.pdf

Rev. A8 board files - based on current prototype

Adobe Portable Document Format - 65.72 kB - 03/20/2017 at 15:19



KiCAD board files

RAR Archive - 25.63 kB - 03/20/2017 at 15:19


Mathcad - Cooling system A7.pdf

Rough design calculations for system

Adobe Portable Document Format - 338.27 kB - 03/20/2017 at 15:47


ADN8831_How to drive a 12V TEC with 5V ADN8831.png

Notes from Analog regarding use of controler with higher voltage TECs

Portable Network Graphics (PNG) - 285.07 kB - 05/10/2016 at 12:49


ADN8831-TEC controller.pdf

TEC controller datasheet

Adobe Portable Document Format - 420.88 kB - 05/10/2016 at 12:49


View all 7 files

  • Working prototype

    David Brown03/20/2017 at 15:43 1 comment

    So I now have a working digitally controlled board on which PID and other control methods can be implemented. The digital portion is based around an ATTiny816 MCU and MAX5715AAUD+ 4-port DAC.

    I put together the board below to convert my existing prototype. The tiny is hand soldered using standard 3mm iron tip, see Hand solder small QFNs on the kicad forum for how to do this.

    I've put the code for basic control and PID up on github (see links section), i've yet to implement the I2C and serial sections to allow interactive update of set temperature and reporting of temperature, voltage and current measurements.

    Figure: adaptor boards for ATTiny and DAC

    The working prototype design has been incorporated into a new board, the kicad files for which can be found in the files section. The DAC controls the maximum voltage and cool/heat current allowed, along with the control voltage to request magnitude of cool/heat required.

    Figure: The new board design Rev. A8 / v2.0

    For testing the TEC and sensor were placed between a couple of thermal masses to allow work to be applied, the control signal and thermistor voltage were read off the scope to allow rough manual tuning of the system.

    Figure: Testing setup

    Figure: This is a view of the modified prototype (not very pretty).

    Figure: Plot showing limited fluctuations in temperature and control voltage.

  • Fully digital TEC controller possible?

    David Brown12/24/2016 at 00:08 0 comments

    Reviewing the TEC chip data sheet, it looks like it should be possible to swap out the resistor dividers and PID network components for an ATtiny (I2C slave) and x4 DAC (SPI). A thought triggered by seeing this module from Thorlabs OEM Temperature Controllers in SMT Packages.

    The voltage and current limiting functions can be accomplished using a DAC to set them (ILIMC, ILIMH & VLIM), with the last channel controlling the output (OUT2).

    This would allow the PID to be carried out in software and allow an adaptive algorithm to fit the thermal behaviour of the controlled mass. The controler has a linear response for control voltage of 0.25V to 2.25V for control signal of +5V to -5V on the TEC.

    Voltage, current, status & temperature monitored by the ATtiny 12bit ADC, which should have sufficient resolution?

    I'm looking at the ATTINY816 (at $1.06) and MAX5715AAUD+ (bit pricey at $5 in singles)

  • Revised board - rev A7

    David Brown12/22/2016 at 17:05 3 comments

    I've spent a little time revising the board to be single sided. There is little change in the overall dimensions, but I have standardised the locating holes as can be seen below.

    I've switched out the variable resistors for fixed value components as the limits can be more easily calculated, and the components populated, or temporary variable resistors placed.

    Reviewing the calculations it looks like I was confused between the evaluation board circuit and the data sheet (they use different nomenclature in the examples). I'm happier with the new calculations.

    I need to see what components on my existing board I need to change, and then re-test with PID components.

    I've roughed out a quick PID component board for resistors and capacitors to help with the tuning process. This is based on the method used in the evaluation board circuit, using DIP switches to short resistors in series or switch capacitors in parallel.

  • Testing new board

    David Brown07/29/2016 at 18:22 0 comments

    So i've finally got around to testing the new board, which appears to be behaving itself well with all of the components remaining nice and cool. The PID network is quite sensitive and will require some careful evaluation. I'm spent out so this will have to wait for a while to put together a DIP switch and range of capacitors / resistors similar to that on the evaluation board.

    Soldering the main chip was done using a 5mm thick piece of aluminium plate over the gas hob and plenty of light flux over the pre-tinned pads.

    I discovered one minor error which was the value of one of the resistors should have been 50k rather than the 4.7k that I had it at. I've updated the calculations and schematic / parts list to reflect this. I may also need to replace the DAC as the output is sawtooth with variation of about 0.25v which it realy should not be doing.

    [Edit. replaced the DAC and output persists, no issues with the reference input voltge which is nice and stable. Looking again at the circuit the voltage is a function of both the DAC and the feed-back in the op-amp in the controller. So I think that was a false alarm on my part. Further playing shows that the PID elements are very sensetive and really do need optimizing on the actual hardware.]

    Test setup; TEC, thermistor and heat sink plus connections to Arduino for control and monitoring of current and voltage signals

    Read more »

  • Back to the drawing board

    David Brown05/08/2016 at 00:39 0 comments

    After running a long test with the thermistor away from the TEC and the TEC between two heat sinks. So that the board was running at the current set limits. I found that the PCB heated up a lot, probably more heat than the TEC itself was producing. Due to the heat the op-amp system flipped, so that the it was no longer trying to cool, but was now heating.

    The heat generated by the chip, suggests significant inefficiencies, this coupled with the cost of the chip itself ($45 from mouser, $20 for 2 on ebay), i've decided to work on a alternative.

    I've chosen the Analog Devices ADN8831 TEC controller that works with external MOSFET H-bridges, so that I can use more recent, higher efficiency components. The controller is also priced at ~$10 for single units so is a more economic prospect.

    AD have also provided guidance for using this controller for higher voltage TECs by simply using voltage level converters to connect with the H-Bridges (not required for my application).

  • v1.0 shake down

    David Brown05/05/2016 at 21:33 0 comments

    Finally received the last op-amp from mouser, which has allowed me to run tests on the board. After a number of air-wires to sort silly mistakes the board is working as expected. I will post the TINA model of the op-amp circuit that is useful for checking the feedback / set-point system.

    The TEC ic runs quite warm, this may be due to having it connected to a 1A supply, rather than the 3A it will be getting. I know that from other peoples experiences that current limiting the supply can result in dead chips.

    The DAC is behaving correctly, although I need to look into setting it to default to mid value at startup; 0.75v which corresponds to ~25'C. This ensures that if there errors in control and the unit is enabled before the DAC is set that the TEC should not be put into over-drive heating.

    I've updated the board to fix errors and add selector for DAC address and optional components - variable resistor instead of the DAC, to allow manual temperature setting, without need for Arduino etc.

    Fig. test setup, heatsink on hot side, thermistor under foam on cold side

View all 6 project logs

Enjoy this project?



David Brown wrote 05/06/2016 at 16:22 point

Are you having better luck with the motor amp? are you able to control both voltage and current limits?

  Are you sure? yes | no

helge wrote 05/06/2016 at 17:00 point

it's a Maxon ADS 50/5 and it works a treat. Voltage is limited by the input voltage and the current range is set via trim pot. There are cheaper options out there (e.g. based on TB6612).

Oh and since you're mainly interested  in voltage control you might as well just use a tracking PoL DCDC module. I've also implemented a peltier controller based on a 12V in, 0.7-5.5V 6A out PoL DCDC (~$10).

  Are you sure? yes | no

David Brown wrote 05/06/2016 at 17:18 point

looks like a good bet for larger TECs, i'm running with limits of 3.5V max voltage, 2.5A cooling current, and 100mA heating current. Its the combination of low voltage and high-ish current, whilst having a reasonably chop free output to the TEC that makes finding something appropriate tricky. I'll run some long test with full current supply and see how it goes. 

  Are you sure? yes | no

helge wrote 05/06/2016 at 17:38 point

If you also need heating add an H bridge IC or ... well... resistors *cough*. Some 100-220µF in MLC capacitors and a PI filter will do the trick, reducing output ripple to <10mV which will be more than adequate. As long as you're not cooling semiconductor detectors with that peltier you should be fine with the ripple voltage.

  Are you sure? yes | no

helge wrote 05/06/2016 at 16:18 point

I had nothing but bad luck with the MAX1968 - once they hit the 2A mark some of the switches were damaged, causing excess current draw in one direction or failure to operate (I tried both 500kHz and 1 MHz modes) - oh and not to mention the gory little volcanoes on top of the package heralded by the nasty smell of dead electrons. With 3 out of 3 test boards now dead I switched to a DC servo motor amp.

I'm willing to share the layouts on request.

ps. I'm rather sure the inductors used did not saturate whereas this might generally be a possible failure mode.

  Are you sure? yes | no

RandyKC wrote 05/05/2016 at 21:08 point

Sorry, I'm confused.

Do you plan to use the MAX chip as a current source for the laser diode or to control a Peltier junction cooler for the heatsink the diode is mounted in?

  Are you sure? yes | no

David Brown wrote 05/06/2016 at 17:18 point

The MAX chip is used to set the TEC temperature set-point, this can also be done with a simple variable resistor, but then requires manual intervention to make adjustments.

In my application the TEC is used to control the temperature of the laser diode; provide cooling, and thus minimising the variation in power output of the laser diode due to heat build up.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates