Skip to content

HeatSync is an IoT-enabled Raspberry Pi thermostat with a 3.5″ touchscreen interface, real-time DHT22 sensor monitoring, and adaptive heating/cooling control (automatic or manual) with built-in logging.

License

Notifications You must be signed in to change notification settings

aadhakal/HeatSync-Smart_Thermostat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HeatSync

A Raspberry Pi–based smart thermostat built with Kivy, using a DHT22 sensor for temperature & humidity readings and an I²C Relay HAT for heating/cooling control, displayed on a 3.5" 480×320 SPI touch screen.


Features

  • Real-time sensor display: Shows current temperature and humidity.
  • Automatic control: Maintains a user-defined threshold with hysteresis to prevent relay chatter.
  • Manual override: Toggle fan and heater independently via buttons.
  • Unit switching: Convert between °C and °F on the fly.
  • Date & time display: Central Time Zone clock updates every second.
  • Touchscreen interface: All controls optimized for touch on a 3.5" display.
  • Package structure: Clear separation of sensor I/O, control logic, and GUI code.
  • Logging: All events and errors logged to thermostat.log.

Hardware & Display


Detailed Resources


Setup Steps

  1. Format SD Card : Download and run SD Card Formatter:

  2. Write OS Image: Download Win32DiskImager and write Raspberry Pi OS:

    OR,Download OS image:

  3. Enable SSH

    • Create an empty file named ssh (no extension) on the boot partition of the SD card.
  4. Hardware Setup

    • Insert the SD card into the Raspberry Pi.
    • Connect the 3.5" touch display via the SPI header.
    • Power on the Pi.
  5. Network & SSH

    # On Pi, find IP address:
    ifconfig
    • Connect using PuTTY or your SSH client (port 22).
    • Login as pi, then change the default password when prompted.

Development Environment

  1. Create Virtual Environment

    sudo apt-get update
    sudo apt-get install python3-venv
    mkdir ~/my_project && cd ~/my_project
    python3 -m venv env
    source env/bin/activate
  2. Install Dependencies

    pip install adafruit-blinka adafruit-circuitpython-dht kivy smbus2 pytz
    pip install pyqt5 Adafruit_DHT RPi.GPIO
    
    # If PyQt5 errors:
    sudo apt-get install qt5-qmake qtbase5-dev build-essential libgl1-mesa-dev
  3. Run the Application

    python main.py

Project Structure

your_project/
├── thermostat/
│   ├── __init__.py
│   ├── sensors.py
│   ├── control_logic.py
│   └── GUI.py
└── main.py

Requirements

  • Python 3.7+
  • Kivy
  • adafruit-circuitpython-dht
  • smbus2
  • pytz

Install via:

pip install kivy adafruit-circuitpython-dht smbus2 pytz

Usage

git clone <repo-url>
cd your_project
source env/bin/activate  # if using venv (recommended for external libraries)
python main.py
  • Touchscreen controls:
    • Slide threshold.
    • Toggle Automatic/Manual.
    • Manually toggle Fan/Heater.
    • Switch °C/°F.

Customization

  • Threshold & Hysteresis: thermostat/control_logic.py
  • I²C Addresses/Channels: thermostat/sensors.py
  • Display Settings: thermostat/GUI.py or override in main.py

License

MIT License

About

HeatSync is an IoT-enabled Raspberry Pi thermostat with a 3.5″ touchscreen interface, real-time DHT22 sensor monitoring, and adaptive heating/cooling control (automatic or manual) with built-in logging.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages