# Monitoring Perishable Commodities Using Cellular IoT:
## 2 Materials and Methods
### Hardware Architecture
#### 2.2.2 PCB Design
Furthermore, it communicates with the 8 MB W25Q64 from Winbond (Keya Road, 8, Taichung, Taiwan) [65] flash memory. The microcontroller communicates via UART with the SIM7000G communication module to configure it via AT commands and send the data. The SIM7000G manages the wireless communication part, communicating with the SIM card and sending the  
Figure 2: Block diagram of the operation of the instrumentation system. data through the operator. Finally, it has the GSM/GPRS/LTE and GNSS antennas to send data by radiofrequency and to register its current position, respectively, through external antennas. Finally, the components were optimally placed to obtain a PCB of a very small size, which is displayed in Figure 3. To achieve an efficient, compact design, the components on the PCB were positioned with a focus on minimizing the overall footprint while maintaining optimal performance and functionality. Each component was strategically placed to keep track lengths short, reducing signal interference and power losses, and allowing the layout to remain as compact as possible. The layout was organized to prioritize function-specific areas. For instance, essential interface components, such as the push buttons, antenna connectors, USB connector, main switch and battery connector, were placed along the board's perimeter to maximize accessibility. The microcontroller and communication module, crucial elements for data processing and transmission, were positioned on the lower part of the PCB alongside the SIM card slot, ensuring minimal trace lengths between these communication-critical components and their supporting elements, such as flash memory, oscillators and transistors. Additionally, the USB gateway to UART was positioned directly under the USB connector to streamline data transmission paths, while the power supply and filtering stage were situated near the main switch to enable efficient power distribution throughout the board. Sensor placement was equally considered for optimal performance. Sensors measuring environmental parameters, such as CO\({}_{2}\) concentration, temperature and humidity, were placed in an isolated area on the upper left side of the PCB. This isolated area was designed without ground planes to prevent heat transfer from other components, allowing these sensors to maintain sensitivity to ambient environmental conditions. In addition, the accelerometer was located centrally to maximize its responsiveness to vibrations from all directions, while the luxmeter was placed in a corner with no surrounding obstructions to allow direct exposure to light. Furthermore, essential capacitors for filtering the power supply were located at the bottom of the PCB. These capacitors serve critical components such as the ESP32, SIM/000G, CP2102 and sensors, ensuring stable power and reducing noise, all while optimizing the PCB's available space. Additional transistors and diodes were positioned near these filtering capacitors to create a clean and compact power management layout. This precise arrangement of components, connectors and functional areas ensured a reliable, compact solution ideal for real-time environmental monitoring in any space. The design and manufacture of a PLA encapsulation by additive manufacturing with Fused Deposition Modeling (FDM) 3D printing technology to contain it and protect it from external conditions was also carried out. Figure 3: Datalogger 3D view of the PCB; 79 \(\times\) 45 mm.