This project presents a smart conveyor belt system designed for honey jar detection and sorting. The system leverages YOLOv5 for object detection and ESP32 microcontrollers for real-time monitoring and sorting, with all devices connected wirelessly via a local Wi-Fi network.
The system comprises three primary components:
- Main Computer (Laptop/Raspberry Pi): Handles honey jar detection using YOLOv5 and processes the camera feed for image analysis.
- ESP32-CAM Microcontroller: Captures real-time video of the conveyor belt and streams it to the main computer via RTSP.
- ESP32 Sorting Microcontroller: Receives sorting commands from the main computer and activates a pneumatic mechanism to handle defective jars.
The main computer processes the camera feed to identify:
- Liquid level inside jars using image processing techniques.
- Cap condition and label integrity of jars.
When anomalies are detected, the sorting microcontroller receives commands over the local Wi-Fi network to execute appropriate actions.
- Real-time detection of jar conditions using YOLOv5.
- Liquid level monitoring inside jars.
- Cap and label defect detection with corresponding sorting actions.
- Wireless video streaming from the ESP32-CAM to the main computer.
- Socket-based communication between the main computer and the sorting ESP32.
- Pneumatic sorting mechanism for handling defective jars.
Ensure the following are available before running the project:
- A main computer (laptop) with Python installed.
- Two ESP32 microcontrollers:
- ESP32-CAM for video capture.
- Second ESP32 for sorting control.
- A stable local Wi-Fi network for communication.
- Required Python libraries (specified in
requirements.txt
).
- Clone the repository:
git clone /~https://github.com/PranayLendave/industry4.0-with-yolov5-and-esp32.git
- Install the necessary Python dependencies:
pip install -r requirements.txt
- Configure the ESP32-CAM for RTSP streaming.
- Set up the second ESP32 with the provided firmware for sorting actions.
- Connect all devices to the same Wi-Fi network.
- Start the Python program on the main computer by running
main.py
.python main.py
- Ensure the ESP32-CAM is streaming video to the main computer via RTSP.
- Monitor the real-time detection output on the main computer.
- Upon detecting any anomalies, the main computer sends sorting commands to the second ESP32.
- The second ESP32 activates the pneumatic sorting mechanism to separate defective jars.
Major contributors:
Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to submit a bug report or feature request via the issue tracker.
This project is a step towards Industry 4.0 automation by integrating advanced object detection and IoT-enabled control systems for smart manufacturing.