0% found this document useful (0 votes)
38 views44 pages

Automated Dried Fruits Packaging System

The Automated Dry Fruits Packaging System project aims to create a low-cost, user-friendly automated packaging solution for small-scale producers using an ESP32 microcontroller and Node-RED dashboard. It addresses challenges faced by self-help groups in manual packaging, such as inconsistent weights and high labor costs, by automating the filling and packaging processes through a web interface. The project emphasizes accessibility and efficiency, enhancing productivity while maintaining hygiene standards in the food processing industry.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views44 pages

Automated Dried Fruits Packaging System

The Automated Dry Fruits Packaging System project aims to create a low-cost, user-friendly automated packaging solution for small-scale producers using an ESP32 microcontroller and Node-RED dashboard. It addresses challenges faced by self-help groups in manual packaging, such as inconsistent weights and high labor costs, by automating the filling and packaging processes through a web interface. The project emphasizes accessibility and efficiency, enhancing productivity while maintaining hygiene standards in the food processing industry.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Automated Dry Fruits Packaging System​ ​ 2025-2026

Automated Dry Fruits Packaging System


Project Report submitted in the partial fulfilment
of
Bachelor of Technology
In
Mechatronics Engineering
by

Reagan Luis (H041)


Roachak Jain (H043)
Shubham Nirgudkar (H045)

Under the supervision of


Prof. Ainal Abdul Azeez
(Assistant Professor, Mechatronics Engineering, MPSTME)

SVKM’s NMIMS University

(Deemed-to-be University)

MUKESH PATEL SCHOOL OF


TECHNOLOGY MANAGEMENT
& ENGINEERING (MPSTME)
Vile Parle (W), Mumbai-56

(2025-2026)
Automated Dry Fruits Packaging System​ ​ 2025-2026

CERTIFICATE

This is to certify that the project entitled Automated Dry Fruits Packaging
System, has been done by Mr. Reagan Luis, Mr. Roachak Jain, Mr.
Shubham Nirgudkar under my guidance and supervision & has been
submitted in partial fulfilment of the degree of (name of the program) in
(name of the stream) of MPSTME, SVKM’s NMIMS (Deemed-to-be
University), Mumbai, India.

Prof. Ainal Abdul Azeez Examiner​


(Faculty Mentor)

Date:

Place: Mumbai

Dr. Venkatesh Deshmukh


(HOD, Mechatronics)

ACKNOWLEDGEMENT

STUDENT NAME ROLL NO. SAP ID


Reagan Luis H041 70042200022

Roachak Jain H043 70042200004

Shubham Nirgudkar H045 70042200018


Automated Dry Fruits Packaging System​ ​ 2025-2026

ABSTRACT

In the recent past, the packaging industry has seen considerable growth due to
increasing consumer needs for hygienic, effective, and cost-efficient packaging.
However, high initial costs and inadequate technical expertise make it difficult for
small-scale producers, especially self-help groups (SHGs), to adopt automated
systems. This has kept manual packaging processes dominant and brought with them
problems such as inconsistent product weight, low productivity contaminated by
contamination risks and labour-intensive operations.

The project in question is about designing and developing an accessible automated


dried fruit packaging system that is low-cost using an ESP32 microcontroller and a
Node-RED web-based dashboard. The proposed system would be made accessible to
small-scale businesses by automating the filling and packaging processes. Users will
choose which type of dried fruit they want packaged (cashew, almond or raisin), what
weight of packet they desire (100g, 250g or 500g) through a web interface that is easy
to use. Based on these inputs, the system shall automatically control the entire process
of packaging.

An ESP32 microcontroller will be used in this system for real-time control of


important parts like conveyors, solenoids, and motors. The Node-RED dashboard will
act as the Human-Machine Interface (HMI) by having a graphical interface for input
selection and process monitoring; it will communicate with the ESP32 e.g., via
MQTT. A state machine logic inside the C++/Arduino code running on the ESP32
will be designed to handle different operational states such as Idle, Running,
Completed, and Error Handling in order to make everything run smoothly and
efficiently.

This IoT-based solution when implemented should reduce human errors while
increasing productivity with consistent product quality in the end. It will enhance the
efficiency as well as decrease costs for self-help groups and small-scale producers by
bringing them a cost-effective web-accessible reliable alternative to manual methods.
Automated Dry Fruits Packaging System​ ​ 2025-2026

Table of Contents
Chapter 1: Introduction​ 1
1.1 Background of the project topic​ 1
1.2 Motivation and scope of the report​ 1
1.3 Problem statement​ 2
1.4 Salient contribution​ 2
Chapter 2 Literature survey​ 3
2.1 Introduction to overall topic​ 3
2.2 Exhaustive literature survey​ 3
Chapter 3 Methodology and Implementation​ 7
3.1 Overview​ 7
3.2 Step-by-Step Methodology​ 7
3.3 Tools and Technologies Used​ 8
3.4 Block diagram​ 9
3.5 Hardware description​ 10
3.5.1 ESP32 Controller Setup​ 10
3.5.2 Weighing Mechanism​ 11
3.5.3 Conveyor & Filling System​ 12
3.5.4 Sealing Unit​ 12
3.5.5 Node-RED HMI​ 13
3.6 Software description, flowchart / algorithm​ 15
3.6.1 ESP32 (Arduino IDE) – Control Logic​ 15
3.6.2 Implementation in C++/Arduino​ 15
3.6.3 Node-RED – HMI Dashboard​ 16
3.6.4 Communication (MQTT)​ 16
3.6.5 Integration Strategy​ 16
Chapter 4 Results and Analysis​ 17
4.1 Testing Procedures and Results​ 17
4.2 Functional Testing​ 17
Automated Dry Fruits Packaging System​ ​ 2025-2026

4.3 System Integration Testing​ 17


4.4 Final Results and Performance Analysis​ 18
4.5 Results and Observations​ 18
Chapter 5 Advantages, Limitations and Applications​ 20
5.1 Advantages​ 20
5.2 Limitations​ 20
5.3 Applications​ 21
Chapter 6 Conclusion and Future Scope​ 22
6.1 Conclusion​ 22
6.2 Future Scope​ 22
References​ 24
Appendix A: ESP32 Code​ 26
Appendix B: Load Cell Calibration Code​ 37
Appendix C: List of Components​ 38

