The project is an intelligent temperature control switch module based on the ESP8266 chip. It has a two-digit digital tube, ESP8266EX chip and peripheral circuits on the board. It leads to two buttons for logic control and GPIO for outputting high level. It can be connected to external relays, etc. The equipment has a power supply voltage output control circuit reserved, which can be connected to 5-12V electrical appliances (such as fans), and the input power supply has a wide voltage unit of 5-12V. The
actual picture is as follows:

Module description:
There are two as shown in the left area of the above picture . Button, the white button is connected to the main control chip GPIO16, and the black button is connected to the main control chip GPIO12. When the button is not pressed, it is in the pull-up input mode. When the button is pressed, the pin is connected to ground, and the program executes logic.
After the module is powered on, it will display the current temperature. At this time, long press the black button to enter the setting mode. Short press the black button to switch the list. The operation is as follows:
Its function list is as follows:
Digital tube display value
function
description
00
Mode 1, set the predetermined temperature value
If the current temperature is greater than or equal to the predetermined temperature value, GPIO13 and GPIO14 output high level and restart
to take effect.
01
Mode 2, set the predetermined temperature value.
If the current temperature is less than the predetermined temperature value, GPIO13 and GPIO14 output high level and
restart to take effect.
02
Set the brightness of the digital tube
The brightness of the digital tube is divided into levels from 1 to 8. The higher the brightness, the brighter the digital tube and it will take effect immediately.
03
Mode three, only used as a temperature display.
When you do not want to use modes one or two, you can use this mode to make the module only used as a temperature display module.
GPIO13 and GPIO14 output low level and
restart to take effect.
04
Exit the setting list.
Exit the setting list and return to the temperature display interface.
Refer to the PCB. As can be seen from the principle, the main control chip pin GPIO13 is led to a 1xx3P pin header, as shown below:
The pin definition as shown in the figure means that you can connect an external relay to drive other devices, and the status of the GPIO is controlled by the working mode. , low level when the temperature condition is not met.
Similarly, GPIO14 is also led out to control the transistor: This GPIO is controlled by the working mode. Like GPIO13, when the output is high level, the transistor passes, and VCC is the module input voltage (MAX = 12V, MIN = 5V), here It can be connected to external electrical appliances such as fans. Please note that the current should not exceed about 300ma to prevent the module from heating up.
The module is programmed using Arduino, and ESP8266EX is used as the main control chip. If you use this module, you need to prepare a USB to TTL burner to burn it yourself. The burning method can be done by yourself on Baidu or refer to my other open source projects, the QuickChatBox one, and the burning process is initiated in the PCB. hole, as shown in the figure below:
Please disconnect the external power supply when burning.
Temperature detection:
The module uses a 10K 3950 thermistor for temperature measurement. The module can measure temperatures from -10 degrees Celsius to 99 degrees Celsius. It cannot be displayed beyond this range. The NTC thermistor temperature calculation (implemented by esp8266) is referenced in the program. Thank you .
The thermistor specifications are as follows:
The location of the thermal interface is as follows:
Some functions are demonstrated below. The relay module that appears in the demonstration is a low-level trigger:
1. Modify the brightness of the digital tube: In this demonstration, the black button is used for functions Switching and white buttons are used to confirm saving. Press and hold the black button to enter the function list. Short press to switch functions. Find Modify Digital Tube Brightness (02). Click the white button to enter specific brightness settings. Short press the black button to switch brightness. White Short press the button to save and return to the temperature display interface.
2. Use mode 1 to turn off the peripheral relay. First, put the module in mode 3. It is known that the relay is triggered by a low level. If the room temperature is 24 degrees at this time, set the predetermined temperature value to 15. If mode 1 is used to trigger, the GPIO1314 output will be high. level, the relay is connected to GPIO13, and the relay is turned off at this time.
Note that when setting the predetermined temperature value interface, when the blue light flashes, the number displayed by the digital tube is a negative value, that is, degrees below zero. Similarly, in the temperature display interface, when the LED is constant, it means that the value is below zero.
Finally, regarding the Flash chip, 25Q32 is used in the schematic diagram, but in fact, 25Q80 is enough. Please pay attention to the FlashSize selection when burning with Arduino.