3.3 Overheat Monitor¶
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.
In this example, the component modules are connected as shown in the table.
You can open the file
3.3_overheatMonitor.inounder the path of
LiquidCrystal I2Clibrary is used here, you can install it from the Library Manager.
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.
Write a byte to the EEPROM.
Reads a byte from the EEPROM. Locations that have never been written to have the value of 255.
Write a byte to the EEPROM. The value is written only if differs from the one already saved at the same address.
Write any data type or object to the EEPROM.
Read any data type or object from the EEPROM.