Smart Fridge

by adrienchen29 in Circuits > Arduino

64 Views, 0 Favorites, 0 Comments

Smart Fridge

image_2026-03-29_123522560.png

In this project, you will build a Smart Fridge Environment Monitor that displays:

  1. Current Time
  2. Current Date
  3. Temperature
  4. Humidity

All data is shown on a 3.5" SPI TFT display, creating a clean and modern fridge dashboard.

This is a simplified version of a larger smart fridge system, focusing only on real-time environmental monitoring.


This works by taking data from the DHT11 Humidity and Temperature Module and the DS1307 RTC or Real Time Clock and displaying that information onto the SPI Display.

Supplies

image_2026-03-29_120055900.png
image_2026-03-29_120144809.png
image_2026-03-29_120208251.png
image_2026-03-29_120443733.png
image_2026-03-29_120255186.png

Core Components

  1. Arduino (UNO / Mega / similar)
  2. 3.5" SPI TFT Display (480×320, capacitive touch optional)
  3. DHT11
  4. DS1307 RTC Module
  5. Breadboard
  6. Jumper wires

Wiring the Components

image_2026-03-29_115732276.png

SPI Display

  1. VCC → 5V
  2. GND → GND
  3. CS → Pin 10 (optional: not included in this project)
  4. CD → Pin 9
  5. RST → Pin 8
  6. MOSI → Pin 11
  7. MISO → Pin 12
  8. SCK → Pin 13
  9. LED → Pin 5 (optional: not included in this project)
  10. SCK → Pin 13

The optional pins don't actually need to be connected to the SPI and Arduino. However, when we move onto the software section, you have to define these pins (LED, CS) for the initialization of the SPI Display.

DHT Sensor

  1. VCC → 5V
  2. GND → GND
  3. DATA → Pin 2

RTC Module (I2C)

  1. VCC → 5V
  2. GND → GND
  3. SDA → A4
  4. SCL → A5


Downloading the Libraries

image_2026-03-29_121424359.png
image_2026-03-29_121438359.png
image_2026-03-29_122041142.png

Download the Following Libraries:

  1. DHT11 sensor library
  2. RTClib

In order to download the Display libraries, you have to do some more. Since I am using the 3.5'' TFT SPI, I will show you how to do it with this display.

  1. First: Head to this website: https://www.lcdwiki.com/3.5inch_IPS_SPI_Module_ST7796
  2. Second: Scroll down to Program Download where it says 3.5inch IPS SPI Module MSP3525_MSP3526 Package
  3. Third: Unzip the download. Press 1-Demo → Demo_UNO_Mega2500 → Install libraries. Select LCDWIKI_GUI and LCDWIKI_SPI and add them to the Arduino Library. (If you want to work with the touch screen capabilities by yourself, you can also add LCDWIKI_TOUCH to your library)
  4. To add them to your Arduino Library, go to your menu bar and press Sketch → Include Library → Add .ZIP Library. Then you can select LCDWIKI_GUI and LCDWIKI_SPI to import them.

Coding

Now that you have wired all components and downloaded all the libraries, you can copy the code from https://github.com/AC583/Sensors


If you have any problems, I created small testing files for debugging purposes so you can isolate what component isn't working correctly.


Then, make sure your computer is connected to the Arduino via cable and press upload.

Common Issues

Q: My RTC Module is giving the correct time and date.

A: Ensure all connections are secure; Try resetting your Arduino or unplugging and plugging your cable back in or re-upload your code. Honestly, I don't know why it sometimes breaks, but I didn't have to change my code to fix this.


Q: My Display isn't working

A: There could be a number of issues to why your SPI display isn't working. I found that 3.5inch IPS SPI Module UNO_Mega2560 Demo Instructions was really helpful.