Note
Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook! Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts.
Why Join?
Expert Support: Solve post-sale issues and technical challenges with help from our community and team.
Learn & Share: Exchange tips and tutorials to enhance your skills.
Exclusive Previews: Get early access to new product announcements and sneak peeks.
Special Discounts: Enjoy exclusive discounts on our newest products.
Festive Promotions and Giveaways: Take part in giveaways and holiday promotions.
👉 Ready to explore and create with us? Click [here] and join today!
3.3 Overheat Monitor
Overview
You may want to make an overheat monitoring device that applies to various situations. When the temperature of room is above 30°C in summer, the electric fan or the air conditioner will be turned on automatically. If the refrigerator stops to refrigerate, there will emit alarm. When the CPU gets overheated, the water-cooling system turns on. Next, we will use thermistor, relay, button, rotary encoder and LCD to make an intelligent temperature monitoring device whose threshold is adjustable. You can make it suitable for the scene you want by inserting different peripherals into the relay and using a rotary encoder to adjust the high temperature threshold.
Components Required


Fritzing Circuit
In this example, the component modules are connected as shown in the table.


Schematic Diagram

Code
Note
You can open the file
3.3_overheatMonitor.ino
under the path ofsunfounder_vincent_kit_for_arduino\code\3.3_overheatMonitor
directly.The
LiquidCrystal I2C
library is used here, you can install it from the Library Manager.
Example Explanation
The flow diagram of the project is as follows:

By using EEPROM.h library, the high temperature threshold is saved in EEPROM to avoid the value reset after the restart of MCU.
Library Functions:
void write(address,value)
Write a byte to the EEPROM.
void Read(address)
Reads a byte from the EEPROM. Locations that have never been written to have the value of 255.
void update(address,value)
Write a byte to the EEPROM. The value is written only if differs from the one already saved at the same address.
void put(address,value)
Write any data type or object to the EEPROM.
void get(address)
Read any data type or object from the EEPROM.
Phenomenon Picture
