## 3 Materials and Methods
Additionally, it enhances sustainability practices crucial for global market competitiveness and has significant potential to boost Pakistan's economy, given the textile industry's major contribution to GDP and employment. While tailored for Pakistan's textile sector, the system's core technologies and principles, such as real-time data analytics, smart sensors, and automation, are adaptable to other industries, making it scalable and broadly applicable with suitable modifications. 1. Transmitting side  
The monitoring station serves as the central hub for data collection and processing. It receives data from the physical parameter sensors and transmits them to the transmitter for further processing. The transmitter receives data from the monitoring station and prepares them for transmission to the gateway. It performs signal conditioning and conversion from analog to digital formats. Signal conditioning and analog-to-digital conversion (ADC) ensure that analog signals are accurately transformed into digital data for analysis and processing. Signal conditioning involves amplifying the input signal to match the ADC's input range, filtering to improve the signal-to-noise ratio (SNR) and enhance data integrity by processing only relevant signal components and using PCB-mount transformers for isolation to protect hardware from high voltages or currents. It also includes level shifting and attenuation to keep the signal within the ADC's acceptable range and free from noise. The ADC then samples the conditioned signal at discrete intervals, quantizes the amplitude into discrete levels based on the ADC's resolution, and encodes it into a digital format. Proper signal conditioning is crucial, as it enhances the SNR and prevents data distortion, while appropriate sampling and resolution ensure an accurate digital representation. Higher resolution and appropriate sampling rates are essential for high-fidelity signal conversion. These processes are vital for maintaining data integrity and compatibility with digital systems, enabling reliable analysis and processing. The gateway serves as the interface between the local monitoring system and the internet. It receives data from the transmitter and transmits it to the internet for remote access and analysis. On the transmitting side, sensors are installed to sense various physical parameters, including temperature, humidity, light, location, height, motion, force, touch, heat, speed, angular velocity, and displacement. Figure 4: Visualizing the architecture of a revolutionary system. These sensors are connected to the Arduino mega 2560 controller board. The input from sensors is passed through the ADC (analog-to-digital conversion), signal conditioning, and other algorithms defined in the programming. The built-in ADC in the Arduino mega has a resolution of 10 bits. An Arduino Ethernet shield is used to transfer the collected data to the PTCL wireless router, as shown in Figure 4. With the help of this router, data are transmitted wirelessly to the receiver side. The AN1020-25 PTCL BroadBand Wi-Fi router is used as a transmitter. 2. Receiving side  
On the receiving side, there is the workstation on which the data from different sensors is obtained through Wi-Fi. By transmitting data to the internet, the proposed system allows stakeholders to remotely access and analyze real-time environmental data from the textile manufacturing facility. The designed framework is shown in Figure 5. This enables proactive monitoring, timely intervention, and optimization of manufacturing processes for improved efficiency and sustainability. The real-time data are then interfaced with MATLAB and shown on the graphical user interface (GUI). The GUI is designed to be user-friendly, allowing users to interact with the system through graphical elements and visual indicators. The data received are aggregated and analyzed in MATLAB. The processed data help in detecting deviations from normal operating conditions, predicting equipment failures, and generating alters in case the output limit is exceeded. 3.