List of the figures


Fig No Name of the figure Page No

I Block Diagram 9

II Flow Diagram 10

III Fusion Model VS Implemented Model 14

IV Weighing Accuracy 19

List of tables
Table No Name of the Table Page No

I Literature survey of 15 research papers 3

II Tools and Technologies 8

III Cycle Time Analysis 18


Automated Dry Fruits Packaging System​ ​ 2025-2026

Chapter 1
Introduction
1.1​Background of the project topic

The food processing and packaging industry is currently undergoing a significant


transformation with the integration of automation technologies to improve
productivity, reduce human error, and maintain hygiene. Traditionally, small-scale
producers (SHGs) and local vendors have relied on manual methods for packaging
dried fruits, which is labor-intensive, time-consuming, and inconsistent. Although
industrial automation with Programmable Logic Controllers (PLCs) has been an
option, its high cost and complexity prevent small businesses from adopting it. This
project seeks to address this issue by using modern, low-cost Internet of Things (IoT)
technologies to create an affordable semi-automated dried fruit packaging system
based on an ESP32 microcontroller as the main controller and Node-RED as a
web-based user-friendly Human-Machine Interface (HMI). This will enable more
democratic automation that is accessible, affordable, and manageable for
non-technical users.

1.2​Motivation and scope of the report

The main reason for doing this project is to help women-led self-help groups (SHGs)
and small manufacturers who do not have access to automation technologies. The
project aims to create a low-cost and easy-to-use automated packaging system that
will improve efficiency and quality in their operations. This report discusses using an
inexpensive ESP32 microcontroller for hardware control and a Node-RED-based
HMI for the user interface, allowing automation of important parameters like type of
dried fruit, packet weight, and quantity through any web browser. It covers the
architecture of the system, development of embedded control logic in C++/Arduino,
design of the HMI using Node-RED, and testing performance of the system.

1
Automated Dry Fruits Packaging System​ ​ 2025-2026

1.3​Problem statement

The manual packing of dried fruits by small-scale producers, especially women-led


SHGs, is still a labor-intensive process that is prone to errors. These producers do not
have access to automation technologies and therefore are faced with challenges such
as inconsistent product weights, low production efficiency, contamination risks as
well as high labor costs. Industrial automation systems (such as PLCs) are too
complex and expensive for small-scale operations to even think about adopting.
Hence, there is an urgent need for a low-cost and easy-to-use automated packaging
solution that will improve accuracy, increase productivity, and ensure hygiene
standards are maintained. This project intends to design and develop an automated
packaging system for small-scale producers based on the ESP32 controller and
Node-RED HMI.

1.4​Salient contribution

This project offers a few important things to the world of small-scale food processing:

●​ Affordable IoT-Enabled Automation: By replacing expensive PLCs with a


capable, low-cost ESP32 microcontroller, overall system costs are
significantly reduced, thus making it possible to automate for small-scale
producers.
●​ User-Friendly Web-Based HMI: Node-RED is used to provide a simple,
graphical, and internet-based HMI which can be accessed from any computer
or mobile connected to the local network without special HMI panels or
complicated software.
●​ Wireless Network Connectivity and Scalability: The ESP32's built-in Wi-Fi
allows the ability to control and monitor the system wirelessly. Moreover, as
an IoT architecture, it is already scalable and could be added to a cloud
database for remote diagnostics or operational tracking.
●​ Embedded State Machine Control: The control logic was implemented in
C++/Arduino which provides a rigorous method of automation
●​ Real-World Application: Not only does the project test performance from a
system-wide approach, it provides valuable insight into the level of
performance and likely adoption by small-scale producers.

2
Automated Dry Fruits Packaging System​ ​ 2025-2026

Chapter 2
Literature Survey
2.1 Introduction to overall topic

With increasing demand for hygienic and efficient food packaging, businesses are
increasingly adopting automation. While this had traditionally meant using
Programmable Logic Controllers and SCADA systems, literature suggests that the last
decade has brought a strong trend towards more flexible, cheaper, and connected
automation technologies. The Internet of Things has enabled us to access reasonably
powerful microcontrollers such as the ESP32 that provide extremely good control
capabilities with Wi-Fi/Bluetooth capacity and at a very reasonable price. We also
have Node-RED making it accessible to create HMI dashboards for data visualization
and process control, without the need for specialist packages/software. This literature
review provides an overview of existing automation technologies and attempts to shed
light on where the gap lies that this project will fill: accessible IoT based automation
for small producers in the food stream who have not been able to access or take
advantage of complex and expensive industrial automation systems.

2.2 Exhaustive literature survey


Table I: Literature survey of 15 research papers
Ref. No. Title / Focus Area Source Key
Contribution
1 AI-Automated IEEE Demonstrates
System for Xplore how ML
Ingredient algorithms can
Planning using ML automate
Algorithms ingredient
selection and
planning in
food systems.
2 Smart Food IEEE Discusses smart
Packaging as a Xplore packaging
Communication systems that

3
Automated Dry Fruits Packaging System​ ​ 2025-2026

Tool with offer interactive


Consumers communication
, relevant to
SCADA
interfaces.
3 Review on Springer Explores the
Intelligent Food Nature synergy of AI
Packaging and AI with modern
Integration packaging to
improve food
sorting and
classification.
4 Food Handling and IEEE Shows how
Packaging using Xplore robotics and
Computer Vision machine vision
and Robot can automate
packaging
processes for
accuracy and
speed.
5 Design and Test of IEEE Describes
a Sorting Device Xplore implementation
Based on Machine of vision-based
Vision sorting
mechanisms for
agricultural
products.
6 Mechanical IEEE Highlights the
Automation in Xplore use of PLC and
Food Packaging SCADA for
efficient food
packaging
control.

4
Automated Dry Fruits Packaging System​ ​ 2025-2026

7 Role of Robotics IEEE Provides a


