## 3 Materials and Methods
### Weather Station Design and Development  
The documents from the World Meteorological Organization have been followed to design a robust and accurate weather station as much as possible. There is a category called Automated Weather Stations (AWSs), and the current proposal fits into the multi-purpose AWS category. The main feature of these devices is that they measure, store, and transmit the data collected automatically [14]. Additionally, they must have at least three parts:  
Figure 2: The general methodology. 1. Sensing instruments. 2. Local modem or interface for a network connection. 3. Central processing unit. Nevertheless, some other parts were added to the project to enhance their usability and performance. The features included were:  
1. Power Sources. 2. Human-Machine Interface. In summary, the five modules are shown in Figure 3. They are handled by a microcontroller unit (MCU); in this case, the STM32F103C8T6 was implemented. For the sensing instrument, three sensors were chosen and are shown in Table 2 (these sensors can measure the variables within the conventional ranges):  
For versatility purposes, three different power sources were chosen so the station could be placed in scenarios with several conditions:  
* 100 W Solar Panel
* Li-ion Internal Battery
* AC Plug connection  
Two storage options are available for the storage unit: local and remote. A 32 GB SD card was added to the system for the first option. Since CSV is a flexible and compatible format, all the measurement values and timestamps were stored in this file. On the other hand, the remote storage was managed through the modem ESP8266 with WiFi integrated; the values were sent to the ThingSpeak platform; this service stores each variable (i.e., temperature, relative humidity, PM 2.5) in a single channel, and the values collected can be exported via an API, or in CSV format. In addition, since this project aims to be open source, all the channels are open to the public. Table 3 shows the order in which the columns with the values are stored. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Sensor** & **Variables Measured** & **Unit** & **Accuracy** & **Response Time** \\ \hline \multirow{2}{*}{BME280 [30]} & Air Temperature & \({}^{\circ}\)C & \(\pm\)0.5 \({}^{\circ}\)C & \\  & Relative Humidity & \% RH & \(\pm\)3\% RH & 1 s \\  & Atmospheric Pressure & hPa & \(\pm\)1 hPa & \\ \hline SCD30 [31] & CO\({}_{2}\) Concentration & ppm & \(\pm\)30 ppm & \textless{}20 s \\ \hline \multirow{2}{*}{PMS5003 [32]} & Particulate Matter & \multirow{2}{*}{\(\mu\)g/m\({}^{3}\)} & \multirow{2}{*}{\(\pm\)10\%} & \multirow{2}{*}{\(<\)10 s} \\  & Concentration & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Sensors incorporated in the weather station. Figure 3: Modules for the open-source weather station (OSWS). Finally, a human-machine interface was implemented so users could operate the OSWS efficiently. The elements included are:  
* Display: to show the measurements on live. * Display the on/off button. * Interval selector button: to configure the measurement interval time. * LED indicators: to indicate the device's status. * General on/off button. Additionally, some other considerations were considered while designing the OSWS. Table 4 describes the solutions applied to accomplish the WMO recommendations. The forecast process is the final stage of the methodology shown in the diagram in Figure 3. This part is described in detail in Figure 4.