Skip to content

wiznetmaker/Smart-Farm-Station

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Basil Cultivation Smart Farm Station

Introduction

This project aims to develop a smart farm system for basil cultivation. It utilizes an AI-based monitoring system and automated environmental control to achieve efficient plant cultivation.

Detail & result : https://maker.wiznet.io/Benjamin/projects/smart-farm-station-basil-cultivation

Technology Stack & Tools

  • Programming Language: Python
  • Web Framework: Streamlit
  • AI Modeling: YOLOv8 for image detection
  • Hardware Control: W5100S-EVB-Pico board, TCP communication for smart farm control
    • image

Team Composition & Roles

  • My Role:

    • AI Modeling: Using YOLOv8 for analyzing plant growth and health status

    • Web Application Development: Building an interface with Streamlit

      • image
    • Camera Server Setup: Capturing and transmitting real-time images from the smart farm

      • image
    • streamlit run main.py
  • Theo's Role:

    • Smart Farm Control System Development: Managing hardware and sensor data integration for the smart farm
    • ezgif com-video-to-gif (1)

Web Application Design & Features

  1. Real-Time Monitoring

    • The web application, developed using Streamlit, enables users to view real-time images and sensor data (temperature, humidity, brightness) of the smart farm.
    • Supports database reset functionality.
    • Real-Time Monitoring Image
    • Code Example:
      st.image(img, use_column_width=True)
      df = pd.DataFrame(sensor_data, columns=['Date', 'Temperature', 'Humidity', 'Brightness'])
      st.table(df)
  2. Start Cultivation Button

    • Pressing the 'Start Cultivation' button sends optimal initial values for basil cultivation (Temperature: 23°C, Humidity: 55%, Brightness: 500, Watering Cycle: 36 hours) to the TCP Client controlling the sensors via the Pico.
    • Initiates the display of growth information (e.g., time elapsed since cultivation start, current growth stage).
    • Start Cultivation Button
    • Code Example:
      if st.button('🌱 재배 시작!', key='start_growing_button'):
          st.session_state['start_time'] = datetime.now()
          tcp_client_send_data()
  3. Current Status Button

    • The 'Current Status' button fetches and displays the latest image from the Camera server, updating the on-screen visuals with the current status of the smart farm.
    • Current Status Image
    • Code Example:
      if 'refresh_image' in st.session_state:
          img_url = "http://192.168.0.10/16"
          response = requests.get(img_url)
          new_image_path = os.path.join(image_save_path, f'image_{st.session_state["refresh_image"].strftime("%Y%m%d%H%M%S")}.jpg')
          with open(new_image_path, 'wb') as file:
              file.write(response.content)
          st.session_state.pop('refresh_image')

Results & Future Plans

As of the current date (November 28, 2023), the smart farm system has been set up, and basil has been planted. It is expected that cotyledons (seed leaves) will develop around 7 to 10 days after planting. Updates will be provided as the plants grow and reach different stages of development. Stay tuned for further updates on the progress and growth of the basil in our smart farm system.

  • image

Additionally, we plan to incorporate an AI model into the system. This AI feature will detect the condition of basil leaves, identifying whether they are healthy, affected by fusarium, or showing signs of powdery mildew. This enhancement aims to provide more precise and automated monitoring of plant health within the smart farm environment.

  • image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%