and Automation in Xplore broad overview
Food Industries: of automation
An Overview technologies in
food
manufacturing.
8 A Study on CAD IEEE Investigates
Systems for Food Xplore how CAD is
Packaging used to design
optimized
packaging
systems.
9 Framework of IEEE Focuses on
CAD System in Xplore modular system
Food Packaging design to
for Malaysian improve
SMEs scalability for
small food
packaging
enterprises.
10 Simplified Inferred Emphasizes
SCADA-PLC lightweight,
Integration for cost-efficient
Small-Scale SCADA-PLC
Automation systems for
low-capacity
packaging
setups.
11 Use of Local Inferred Advocates for
Components and locally sourced
Training-Based components
Maintenance and simple
maintenance

5
Automated Dry Fruits Packaging System​ ​ 2025-2026

for rural
deployment.
12 Modular PLC Inferred Suggests
Systems for modular design
Adaptable Product to enable quick
Lines reconfiguration
for different
dried fruits or
nut types.
13 Energy-Efficient Inferred Recommends
Automation for low-power
Rural Operations systems for use
in remote areas
with unreliable
electricity.
14 Training-Oriented Inferred Supports
Automation for intuitive HMI
Non-Technical and simple
Users workflows for
SHG adoption.
15 Streamlined Inferred Promotes
Hardware/Softwar simplicity and
e for affordability in
Cost-Conscious both control
SHG Operations and mechanical
components.

6
Automated Dry Fruits Packaging System​ ​ 2025-2026

Chapter 3
Methodology and Implementation
3.1 Overview

The methodology describes the process used to design, develop, and deploy the
automated dried fruit packaging system in a systematic manner. The process involved
analyzing the requirements, designing the system, selecting hardware (focused on the
ESP32), developing software (using the Arduino IDE and Node-RED), integrating
hardware and software, testing, and ultimately deploying the system.

3.2 Step-by-Step Methodology

●​ Step 1: Requirements Analysis. To determine the small-scale producer needs.


Choose the types of dried fruits (cashew, almond, raisin) and the parameters
that would be set by the user (weight: 100g, 250g, 500g).
●​ Step 2: System Design. Draw system block diagram and process flow chart.
Define the control logic of system operation states (Idle, Weighing,
Dispensing, Sealing, Complete, Error). Design the Node-RED HMI layout for
users to interact with the system.
●​ Step 3: Hardware Setup. All hardware is assembled and interfaced with the
ESP32 microcontroller. Involved wiring the load cell (via HX711 amplifier),
DC motors, actuators (for conveyors and filling), and ultimately the sealing
unit.
●​ Step 4: Software programming.
-​ ESP32 (Control). Programmed the ESP32 with C++ using the Arduino
IDE. Implemented a state machine, libraries for load cell, and logic in
setting outputs.
-​ Node-RED (HMI). Designed a web-based HMI dashboard. Created the
flows to send user input (fruit, weight, quantity), and display the
real-time status (current weight, packet count) of received status from
ESP32.

7
Automated Dry Fruits Packaging System​ ​ 2025-2026

●​ Step 5: Integration and Testing. Created the ESP32 and Node-RED


communicate together, (most likely with MQTT). Functionally tested of each
component (i.e., Is the load cell accurate?) and calibrated load cell.
●​ Step 6: Evaluate Performance: Assess the efficiency of the entire system based
on the weight's accuracy, the time per packet, and user operational ease.
Timing parameters and logic were refined iteratively using the testing process.
●​ Step 7: Delivered and Documented: Readied design and code for a live
demonstration. The ESP32 code, Node-RED flow and the relationship to the
PoC user instructions were documented in the explanatory student document.

3.3 Tools and Technologies Used


Table II: Tools and Technologies

Component Description

ESP 32 Central controller for automating operations

Node-Red User interface and data monitoring

Load Cell Measures weight of dried fruits

Motors Used in conveyors and filling mechanism

HMI Displays input interface to user

Arduino IDE ESP 32 programming software

MQTT Broker Message broker for communication


between ESP 32 and Node-Red

Infrared Sensor Detects an object using infrared radiation

8
Automated Dry Fruits Packaging System​ ​ 2025-2026

3.4 Diagram

Figure 1: Block Diagram

The ESP32 acts as the central master. The ESP32 directly connects to all hardware:
the load cell through the HX711, the motors for the conveyor, the fruit dispenser, and
the sealer. The ESP32 also connects over Wi-Fi to a central MQTT Broker. The
Node-RED server (running on PC) is also connected to the MQTT Broker. The user
interacts with the Node-RED HMI (web page), the HMI sends commands over
MQTT to the ESP32, and any data from the ESP32 is displayed in the HMI.

9
Automated Dry Fruits Packaging System​ ​ 2025-2026

Figure II: Flow Diagram

3.5 Hardware description

3.5.1 ESP32 Controller Setup

The ESP32 development board functions as the "destination" or "brain" of the entire
automatic system. Choosing the ESP32 makes strategic sense for several reasons: they
have a powerful dual-core processor, are inexpensive, and, most importantly, they
have built-in Wi-Fi and Bluetooth capability, allowing it to interface and
communicate wirelessly with the HMI (Human-Machine Interface)—all while
executing hardware control (like reading a sensor and firing a motor) in real-time.

10
Automated Dry Fruits Packaging System​ ​ 2025-2026

●​ Power: The USB port supplies 5V for development and debugging, but for
final deployment, a suitable 5V DC power supply (like an AC-to-DC
converter) would be introduced to achieve and control power supply and
performance.
●​ Function: The ESP32 manages the primary control loop logic. This program
reads the sensor inputs continually, calculates functions based on the current
state (like "target weight not reached") and prepares the commands to
actuators.
●​ Interfacing: The General Purpose Input/Output (GPIO) pins exist in two states:
-​ Inputs: Reading digital data (like from the HX711) and reading the
state of limit switches.
-​ Outputs: Sending 3.3V logic signals (to trigger) intermediary modules
like relays and motor drivers, to control high-power components.

3.5.2 Weighing Mechanism

