User Manual
83 
Lesson 34 Thermostatic Water Tank System 
Introduction 
In this lesson, we will use a Rotary Encoder module, an Analog Temperature Sensor module, 
a Relay module, a Button module and an I2C LCD1602 to build a Thermostatic Water Tank 
system. The tank can be used in various situations, such as in the test department of medical 
organizations and  colleges,  scientific  research,  chemical  industry,  printing and  dyeing 
industry to distil, dry, inspissate and heat chemical medicines and cultivate biological 
products in a constant temperature, as well as to boil and disinfect equipment. 
Components 
- 1 * SunFounder Uno board 
- 1 * USB data cable 
- 1 * Rotary Encoder module 
- 1 * Analog Temperature Sensor module 
- 1 * LCD1602 
- 1 * Relay module 
- 1 * Button module 
- Several jumper wires 
Experimental Principle 
In this experiment, we use a thermistor temperature sensor and an LCD to sense and display 
both the current temperature and the set temperature. A rotary encoder is used to change 
the set temperature. When the measured temperature value is lower than the set value, the 
relay is activated. Relays are old-fashioned electromagnetic components that activate a 
mechanical switch when a current flows through its coil of wire. They can switch high currents 
and voltages, making them suitable for controlling main equipment. 
Experimental Procedures 
Step 1: Build the circuit 
LCD1602 Connection: connect pin RS to digital pin 12; R/W to GND; E to digital pin 11; D4~D7 
to digital pin 10, 9, 8, and 7; VSS to GND; VDD to 5V; A to 3.3V; K to GND 
Button Connection: connect pin S to digital pin 5, pin - to GND, and + to 5V 
Analog-temperature sensor Connection: connect pin S to analog port A0, - to GND, and + 
to 5V 
Relay Connection: connect pin S to digital pin 6, pin - to GND, and + to 5V 
Rotary Encoder Connection: connect pin CLK to digital pin 2, DT to digital pin 3, SW to digital 
pin 4, pin - to GND, and + to 5V 
SunFounder










