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

../_images/Part_three_3.1.png ../_images/Part_three_3.2.png

Fritzing Circuit

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

../_images/Part_three_3_Fritzing_Circuit.png 3.3 Overheat Monitor_bb

Schematic Diagram

../_images/image277.png

Code

Note

  • You can open the file 3.3_overheatMonitor.ino under the path of sunfounder_vincent_kit_for_arduino\code\3.3_overheatMonitor directly.

  • The LiquidCrystal I2C library is used here, you can install it from the Library Manager.

    ../_images/lib_liquidcrystal_i2c.png

Example Explanation

The flow diagram of the project is as follows:

../_images/Part_three_3_Example_Explanation.png

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

../_images/image279.jpeg