In septic tanks, various types of toxic and non-toxic gases are found such as Carbon-di-Oxide (CO2), Carbon-mono-Oxide (CO), Hydrogen Sulfide (H2S), Methane (CH4), and so on. In this paper, a toxic gas detection system for a septic tank has been presented, where MQ-135, MQ-136, MQ-4, and MQ-7 sensors are employed for combined detection of CO2, H2S, CH4, and CO gases respectively. With the change of concentration of gases, the sensor resistance changes, and accordingly an analog voltage is produced across the sensor. The analog voltages from the sensors are fed to a microcontroller, which reads the values and converts the values into gas concentration in PPM (parts per million). The PPM values for all four gases are displayed on an LCD, where two levels are assigned as “Safe” and “Danger” based on the concentration of each gas. “Safe” status means the concentration of gas is not harmful and “Danger” status means the concentration of gas is harmful. A buzzer will give an alarm when the gas concentration status becomes “Danger”. Furthermore, a Bluetooth device is interfaced with the microcontroller for transferring the gas concentration data to a smartphone. For the Smartphone, application software has been developed to monitor the concentration of each toxic gas. The prototype system has been developed and tested which gives satisfactory results. It is supposed to be a helpful and cost-effective system for cleaners working in septic tanks.
A septic tank is an underground chamber made of concrete, fiberglass or plastic (Septic tank, 2020) which is a submerged sedimentation tank utilized for the fun-damental treatment of homegrown wastewater streams with the cycle of natural decay and drainage shown in Fig 1 (Water Disposal Hub, 2016). It is worked with on site wastewater treatment elements, for example, bio-filters or oxygen-consuming frameworks including misleadingly constrained air circulation (Sep-tic tank, 2020; Zhang et al., 2011). Generally, the septic tank is responsible to hold the wastewater sufficiently long to permit solids to settle down to the base shaping exude, while the oil and oil buoy to the top as a layer (USEPA, 2021; Saju et al., 2020; Iyyanki et al., 2017).
Sometimes septic tank can be blocked with slop and scum which can stop functioning be-cause of breakage and prominent to a costly systemic collapse. So, the tank should be cleaned, checked, and pumped regu-larly (How to clean a Septic Tank, 2021). But a few sorts of gases such as methane, hydrogen sulfide, carbon monoxide, and carbon dioxide, etc. are avail-able in the septic tank which can be destructive to people especially cleaners, and can bring about an explosion. Even they can cause organ harm, lung damage, adverse symptoms, or even death (Healthline, 2019; Safeopedia, 2018). The primary sign of sewage gases in a zone could be observed with the smell of spoiled eggs (Safeopedia, 2018).
Fig 1: A schematic of septic tank system (Water Disposal Hub, 2016).
The indications also include loss of smell, mouth, throat, and lung bothering, eye disturbance and pink eye, seizures, extreme lethargies, sometimes death (Healthline, 2019). A septic tank gas exposure occur-red in India where three of four workers passed on and the fourth one felt unconscious and hospitalized (DH news, 2020). Considering all these, gas detection for the septic tank is needed. The detecting technique can be different such as chemical-based detection systems, microcontroller-based detection systems. The microcontroller-based detection technique is more suitable than the chemical-based detection sys-tem because of its versatility, availability of sensors, and wireless facilities to display the results. Various types of microcontroller-based gas detectors are available but maximum of those are designed for specific few gases such as LP gas leakage detection system (Fraiwan et al., 2011; Zinnuraain et al., 2019; Deshmukh et al., 2016; Kodali et al., 2018; Macker et al., 2018; Leavline et al., 2017) and industrial gas leakage detection system (Kulothungan et al., 2019; Xing et al., 2019).
Few numbers of papers were reported on gas detection systems for the septic tank. These systems are highly expensive and are designed for a specific number of gases. Considering the presence of various harmful gases and the inadequacy of a versatile, easy-to-use, and viable detecting system, we understand the needs of a system that can effectively identify gases available in the septic tank. In this paper, a microcontroller-based elect-ronic system is designed to sense and process the data to identify the presence and display the concentration of these gases produced in a septic tank. To show the outputs of the system on the smartphone which is interfaced with a micro-controller through Bluetooth (BT) module, appli-cation software has been developed.
1. Hardware development of the system
A schematic diagram of the gas detection system is shown in Fig 2.
Fig 2: Block diagram of gas detection system for septic tank.
The system consists of three parts: i) input unit, ii) microcontroller unit, and iii) output unit. The input unit consists of four sensors (MQ-136, MQ-135, MQ-4, and MQ-7) which are used for data collection. Various types of toxic and non-toxic gaseous elements are present in septic tanks. The concentration level of these gases can be determined with the electronic-nose sensors which are called MQ sensors (metal oxide semiconductor sensors). The resistivity of the sensors changes with the concentration levels of gases. Higher the concentration means lower the resistivity of the sensors and the output signal is equivalent to PPM values of gas concentration.
All the components are interfaced with a micro-controller to execute the system. ATmega328p is used as a microcontroller that is interfaced with input and output units. It receives data from the input unit and processes these data and transmits them to the output unit for showing results to end-users. To collect data input unit will be inserted into the septic tank with a long stick and gases will be sensed with sensors. The microcontroller will process the sensed data and will give different results and statuses of gases to the output unit considering the threshold value used in the code. Based on the concentration of gases of the septic tank, this device shows the two statuses named “Danger” and “Safe” with the concentration esteems. A septic tank will be considered as “Safe” if there are negligible levels of gases present, otherwise, the tank will be considered as “Danger”. An LCD, a piezo buzzer, a Bluetooth module, and a Smartphone with android application software are used as an output unit to show the result.
Using the Bluetooth module, the microcontroller-based system is interfaced with an app titled “Gas detection” to show the result in a smartphone. The results will be transmitted inside short-range (App-roximately 10 – 100 m) with the Bluetooth module HC-06. Any smartphone with android OS inside that range where the Bluetooth app was installed can get the results and statuses. To get the data, the application software and Bluetooth signal must be kept on. A piezo buzzer is also used to give alarm when the gas level is at a harmful level.
For the assessment of the gas detection system, a prototype of a complete hardware system shown in Fig 3 consisting of a microcontroller unit, sensor unit, a display unit (LCD and mobile device with Bluetooth module), and a piezo buzzer has been developed and tested in the laboratory.
Fig 3: A prototype of complete hardware system.
2. Software development of the system: MIT app inventor version2 is used to develop the android application software which is a cloud-based integrated development environment (IDE) (Wolber et al., 2011). Block programming language is used in this deve-lopment field. This drag-and-drop feature can be used for designing user interface by visual programming and for particular user interface web-based graphical user interface (GUI) builder can be used. The Desi-gner, the Blocks Editor, and Android Emulator are three key units of the App Inventor programming environment (Walter et al., 2015). To develop the and-roid application software, the following components are used from the palette.
i. User interface palette: Four Labels (Label1-Label4) and one List Picker (ListPicker1) are chosen as visible components. These will be used to give demonstrating guidelines, to pick and tap as a button, for showing the results, etc. Two of these labels are used to give some instructions on how to use the device properly for determining gases in the septic tank. Label1 is used to give an app screen name termed as “Gas Detection System”. Label2 is used to give instructions on where to press to get available Bluetooth clients to connect the needed one. At first, it is set as “Press here to connect”. ListPicker1 as a button with a Bluetooth logo is used to connect with Bluetooth clients. Label4 (termed as “Reading”) is used to receive and show the results and status of gases in the septic tank.
ii. Connectivity palette: Bluetooth Client and Clock are non-visible components. For the app, these are key components. Bluetooth Client is needed to interface the software with the Bluetooth module when the Bluetooth signal is kept on. The Clock is needed to control the time for receiving one data after another.
After designing the user interface, the flow chart of the program is developed to write the code for developing the app. The flow chart of the program is shown in Fig 4. At first, Label4 and ListPicker1 are set as an empty list and as a Bluetooth logo respectively. After picking ListPicker1, various Bluetooth addresses and their names will be shown on the app screen. If the Bluetooth address is selected and connected with the system, the app shows the content “Connected” in green color; otherwise, it shows the text “Not Connected” in red color.
A global variable is declared as “global Value” and set equivalent to received data. “Global Value” will be separated at every comma (“,”) of received data. These values will be shown successively in Label4. With the clock, after showing the results, the “global Value” will be cleared and prepared to receive the new data. Press the back button to close the app at any time. The several segments of the program are described below:
Fig 4: Flow chart of the program.
Part 1: This part of the program is shown in Fig 5 and it is written for two basic functions. For closing the app, itself, a user should press the back button of mobile which is coded in the second block. The first block of Fig 5 is written for the user to press and select the BT module. Users will see this ListPicker1 as a Bluetooth logo. After pressing the logo, some BT names and unique addresses can be seen on the screen. Fig 6 shows the result of the first block.
Fig 5: Two functions.
Fig 6: a) Screen of the software default, and b) Screen with the BT addresses.
Part 2: This block is written for utilizing the conne-ction statuses of the software with the gas detection system. After picking the ListPicker1, the program calls BluetoothClient1 to establish a connection with the gas detection system. If the connection of the system is established, then the Label2 text will change to “Connected” in green color. Otherwise, the Label2 text will change to “Not Connected” in red color. This process is illustrated in Fig 7.
Fig 7: Connection status of the gas detection system
Part 3: This is the last part of the program which is contained with two separate segments. Fig 8 shows the program processes for receiving data. The first part of Fig 8 is written to declare the global variable as global Value. The second part is to call the BluetoothClient1 to receive available data and to split the results with the sign (“,”). Clock1 is used to set time intervals to receive data one after another.
Fig 8: Program processes for receiving data
The developed prototype system is tested in the labo-ratory and gives satisfactory results as shown in Fig 9. The sensors sense the different gases and are interfaced to the microcontroller, which processes the values and sends them to the output unit. Status is set according to different levels of gases. According to WHO (World Health Organization) report, carbon monoxide can be dangerous above 100 ppm (Carbon Monoxide Levels Chart, 2020). According to Occupational Safety and Health Administration, hydrogen sulfide and carbon di-oxide can be dangerous above 50 ppm (Safety and Health Topics on Hydrogen Sulfide, 2021) and 500 ppm, respectively (Carbon Dioxide in Workplace Atmospheres 2021). The National Institute for Occu-pational Safety and Health Administration recom-mends a maximum of 1000 ppm methane during 8 hours working period (Hazardous Gases: Methane, 2021). Depending on that recommended values, the threshold values for each gas were set in the code to classified gases into “Safe” and “Danger” levels. Fig 9a and 9b are the screenshots of the BT app screen, where Fig 9a shows the “Safe” levels of all gases and Fig 9b shows the CO and CO2 as “Danger” with a high concentration of gases, respectively. For onsite monitoring, an LCD is attached with the system to show the results as shown in Fig 9c.
Fig 9: Output results of the system.
However, the developed prototype system has some limitations. Further enhancements to our system can be included to achieve greater efficiency and effectiveness and to make it more portable. For commercial use, it can be performed to additional improvements both in hardware and software. For hardware improvement, greater portability can be achieved by minimizing the external appearance of the device. Here, the connection of all the equipments has been given on the breadboard which can be turned into a user-friendly and more portable with PCB (Printed Circuit Board). The app that is being used to show the result also needs to be made user-friendly and made available in the app store. The feature can be added in app to store all data in the cloud so that anyone can observe previous values also through online. The whole system needs to be made more cost-effective. So, our next focus will be to make the system commercially viable.
A microcontroller-based gas detection system has been presented. This system can deal with quick recognition of harmful gases that exist in the septic tanks. The main advantage of our system compared to other systems is that it can detect both quanti-tatively and qualitatively the foremost harmful gases in septic tanks. Our proposed system uses four gas sensors (MQ-135, MQ-136, MQ-4, and MQ-7) to detect the presence of CO2, H2S, CH4, and CO gases in the septic tank. This system can also measure the concentration of gases in PPM. Based on the concen-tration of each gas, the system can show the status of the septic tank on LCD, where the tank is in safe mode or danger mode. In a danger mode, an alarm will be given for the awareness of cleaners of the septic tanks. Furthermore, a Bluetooth device is incorporated with the system and application software has been developed for Smartphones to monitor the concentration of each toxic gas and the status of the tank remotely. These results reveal that our developed gas detection system can be a useful tool for cleaners of the septic tanks to ensure their health safety.
The authors would like to acknowledge the Electronics Division, Atomic Energy Centre, Dhaka for technical supports of this study.
The authors have declared no conflicts of interest to publish this research article.
Academic Editor
Dr. Wiyanti Fransisca Simanullang, Assistant Professor, Department of Chemical Engineering, Universitas Katolik Widya Mandala Surabaya, East Java, Indonesia.
Electronics Division, Atomic Energy Centre, Dhaka-1000, Bangladesh
Begum A, Mamun AAM, Rahman AM, Sattar S, Khatun TM, Akhter H, and Begum M. (2021). Toxic and non-toxic gas detection system for septic tank, Aust. J. Eng. Innov. Technol., 3(2), 26-33. https://doi.org/10.34104/ajeit.021.026033