Git Product home page Git Product logo

plant-care-system's Introduction

Plant Status Monitor

Overview

This project utilizes a PIC18F4580 microcontroller to read analog data from a moisture sensor and then sends this data via UART to an ESP32. The ESP32 hosts a web server that displays the moisture levels. Additionally, the system is designed to turn on a pump when the moisture levels fall below 20% and to indicate the moisture levels using three LEDs.

Components

  • PIC18F4580 Microcontroller
  • ESP32 Module
  • Moisture Sensor
  • LEDs
  • Pumps

Configuration

The PIC18F4580 is configured to read the analog values from the moisture sensor using ADC. It then converts these values to a voltage percentage representation of the moisture levels. The UART communication is set up at a baud rate of 9600.

The ESP32 is set up as an access point with the SSID "Plant Status Monitor" and a predefined password. It hosts a web server that refreshes every 3 seconds to display the latest moisture levels.

Operation

  1. The PIC18F4580 continuously reads the moisture level from the sensor.
  2. The ADC value is converted to a percentage and sent over UART to the ESP32.
  3. The ESP32 updates the web server with the current moisture level.
  4. If the moisture level is below 20%, the PIC18F4580 activates the pump.
  5. The LEDs on the PIC18F4580 indicate the range of the moisture level:
    • Red LED for low (0-19%)
    • Yellow LED for medium (20-39%)
    • Green LED for high (40-100%)

Web Server

The web server displays the moisture level with a color code:

  • Red for low moisture
  • Orange for medium moisture
  • Green for high moisture

Setup Instructions

  1. Connect the moisture sensor to the PIC18F4580.
  2. Connect the LEDs and the pump to the appropriate pins on the PIC18F4580.
  3. Set up the ESP32 with the provided code and connect it to the PIC18F4580 via UART.
  4. Power up the system and connect to the ESP32's WiFi network.
  5. Access the web server using the IP address displayed in the serial monitor.

Code

The code for both the PIC18F4580 and the ESP32 is included in the project files. Ensure to configure the microcontroller and the module according to the pin definitions and settings provided in the code comments.

Safety

Ensure that all electrical connections are secure and that the pump is suitable for the voltage provided by the PIC18F4580.

License

This project is released under the MIT License.

plant-care-system's People

Contributors

zahidaof avatar ziyadasa 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.