This week, the project development continued with basic coding tests for each component that interfaces with the microcontroller, including input sensors and output components such as the OLED display, LED, buzzer, GSM, and DC fan for the air purifier system. For the sensor components, calibration was necessary to ensure accurate data readings. Reference coding was explored from examples within the Arduino IDE and through web browsing to determine how to obtain the correct values for each sensor used. After conducting several tests, only a few components functioned properly. However, components such as the OLED display, GSM module, MQ135 air quality sensor, and LM393 sound sensor experienced some issues with their outputs.
Regarding the GSM module, the test to send an SMS message to a specified number in the code was unsuccessful, despite the GSM signal integrated with the microcontroller indicating that the SMS was being sent. However, it still needs to be received by the specified number. As for the OLED display problem, initially, I used a 1.3-inch I2C OLED display, but it didn't display as expected. However, I identified that the OLED display version used a different driver than the commonly known and widely used SSD1306-driven OLED displays. The 1.3-inch OLED display used the SH1106 driver, while the opposite version used the SSD1306 driver and had a size of 0.96 inches. Therefore, I searched for the library for that particular OLED display version online since it wasn't available in the Arduino IDE. After obtaining the library and testing the example code for that OLED display version, the output still couldn't be displayed. Consequently, I switched to the slightly smaller 0.96-inch version, and the output from this version was successfully displayed as expected.
For the MQ135 and LM393 tests, output components such as LEDs and the OLED display were used to visualize the readings and status measured by the sensors. The test results showed that the readings from both sensors were unstable, inaccurate, and somewhat sensitive to the surrounding environment, even though the potentiometer on both sensors was set to be less sensitive. The main issue with the LM393 was its inability to indicate specific sound strength values it measured. At the same time, the MQ135 couldn't identify the type of gas being measured since it can detect various hazardous gases. After researching these problems, I found that the MQ135 sensor needs to be preheated for 24 to 48 hours in a clean-air environment before use because it's crucial to stabilize the temperature and establish reliable guidelines, resulting in more accurate and consistent gas detection. As for the LM393, obtaining good strength values can still be achieved even though the sensor cannot. Here, coding plays a role, as the analog output measured by the sensor is read by the microcontroller, and the threshold needs to be manually set according to the project's requirements. The output will display good values as programmed, although the readings may need to be more precise.
Also, this week, a workshop 2 sessions was conducted online via Microsoft Teams on Wednesday at 2:30 PM. The session was held to provide briefing and guidance on thesis writing from Chapter 1 to Chapter 3.