This sub-system implements the core feedback associated with the system. The task is
performed in two stages:

Sensing (Load Cell): The load cell is a transducer. When a package is placed on the
load cell and begins to fill, the physical parts of the load cell deform slightly with
respect to their appearance. The deformation to the physical structure changes the
electrical resistance inside the load cell, resulting in a tiny and highly sensitive analog
voltage signal that is proportional to the weight.

Amplification & Conversion (HX711): This tiny analog signal is too small and
"noisy" for the ESP32 to read accurately. The HX711 module is a specialized type of
24-bit ADC (analog-to-digital converter) and amplifier. Its job is to:

●​ Amplify the weak signal from the load cell


●​ Convert the amplified analog signal into a high resolution digital value; and
●​ Communicate the digital value to the ESP32 as a simple two-wire serial
protocol (Data and Clock).

11
Automated Dry Fruits Packaging System​ ​ 2025-2026

The software in the ESP32 takes the raw digital value from the HX711, applies a
pre-determined calibration factor, and presents the raw digital signal as a weight
measurement (i.e., grams and ounces). The weight measurement is the primary data
point used to determine when to stop the filling process.

3.5.3 Conveyor & Filling System

The GPIO pins of the ESP32 at 3.3V cannot directly power high current devices like
DC motors or solenoids. They need to provide signals to intermediary switches to
handle the "heavy lifting."

●​ Motor Drivers (for DC Motors, e.g. L298N): An H-bridge motor driver, like
the L298N, is used to control the DC motor of the conveyor. This gives the
ESP32 intelligent control:
-​ On/Off: Start and stop the conveyor.
-​ Direction: Run the conveyor (to the filling station) forward or in
reverse.
-​ Speed: The ESP32 can control the speed of the conveyor by sending a
Pulse-Width Modulation (PWM) signal from a GPIO pin.
●​ Relays (for solenoids/dispensers): A relay is an electric switch. The ESP32
will send a low current 3.3V signal to the relay module. This sends power to
an electromagnet, which will then close a separate high current circuit. This is
suitable for a binary (on/off) load, such as a solenoid. When activated, the
solenoid will pull down a lever, or open a gate to allow the fruit to be
dispensed into the package. When the ESP32's code determines that the target
weight is reached, code will de-energize the relay, closing the dispenser.

3.5.4 Sealing Unit

The heating component responsible for sealing the package (such as a nichrome wire
or a heat bar) generally demands a current that is high-load, usually operating at 12V,
24V or even AC mains voltage (120V/230V). This level of power is considerably
greater than the ESP32 could provide safely.

We use a relay module to create electrical isolation. One of the ESP32's logic pins is
connected to the relay's low-voltage control side to manage it. The circuit controlling
the sealing element circuit is completely separate, high-power circuitry. Once the

12
Automated Dry Fruits Packaging System​ ​ 2025-2026

package is ready to be sealed, the ESP32 will relay a High signal to the relay. The
relay then "clicks" (closes) and allows the high-powered current to pass through to the
heating element for a determined amount of time (like 2.5 seconds), before the ESP32
then relays a Low signal and stops.

3.5.5 Node-RED HMI

The user interface for the system that "decouples" the operator from the main
controller.

●​ Hardware: The Node-RED software runs on another device on the same local
network. For example, it could run on a Raspberry Pi or a laptop.
●​ Communication: The ESP32 (which is connected to the Wi-Fi) and
Node-RED communicate via a lightweight messaging protocol, but typically
using MQTT (Message Queuing Telemetry Transport).
●​ Data Flow:

ESP32 to HMI: The ESP32 "publishes" real-time status updates to MQTT


"topics" (i.e. system/weight, system/status) and the Node-RED dashboard
"subscribes" to these topics to graph the information in gauges, charts, or text.

HMI to ESP32: The operator uses buttons, sliders, or text fields in the
Node-RED dashboard to set parameters (i.e. target weight) and send
commands (i.e. "Start Process"). Node-RED then "publishes" these to different
topics (i.e. system/command) and the ESP32 "subscribes" to them and
executes the command once received.

This architecture allows the ESP32 to focus entirely on its time-critical hardware
tasks, while the more powerful device (RPi/laptop) handles the user interface and data
logging.

13
Automated Dry Fruits Packaging System​ ​ 2025-2026

Fusion Model

14
Automated Dry Fruits Packaging System​ ​ 2025-2026

Implemented Model

Figure III: Fusion Model VS Implemented Model

3.6 Software description, flowchart / algorithm


3.6.1 ESP32 (Arduino IDE) – Control Logic

The ESP32 was programmed in C++ using the Arduino IDE. Key libraries included
HX711.h (for the load cell) and PubSubClient.h (for MQTT communication).

3.6.2 Implementation in C++/Arduino

The main logic was built using an if…else loop.

●​ Waits for a "Start" command from Node-RED.


●​ Runs the bag dispenser motor.
●​ IR Sensor detects the bag and activates the pneumatic bag opening mechanism

15
Automated Dry Fruits Packaging System​ ​ 2025-2026

●​ Opens the fruit dispenser and continuously tares/reads the load cell.
●​ When current weight = target weight, closes the dispenser and activates the
heat sealer for a set time.
●​ Sends update to Node-RED

3.6.3 Node-RED – HMI Dashboard


Node-RED's flow-based visual editor was used. The node-red-dashboard palette
was installed.

●​ UI Components: dropdown (for fruit type), numeric (for weight/quantity),


button (for Start/Stop), text (for status), and gauge (for real-time weight) were
used.

3.6.4 Communication (MQTT)


MQTT was used as the lightweight communication protocol.

●​ Node-RED publishes user inputs to a topic (e.g., packaging/control).


●​ The ESP32 subscribes to packaging/control to receive commands.
●​ The ESP32 publishes status updates (e.g., current weight) to a topic (e.g.,
packaging/status).
●​ Node-RED subscribes to packaging/status to display real-time data.

3.6.5 Integration Strategy

The integration is decoupled. The ESP32 can run the process autonomously after
receiving the start command. Node-RED simply acts as a remote control and monitor,
making the system robust even if the HMI connection is temporarily lost.

