Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Electronic thermostat of own construction

Not open for further replies.


Advanced Member level 4
Aug 2, 2011
Reaction score
Trophy points
Activity points

It is a circuit of electronic thermostat with the possibility of modifications: of the set temperature, hysteresis and operating mode (such as heating-cooling). You can modify the parameters by means of three buttons.

Power of the range from 9 to 15V DC passes firstly through a diode protecting against damage while inverse polarity. Then, it uses some capacitors and 78L05.

The main element is microcontroller PIC16F628A. It provides good parameters at a relatively low price. Control can be done via 12V relay via a transistor and special unloading diode.
There are the following buttons in the board (from the left): “-”, 'OK”, “+”. Every pressing the button is followed by a sound – beep (buzzer).

Temperature sensor is DS18B20, it is soldered in the pictures but also can be joined using a screw connector, so that it can be placed in a distance from the circuit.

LCD display 2x8 can be removed when necessary. There is also a possibility to adjust the contrast (blue potentiometer). The power of the LCD display is provided by the long cable visible in the pictures.

When the relay and backlight are on, the circuit consumes about 60mA.

When connecting the power, an inscription “mode” 0 or 1 appears. 0 means that if the set temperature is 50 degrees Celsius, when this temperature is extended, the relay will be switched on and it will be switched off only at 50 degrees Celsius – it is the hysteresis. Mode 1 means the same, but inversely, for example heater controlling.

Of course, you can select the modes when the relay has one more joint, but this can be implemented in the software without the use of additional cables.

After confirming “OK”, the current temperature is displayed. Entry and exit of the menu can be done by pressing OK. You can change the settings using the buttons + and –. The settings are stored in the EEPROM automatically after you exit the menu.

The entire program, including “main”, 1-wire and LCD support was written in Assembler. During operation, WDT sensor (watchdog) is watching. The load occupies about 50% of the Flash memory (approximately 1000 words of 14bit, what gives about 1,7kB).

And the video:

Link to original thread - Termostat elektroniczny

Not open for further replies.

Part and Inventory Search

Welcome to