Giter Club home page Giter Club logo

temperature-control-using-fuzzy-logic-on-raspberry-pi's Introduction

Temperature control using Fuzzy Logic on Raspberry PI (with MQTT)

Project prepared with @dariak153.

Goal of the project was to prepare a window application in Matlab that can be used to control temperature (in this example inside a box) and to see how the temperature is changing over time. For this a Simulink model was created that is being run on Raspberry PI 3B.

Important

You need Matlab version R2023b and download Simulink Support Package for Raspberry Pi Hardware to run it!

System

System used in this project can be seen below. Each number corresponds to:

  1. Raspberry PI model 3B - running the controller
  2. Box with a resistor and temperature sensor inside and fan outside of it
  3. IRF520 Transistor
  4. AC adapter
  5. Connector
  6. Raspberry PI model 4 - MQTT broker

Fuzzy Logic

In the project a Mamdani type fuzzy controller was implemented. It was decided to use error and change of error (delta error) as inputs and duty of PWM for heating and cooling as outputs.

And rules were defined like shown below:

Application

Screenshot of application can be seen below. The numbers correspond to:

  1. Input for reference value of temperature
  2. Temperature graph
  3. Information about current PWM duty (0-255) for Heating and Cooling.

Results

Built system is working properly, however the results depend on temperature of surroundings. Also some slight changes in structure of the controller might be done to get better results.

temperature-control-using-fuzzy-logic-on-raspberry-pi's People

Contributors

mmcza avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.