This wastewater monitoring system consists of two main types of subsystems: Sensor Nodes and Sink Node. The Sensor Nodes, with ESP32 as processor, obtain the sensor data from the wastewater, display it, and send it to the Sink Node. This page will focus on explaining the Sensor Nodes. To see the explanation of Sink Node, please click this link.
This system has two Sensor Nodes. Sensor Node 1 has four sensor slots: pH/NH3-N (these two sensors can use the same slot alternately), electrical conductivity or EC (converted to Total Suspended Solids or TSS), turbidity (converted to TSS), and temperature (as a corrector). Sensor Node 1 uses Zigbee XBee S2C module (set to transparent mode for UART communication) to communicate wirelessly with Sink Node. Sensor Node 2 has two sensor slots: pH/NH3-N and temperature. Sensor Node 2 uses cables to communicate with Sink Node.
The Sensor Nodes have a feature that lets users calibrate sensors while the system is still running.
The pictures below are the schematic and board for Sensor Node 1.
The pictures below are the schematic and board for Sensor Node 2.
Please note that both schematics need to be rotated 180 degrees to make the OLED display readable.
- ESP32
- pH Sensor Probe
- pH/NH3-N Sensor Board
- EC Sensor Probe
- EC Sensor Board
- ADC (ADS1115) for EC Sensor
- Turbidity Sensor Probe & Board
- NH3-N Sensor Probe
- Temperature Sensor Probe
- OLED Mini Display
- ZigBee XBee S2C
- Power Supply Module
- Adaptor for Power Supply Module
- Download this repository and put all the files into a folder named "TA_ESP32_Sensors_Integrated_with_Raspi".
- Open the file "TA_ESP32_Sensors_Integrated_with_Raspi.ino" using Arduino IDE.
- Install these libraries through the library manager.
Library Name | Author | Library Usage |
---|---|---|
DallasTemperature.h |
Miles Burton | Temperature sensor |
OneWire.h |
Paul Stoffregen | Temperature sensor |
Adafruit_GFX.h |
Adafruit | OLED Display |
Adafruit_SH110X.h |
Adafruit | OLED Display |
- Upload to ESP32.
- Insert the temperature sensor probe and the one you want to calibrate into the container of one of the calibration solutions.
- From sleep mode, to wake up the Sensor Node, press the CAL button until the sensor selection menu appears on the OLED display.
- Press the MODE button to switch sensors. After the words "[sensor name] Calibration" correspond to the sensor you want to calibrate, press the CAL button to enter the calibration solution selection menu.
- Press the MODE button to switch the calibration solution. After the writing on the OLED display matches the solution being calibrated, press the CAL button to enter calibration mode.
- Wait for the reading to stabilize. Press the CAL button to temporarily store the calibration value. Press the MODE button to exit calibration mode and return to the calibration solution selection menu.
- Transfer the sensor probe to another calibration solution. Repeat steps 4 and 5 for this calibration solution. Do this for all available calibration solutions for the sensor.
- After the calibration is complete for all solutions, on the solution selection menu, press the MODE button until the display shows "Save & Exit". Press the CAL button to return to the main menu and store the calibration values in the EEPROM memory so that the calibration values can still be accessed even after the system is turned off and on again. You can also select "Cancel & Exit" to cancel values that have not been stored in the EEPROM memory.
- From the main menu, other sensors can be selected for calibration. To put the system into deep sleep mode, select “Exit” on the main menu.
- To check the calibration value, restart the calibration mode and pay attention to the value shown on the display.
After calibration, keep the Sensor Node powered and put all the sensors into the liquid which will be observed. The Sensor Node will perform data reading after receiving a signal from the Sink Node.
This page is the first part of the project explanation. Click this link to see the second part.