Automated Dried Fruits Packaging System
Automated Dried Fruits Packaging System
(Deemed-to-be University)
(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.
Date:
Place: Mumbai
ACKNOWLEDGEMENT
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.
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
I Block Diagram 9
II Flow Diagram 10
IV Weighing Accuracy 19
List of tables
Table No Name of the Table Page No
Chapter 1
Introduction
1.1Background of the project topic
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.3Problem statement
1.4Salient contribution
This project offers a few important things to the world of small-scale food processing:
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.
3
Automated Dry Fruits Packaging System 2025-2026
4
Automated Dry Fruits Packaging System 2025-2026
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.
7
Automated Dry Fruits Packaging System 2025-2026
Component Description
8
Automated Dry Fruits Packaging System 2025-2026
3.4 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
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.
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:
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.
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.
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.
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:
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
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).
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
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.
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.
The integration of the full system was tested to verify smooth communication and
process flow.
17
Automated Dry Fruits Packaging System 2025-2026
dispensed, opened, filled, weighed, and sealed took on average 67 seconds per
packet.
Quantitative data was collected from 25 test runs to validate the system's
performance.
18
Automated Dry Fruits Packaging System 2025-2026
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
5.3 Applications
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.
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
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
[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.
[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.
24
Automated Dry Fruits Packaging System 2025-2026
[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.
[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
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
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);
randomSeed(micros());
[Link]("");
[Link]("WiFi connected");
[Link]("IP address: ");
[Link]([Link]());
}
[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
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);
}
ESP2
#include <WiFi.h>
#include <PubSubClient.h>
#include <ESP32Servo.h>
#include <HX711.h>
WiFiClient espClient;
PubSubClient client(espClient);
HX711 scale;
30
Automated Dry Fruits Packaging System 2025-2026
//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
void setup_wifi()
{
delay(10);
[Link]();
[Link]("Connecting to ");
[Link](ssid);
[Link](WIFI_STA);
[Link](ssid, password);
randomSeed(micros());
31
Automated Dry Fruits Packaging System 2025-2026
[Link]("");
[Link]("WiFi connected");
[Link]("IP address: ");
[Link]([Link]());
}
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);
}
}
}
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
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
38
Automated Dry Fruits Packaging System 2025-2026
39