Cyclic Temperature Heating & Cooling Control System

I S.Mohanchary ,Electronics & Instrumentation Engg graduate,working as Senior Technical Assistant in Defence Research & Development Organization.

Comment errors or corrections found for this circuit, and get the chance to win big! You can find our comments section at the end of this page.

This project proposes a Peltier element based cyclic thermoelectric heating and cooling system with precise temperature control by using PID controller with microcontroller. In this project I have used Peltier Thermoelectric device, Arduino mega board & LM35 temperature sensor.

What is a thermoelectric device?

A thermoelectric device is a solid state semiconductor device consisting of a number of semiconductor elements (P- type and N-type) mounted between two substrates. the elements are connected electrically in series (P-N-P-N)and thermally in parallel. When voltage is applied in one direction, one side of the device creates heat while the other side absorbs heat. TEC module is working on the principle of peltier effect.

Fig 1: Thermoelectric device

The peltier effect is a creation of temperature difference from electric current, when direct current passes across the different materials (metal or semiconductor) that are connected at two junctions. When a current flows across the junction of two different metals (or semiconductors), it absorbs or liberates heat, depending on the direction of current. i.e. electron carriers transports heat from one junction to the other junction. If the current direction is reversed hot and cold junction are also reversed. The thermoelectric module can be use as thermoelectric generator. When temperature gradient is applied on both surfaces of the module, the generated current is proportional to the temperature gradient. Thermo electric generator working on the principle of seebeck effect.

Thermoelectric modules have several advantages for regulating temperature like high precision and stability, quick response time and decent set temperature range. TE devices are small in size and very low weight, reliable, independent from noise and friendly nature to environment. TE devices also have challenges like low thermal power, low efficiency and high cost.

TEC characteristics

In this project the amount of heating/cooling is proportional to the power delivered to the TEC module. To regulate the voltage applied to TEC ,PWM technique is used. With PWM, power to the TE device is switched quickly ON and OFF at a constant frequency. This creates a square wave pulse of power with constant time period, the ON time or duty cycle is varied to create an average output Voltage that is required by the TE device to maintain the set temperature.

MOSFET is used as a switch for PWM function and four MOSFETS are used as H-bridge circuit to change the polarity of current flowing through the TE device according to cooling or heating of top surface of module.

Fig. 2:Block diagram of temperature control system


Fig. 3: Circuit diagram of temperature control system

Circuit Diagram and Working

Circuit diagram of the PID control action for cyclic heating and cooling of thermoelectric device is shown in Fig. 3. It is built around an Arduino Mega board, 16×2 LCD,4X4 keypad, temperature sensor LM35,MOSFETS and a few other components.

Arduino is at the heart of the circuit as it controls all functions. LM35 is a precision integrated circuit whose output voltage is linearly proportional to celsius temperature. It is rated to operate over a -55°C to 150°C temperature range. It has +10.0mV/Celsius linear-scale factor.

Fig 4. Snapshot of the source code in Arduino IDE

There are a wide variety of temperature sensor ICs that are available to simplify the broadest possible range of temperature monitoring challenges. A temperature sensor IC can operate over the nominal IC temperature range of -55°C to +150°C.Temperature sensor LM35 senses the temperature and converts it into an electrical (analogue) signal, which is applied to the MCU through an analogue-to-digital converter (ADC). The analogue signal is converted into digital format by the ADC.

LCD and keypad I/O devices are interfaced to arduino as shown in circuit and driver circuit is made by MOSFETs and transistors as shown in circuit. Sensed values of the temperature and setpoint temperature of the TE device are displayed on the LCD. required temperature set point and heating and cooling cycle times are entered through the Keypad.

The MOSFET Q5 functions as PWM to regulate the temperature of the thermoelectric cooler/heater. MOSFETs Q1,Q2,Q3,Q4 function as Bridge circuit to change the direction of the current flowing through the device. Transistors T1,T2 and T3 are used to drive the MOSFETs Q5,Q1&Q4 and Q2&Q3. LED L1,L2 and L3 indicate the conditions of PWM, heating and cooling operation.

Circuit Operation

Connect 10V 3A DC power supply to driver circuit and 9V battery to Arduino board. While switching On the system we have to enter the desired values of temperature, heating period and cooling period through keypad. To enter the temperature set-point press the character ‘A’ on keypad then, microcontroller displays the message as “enter the temperature set-point”, then enter the temperature value and press ‘#’ to enter the value. Similarly, enter heating time in seconds press ‘B’ and enter time in sec press ‘#’ and to enter cooling time press ‘C’ and enter time in seconds then press ‘#’. After completing the desired input values press ‘*’ to start the operation of the system.


  1. The list of components i am suggesting for this circuit is as follows
    Resistors R1,R2,R3 =2kohms
    R3,R4,R5 =20 Kohms
    R7,R8,R9,R10 =330 ohms
    MOSFETS Q1,Q2,Q3,Q4,Q5 IRF 840
    Transistors T1,T2,T3 BC 548
    Arduino Mega 2560
    16X4 LCD display
    4X4 matrix Keypad
    Temperature sensor LM35
    DC Power source 12 V 5A
    9V battery
    Peltier Module 12V 70W( TEC1-12706)
    LED L1,L2,L3
    heatsink with fan
    to prevent the voltage drop across MOSFET in On state ,Rds ON must be low so you can use MOSFET SUP50020EL instead of IRF 840.

  2. Hi,
    How can I change the electronic schema and source code to have 4 k-type thermocouples for temperature measurement and 4 independent outputs on relays?(Temperature controlled area 150-20 ° C)

  3. I am also doing a similar project for my Master’s program, using Arduino Mega, Peltier module and digital sensors.
    Could you please source code of this project


Please enter your comment!
Please enter your name here