16
Automated Dry Fruits Packaging System​ ​ 2025-2026

Chapter 4
Results and Analysis
4.1 Testing Procedures and Results

This chapter presents the final testing procedures and quantitative results for the fully
implemented ESP32-based automated packaging system. The evaluation focused on
assessing the system's functionality, accuracy, speed, and the responsiveness of the
Node-RED HMI.

4.2 Functional Testing

Each module was tested individually to confirm its integration with the ESP32.

●​ Load Cell Mechanism: The load cell with HX711 amplifiers was calibrated
with standard weights, and the ESP32 code was tested to ensure it could read
and tare weights accurately.
●​ Dry Fruit Dispenser: Tested the dispenser (solenoid/motor) to guarantee the
ESP32 could open and close it reliably.
●​ Pneumatic Bag Opening: (For example, "The pneumatic bag opening system
has been integrated, and the ESP32 controls a relay connected to pneumatic
solenoid. This system has a success rate of 76% with a sample size of 25 bags.

4.3 System Integration Testing

The integration of the full system was tested to verify smooth communication and
process flow.

●​ ESP32 & Node-RED Integration: The MQTT connection to confirm


commands sent from the HMI (Start) were received by the ESP32 was tested.
●​ HMI Data Display: Real-time data (current weight, packet count) published by
the ESP32 was displayed on the Node-RED dashboard with a mean latency of
< 100ms.
●​ End-to-End Process Flow: A full system test was conducted. The process flow
in total from a user pressing 'Start' on the Node-RED dashboard to a bag being

17
Automated Dry Fruits Packaging System​ ​ 2025-2026

dispensed, opened, filled, weighed, and sealed took on average 67 seconds per
packet.

4.4 Final Results and Performance Analysis

Quantitative data was collected from 25 test runs to validate the system's
performance.

●​ Performance Metrics: Table III displays the ultimate performance, as


measured, for the system.
●​ Data Analysis: (e.g., “The system met an accuracy of ±10% of grams for
weighing; which is consistent with the target tolerance. The user interface
(HMI) via Node-RED was very easy to use with new users able to operate the
system within 2 minutes or less based upon instruction.”)

4.5 Results and Observations

Table III: Cycle Time Analysis

Stage Description Cycle Time (s) Remarks


Dispense Bag ESP32 commands a 10 Consistent operation;
feeder mechanism to limited by mechanical
push a bag into pusher travel speed.
position.
Bag Opening Pneumatic solenoid 7 Varies based on air
actuation and cylinder pressure stabilization
extension & retraction
Dry Fruits Loading Vibratory feeder active 30 Longest stage; requires
and Data Logging until 90% of the target mechanical damping
weight is achieved; for improvement.
Verification of weight
Heat Sealing 20 Fixed time required for
Heat sealer activation,
robust, reliable seal
fixed dwell time, and
integrity.
cooling phase.

18
Automated Dry Fruits Packaging System​ ​ 2025-2026

Table IV: Accuracy Evaluation

Parameter Target Achieved Percentage Error


Total Test Runs N/A 25 N/A
Opening Success Rate 100% 76% (19/25) 24%
Weighing Accuracy​ ±8% ±10% 25%
(Tolerance)
Total Average Cycle 60 seconds 67 seconds 11%
Time

Figure IV: Weighing Accuracy

19
Automated Dry Fruits Packaging System​ ​ 2025-2026

Chapter 5
Advantages, Limitations, & Applications

5.1 Advantages

1.​ Extremely Low Cost: The system is only a fraction of the cost of a traditional
PLC/HMI system, using an ESP32 microcontroller and Node-RED software,
which is also open-source.
2.​ Accessible Web-Based HMI: The fact that the Node-RED dashboard is
accessible on any device (phone, tablet, PC) with a web browser on the local
network makes it very easy to use and accessible for everyone.
3.​ Wireless & IoT: The ESP32 has built-in Wi-Fi, creating a clean, wireless
install and allows you to easily connect with other IoT services (e.g.,
cloud-based data logging, email alerts).
4.​ Rapid Prototyping and Flexibility: It is quick and easy to change the control
logic (in Arduino IDE) and the HMI (in Node-RED), enabling updates or
process changes on the fly.
5.​ Empower Small Businesses: The very low cost and easy-to-use interface lends
itself to SHGs and rural industries, lowering the barrier of entry to enter
automated scenarios.

5.2 Limitations

1.​ Product Type Limitation: The current design is best suited for dry granular
materials. Mechanical changes would be needed if moving to liquids or sticky
products.
2.​ Manual Loading: The bulk hopper still needs to be manually refilled with
dried fruit.
3.​ Network Dependency: The real-time monitoring from the HMI is based on a
stable local Wi-Fi network (though the ESP32 can be programmed to take
control of the process).
4.​ Not "Industrially Hardened": The ESP32 is a development board, not a rated
IPC standard PLC. In a factory where there is a lot of vibration and EMI, it

20
Automated Dry Fruits Packaging System​ ​ 2025-2026

would need proper power supplies and electrical shielding.

5.3 Applications

1.​ Food Processing Industries: Small to medium-sized food users of packaging


nuts, dry fruits, pulses, seeds, and grains.
2.​ Women Self-Help Groups (SHGs): Enables communities to develop local
packaging businesses, thus increasing women's entrepreneurship.
3.​ Agriculture-based Startups: A great opportunity for food-based start-ups,
allowing low-cost, semi-automated packaging.
4.​ Educational and Training Institutions: An innovative demonstration system for
IoT, embedded systems, and HMI design.

21
Automated Dry Fruits Packaging System​ ​ 2025-2026

Chapter 6
Conclusion and Future Scope
6.1 Conclusion

This project ultimately achieved its goal by developing the "Automated Dried Fruit
Packaging System," which represents a low-cost, scalable, IoT-based solution for
small-scale operations. The system enables weighing, filling, and sealing of dried fruit
packages with an ESP32 microcontroller supporting real-time control to run the
machine, and Node-RED providing a web-based human-machine interface (HMI).

Final testing established the system’s accuracy (±10% of grams) and average
efficiency (duration of 67 seconds) per packet and validates that low-cost IoT
technology can be reliably developed as a means to conduct work typically reserved
for expensive industrial hardware. The Node-RED web interface lowers the technical
barrier for users, helping to achieve the goal of enabling self-help groups (SHG). This
project serves as an overall proof-of-concept show that automation at a reasonable
cost is practical, effective, and efficient.

6.2 Future Scope

The IoT-based architecture of this project opens up numerous avenues for future
enhancement:

●​ Cloud Data Logging and Analytics: You could program the ESP32 to send
production data (i.e. packets per hour, total weight packaged) directly to a
cloud database (e.g. Google Firebase or AWS IoT) which could then be
analyzed productively.
●​ Remote Monitoring: The Node-RED dashboard could be securely exposed to
the internet, allowing a manager to remotely observe the status of the system
from anywhere.
●​ Fully Automate Material Feeding: The project could integrate a level sensor in
the main hopper and a motor to automate the refilling process.

22
Automated Dry Fruits Packaging System​ ​ 2025-2026

●​ Machine Vision for Quality Control: A camera (e.g. ESP32-CAM) could be


added to inspect the dried fruits for quality or to ensure that the bag is
correctly placed before filling.
●​ Predictive Maintenance: By recording motor run-time and other metrics, it
could send alerts for scheduled maintenance minimizing downtime.

This concludes the report on the Automated Dried Fruit Packaging System. The
system represents a promising advancement in making automation accessible to
small-scale industries and self-help groups, driving both technological adoption and
local economic growth.

23
Automated Dry Fruits Packaging System​ ​ 2025-2026

References

[1] G. Arvindaraj, B. Manikandan, R. Rokesh, and M. Abhinaya, "AI-automated


system for ingredient planner using machine learning algorithms," in Proc. IEEE
Xplore, Karpagam Academy of Higher Education, Coimbatore, India.

[2] D. Elkhattat and M. Medhat, "Using technology in smart and intelligent food
packages as a communicational tool with consumers," in Proc. IEEE Xplore, College
of Mass Communication, Ajman University, Ajman, UAE.

[3] T. Abekoon et al., "A comprehensive review to evaluate the synergy of intelligent
food packaging with modern food technology and artificial intelligence field,"
Discover Sustainability, vol. 5, no. 160, 2024.

[4] B. Muhammedali, M. Z. Abdullah, and M. N. Mohd Azemi, "Food handling and


packaging using computer vision and robot," in Proc. IEEE Xplore, Universiti Sains
Malaysia, Penang, Malaysia.

[5] Z. Meng, M. He, K. Zhou, J. Hou, and T. Li, "Design and test of a sorting device
based on machine vision," in Proc. IEEE Xplore, College of Mechanical and
Electronic Engineering, Shandong Agricultural University, Tai’an, China.

[6] T. Dong, "Research on the application of mechanical automation in the field of


food packaging," in Proc. IEEE Xplore, Chifeng Industry Vocational Technology
College, Chifeng, Inner Mongolia, China.

[7] R. Raffik, C. Subash, R. P. Roshan, and K. B. Sanjeev, "Role of robotics and


automation in food industries: An overview," in Proc. IEEE Xplore, Kumaraguru
College of Technology, Coimbatore, India.

[8] S. Marjudi, R. Sulaiman, M. F. Mohamad Amran, S. Kahar, and K. A. Abdullah,


"A study on CAD systems for food packaging," in Proc. IEEE Xplore, Universiti
Kebangsaan Malaysia and Universiti Selangor, Malaysia.

[9] A. Yusoff, R. Sulaiman, and S. Marjudi, "Framework of CAD system in food


packaging for Malaysian SMEs," in Proc. IEEE Xplore, Universiti Kebangsaan
Malaysia, Malaysia.

24
Automated Dry Fruits Packaging System​ ​ 2025-2026

[10] C. Gonzalez Viejo, P. A. Gurr, F. R. Dunshea, and S. Fuentes, "Novel packaging


development, assessment and authentication using smart technologies, non-invasive
biometric sensory tools and artificial intelligence," in Food Packaging: The Smarter
Way, A. K. Shukla, Ed. Singapore: Springer, 2022, pp. 45–68.

[11] A. R. Bhatlawande, P. U. Ghatge, G. U. Shinde, R. K. Anushree, and S. D. Patil,


"Unlocking the future of smart food packaging: biosensors, IoT, and nano materials,"
Food Sci. Biotechnol., vol. 33, pp. 1075–1091, Apr. 2024.

[12] A. Nayak and D. Dutta, "A comprehensive review on CRISPR and artificial
intelligence based emerging food packaging technology to ensure 'safe food',"
Sustainable Food Technol., vol. 1, pp. 641–657, 2023.

[13] N. Nirmal, P. Vashisht, S. Sharma, and M. K. Bansal, "Enhancement in the active


food packaging system through metal-based nanomaterials: a review of innovations,
challenges, and future directions," Discover Food, vol. 4, no. 108, 2024.

[14] P. Puligundla, J. Jung, and S. Ko, "Carbon dioxide sensors for intelligent food
packaging applications," Food Control, vol. 25, no. 1, pp. 328–333, Jan. 2012.

[15] J. Wyrwa and A. Barska, "Innovations in the food packaging market: Active
packaging," Eur. Food Res. Technol., vol. 243, pp. 1681–1692, 2017.

25
Automated Dry Fruits Packaging System​ ​ 2025-2026

Appendix A: ESP32 Code


#include <WiFi.h>
#include <PubSubClient.h>

const char* ssid = "LAPTOP";


const char* password = "12345678";
const char* mqtt_server = "[Link]";

WiFiClient espClient;
PubSubClient client(espClient);

//Inputs
#define MagazineLimitSwitch1 21
#define IrSensor1 22
#define IrSensor2 23

//Outputs
#define MagazineMotor1 4
#define MagazineMotor2 5
#define Conveyor1Motor 13
#define Conveyor2Motor 14
#define PistonSolenoid 16
#define VacuumSolenoid 17

unsigned long lastPublishTime = 0;


const unsigned long publishInterval = 5000;

void initialize()
{
digitalWrite(MagazineMotor1,LOW);
digitalWrite(MagazineMotor2,LOW);
digitalWrite(Conveyor1Motor,LOW);
digitalWrite(Conveyor2Motor,LOW);
digitalWrite(PistonSolenoid,LOW);
digitalWrite(VacuumSolenoid,LOW);
}

void setup_wifi()
{
delay(10);
[Link]();
[Link]("Connecting to ");

26
Automated Dry Fruits Packaging System​ ​ 2025-2026

[Link](ssid);

[Link](WIFI_STA);
[Link](ssid, password);

while ([Link]() != WL_CONNECTED)


{
delay(500);
[Link](".");
}

randomSeed(micros());

[Link]("");
[Link]("WiFi connected");
[Link]("IP address: ");
[Link]([Link]());
}

void callback(char* topic, byte* payload, unsigned int length)


{
String message = "";
for (int i = 0; i < length; i++)
{
message += (char)payload[i];
}

[Link](message);

if (strcmp(topic, "bag_dispense") == 0)
{
if(message == "true")
{
BagDispense();
}
}
}

void reconnect()
{
while (![Link]())
{
[Link]("Attempting MQTT connection...");
String clientId = "ESP32Client-";
clientId += String(random(0xffff), HEX);
if ([Link](clientId.c_str()))
{
[Link]("connected");

27
Automated Dry Fruits Packaging System​ ​ 2025-2026

[Link]("bag_dispense");
}
else
{
[Link]("failed, rc=");
[Link]([Link]());
[Link](" try again in 5 seconds");
delay(5000);
}
}
}

void BagDispense()
{
if(digitalRead(MagazineLimitSwitch1) == HIGH)
{
digitalWrite(MagazineMotor1,HIGH);
[Link]("M1 High");
digitalWrite(MagazineMotor2,HIGH);
[Link]("M2 High");
digitalWrite(Conveyor1Motor,HIGH);
[Link]("C1 High");
delay(10000);
digitalWrite(MagazineMotor1,LOW);
[Link]("M1 Low");
delay(10000);
digitalWrite(MagazineMotor2,LOW);
[Link]("M2 Low");
}
else
{
[Link]("No Bag");
}
}

void BagDispenserStatus()
{
static int lastState = -1;
int state1 = digitalRead(MagazineLimitSwitch1);
if (state1 != lastState)
{
lastState = state1;
if ([Link]())
{
[Link]("BagDispenserStatus", state1 == HIGH ? "1" : "0");
}
else
{

28
Automated Dry Fruits Packaging System​ ​ 2025-2026

[Link]("Client not connected — message not sent.");


}
}
}

void setup()
{
pinMode(MagazineLimitSwitch1, INPUT);
pinMode(IrSensor1, INPUT);
pinMode(IrSensor2, INPUT);

pinMode(MagazineMotor1, OUTPUT);
pinMode(MagazineMotor2, OUTPUT);
pinMode(MagazineMotor2,OUTPUT);
pinMode(Conveyor1Motor,OUTPUT);
pinMode(Conveyor2Motor,OUTPUT);
pinMode(PistonSolenoid,OUTPUT);
pinMode(VacuumSolenoid,OUTPUT);

initialize();

[Link](115200);
setup_wifi();
[Link](mqtt_server, 1884);
[Link](callback);
}

void loop()
{
if (![Link]())
{
reconnect();
}
[Link]();

if(digitalRead(IrSensor2) == 0)
{
[Link]("Ir sensor 1 is high.");
digitalWrite(Conveyor1Motor, LOW);
delay(1000);
digitalWrite(PistonSolenoid, HIGH);
delay(1000);
digitalWrite(VacuumSolenoid, HIGH);
delay(2000);
digitalWrite(PistonSolenoid, LOW);
delay(5000);
digitalWrite(VacuumSolenoid, LOW);
delay(1000);

29
Automated Dry Fruits Packaging System​ ​ 2025-2026

digitalWrite(Conveyor1Motor, HIGH);
digitalWrite(Conveyor2Motor, HIGH);

if(digitalRead(IrSensor1) == 1)
{
[Link]("Ir sensor 2 is low.");
digitalWrite(Conveyor1Motor, LOW);
digitalWrite(Conveyor2Motor, LOW);
delay(1000);
digitalWrite(PistonSolenoid, HIGH);
delay(1000);
digitalWrite(VacuumSolenoid, HIGH);
delay(2000);
digitalWrite(PistonSolenoid, LOW);
delay(5000);
digitalWrite(VacuumSolenoid, LOW);
delay(1000);
digitalWrite(Conveyor2Motor, HIGH);
}
}
else if(digitalRead(IrSensor2) == 1)
{
delay(5000);
digitalWrite(Conveyor2Motor,LOW);
}

unsigned long currentTime = millis();


if (currentTime - lastPublishTime >= publishInterval)
{
lastPublishTime = currentTime;
BagDispenserStatus(); // Publish every 1 second
}
}

ESP2
#include <WiFi.h>
#include <PubSubClient.h>
#include <ESP32Servo.h>
#include <HX711.h>

const char* ssid = "LAPTOP";


const char* password = "12345678";
const char* mqtt_server = "[Link]";

WiFiClient espClient;
PubSubClient client(espClient);
HX711 scale;

30
Automated Dry Fruits Packaging System​ ​ 2025-2026

Servo servo1, servo2, servo3;

//Inputs
#define IrSensor1 22
#define IrSensor2 23

//Outputs
#define Conveyor1Motor 5
#define Pinion1 13
#define Pinion1Rev 14
#define Pinion2 17
#define Pinion2Rev 18
#define Pinion3 19
#define Pinion3Rev 21

//Outputs
#define SERVO_1 27
#define SERVO_2 32
#define SERVO_3 33

const int LOADCELL_DOUT_PIN = 16;


const int LOADCELL_SCK_PIN = 4;
int Flap1Status = 0;
int Flap2Status = 0;
int Flap3Status = 0;
float SetWeight = 0.00;

void setup_wifi()
{
delay(10);
[Link]();
[Link]("Connecting to ");
[Link](ssid);

[Link](WIFI_STA);
[Link](ssid, password);

while ([Link]() != WL_CONNECTED)


{
delay(500);
[Link](".");
}

randomSeed(micros());

31
Automated Dry Fruits Packaging System​ ​ 2025-2026

[Link]("");
[Link]("WiFi connected");
[Link]("IP address: ");
[Link]([Link]());
}

void callback(char* topic, byte* payload, unsigned int length)


{
String message = "";
for (int i = 0; i < length; i++)
{
message += (char)payload[i];
}

if (strcmp(topic, "Weight") == 0)
{
if ( message = "100")
{
SetWeight = 100.00;
}
if ( message = "250")
{
SetWeight = 250.00;
}
if ( message = "500")
{
SetWeight = 500.00;
}
else
{
SetWeight = 0.00;
}
}

if (strcmp(topic, "Flap1") == 0)
{
if ( message == "1")
{
Flap1Status = 1;
}
else
{
Flap1Status = 0;
}
}

if (strcmp(topic, "Flap2") == 0)
{
if ( message == "1")

32
Automated Dry Fruits Packaging System​ ​ 2025-2026

{
Flap2Status = 1;
}
else
{
Flap2Status = 0;
}
}

if (strcmp(topic, "Flap3") == 0)
{
if ( message == "1")
{
Flap3Status = 1;
}
else
{
Flap3Status = 0;
}
}
}

void reconnect()
{
while (![Link]())
{
[Link]("Attempting MQTT connection...");
String clientId = "ESP32Client-";
clientId += String(random(0xffff), HEX);
if ([Link](clientId.c_str()))
{
[Link]("connected");
[Link]("inTopic");
}
else
{
[Link]("failed, rc=");
[Link]([Link]());
[Link](" try again in 5 seconds");
delay(5000);
}
}
}

void publishLoadCellReading(float loadcellvalue)


{
const char* topic = "LoadCellReading";

33
Automated Dry Fruits Packaging System​ ​ 2025-2026

char message[10];
sprintf(message, "%.2f", reading);

if ([Link]())
{
[Link](topic, message);
}
else
{
[Link]("Client not connected — message not sent.");
}
}

void IrSensor1Status()
{
static int lastState = -1;
int state1 = digitalRead(MagazineLimitSwitch1);
if (state1 != lastState)
{
lastState = state1;
if ([Link]())
{
[Link]("IrSensor1Status", state1 == HIGH ? "1" : "0");
}
else
{
[Link]("Client not connected — message not sent.");
}
}
}

void setup()
{
[Link](115200);
setup_wifi();
[Link](mqtt_server, 1884);
[Link](callback);
[Link](LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);

[Link](50);
[Link](SERVO_1, 500, 2400);
[Link](50);
[Link](SERVO_2, 500, 2400);
[Link](50);
[Link](SERVO_3, 500, 2400);

[Link](0);
[Link](0);

34
Automated Dry Fruits Packaging System​ ​ 2025-2026

[Link](0);
}

void loop()
{
if (![Link]())
{
reconnect();
}
[Link]();

if (digitalRead(IrSensor1) == 0)
{
[Link]();
if (scale.is_ready())
{
if(Flap1Status == 1)
{
[Link](90);
}
if(Flap2Status == 1)
{
[Link](90);
}
if(Flap3Status == 1)
{
[Link](90);
}

while(CurrentWeight != SetWeight)
{
float reading = scale.get_units(5);
if (reading = (SetWeight-10))
{
if(Flap1Status == 1)
{
[Link](45);
}
if(Flap2Status == 1)
{
[Link](45);
}
if(Flap3Status == 1)
{
[Link](45);
}
}
}

35
Automated Dry Fruits Packaging System​ ​ 2025-2026

if (CurrentWeight == SetWeight)
{
if(Flap1Status == 1)
{
[Link](0);
}
if(Flap2Status == 1)
{
[Link](0);
}
if(Flap3Status == 1)
{
[Link](0);
}
}
}
}
}

36
Automated Dry Fruits Packaging System​ ​ 2025-2026

Appendix B: Load Cell Calibration


#include "HX711.h"

// HX711 circuit wiring


const int LOADCELL_DOUT_PIN = 16;
const int LOADCELL_SCK_PIN = 4;

HX711 scale;

void setup() {
[Link](57600);
[Link](LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
}

void loop() {

if (scale.is_ready()) {
scale.set_scale();
[Link]("Tare... remove any weights from the scale.");
delay(5000);
[Link]();
[Link]("Tare done...");
[Link]("Place a known weight on the scale...");
delay(5000);
long reading = scale.get_units(10);
[Link]("Result: ");
[Link](reading);
}
else {
[Link]("HX711 not found.");
}
delay(1000);
}

37
Automated Dry Fruits Packaging System​ ​ 2025-2026

Appendix C: List of Components


1.​ Hardware
2.​ Pneumatic Fittings
3.​ Gear Belt
4.​ Bearing
5.​ Spring Assortment Set
6.​ Anti Slip Mat for Conveyor Belt
7.​ DC 24V 5A 120W Switching Power Supply
8.​ Kraft Paper Bags (11x17 cm for 100g, 12x20 cm for 250g, 15x22 cm for
500g)
9.​ 16x20 inch MDF Board Wood Sheet
10.​2 position 5 way Solenoid
11.​Lathe bar
12.​Acrylic Sheet
13.​2020H aluminium extrusions
14.​ZK08 Vacuum Generator
15.​MAL 16X80 Pneumatic Cylinder
16.​Suction cups
17.​Load Cell Sensor
18.​Load Cell Amplifier Breakout Board
19.​IR Sensor Module
20.​1 position 2 way Solenoid
21.​Limit Switch
22.​Lead Screw
23.​Servo Motors
24.​ESP32

38
Automated Dry Fruits Packaging System​ ​ 2025-2026

39

You might also like