The Goal of the system is to monitor and evaluates Toilet Condition In Real-Time, enabling city governments to improve the toilet cleaning & upkeep through:
- Monitoring capabilities
- Actionable intelligence
- Engagement & behavior change
- Standardization of toilet hygiene
To achieve this goal, We have to monitor
- Number of Male/ Female using toilets
- Water Usage and Level monitoring
- The smell in the toilet.
- Light/ Darkness in the Toilet
- User Feedback from the Toilet.
Based on all those values, we also needed to show the toilet rating on a 5-star Display.
The challenge also was to develop this system with the lowest possible cost, easily available parts and easy to manufacture.
We started with
1. User Counter
The requirement is that sensor that can be mount on the head (top) of the door/ gate to count the user, with reasonable accuracy. Also, it should be rigid enough to protect from vandalism.
There are multiple ways to do user counting, considering the public toilet and environment, we decided to use a PIR sensor, with some customization.
When a person passes beneath the PIR sensor which will be mounted on the head (top) of the Toilet, it detects the motion of the person. This gives a High pulse at the output.
This pulse will remain High for a specific timeout and then become low for a certain time and become ready again to detect another motion.
It can detect motion within 18 feet.
we can use a Single Triggering Mode with some timing hacks.
Using the time (Tx) adjustment potentiometer, we can set the POT to the minimum HIGH time (Tx) period.
There are two 'timeouts' associated with the PIR sensor.
One is the "Tx" timeout: how long the LED is lit after it detects movement - this is easy to adjust because there's a potentiometer.
Tx = 24576 x R10 x C6 (refer datasheet)
On the PIR sensor there is one POT of 1M ohm which is connected in series with 10K resistance which in turn makes the
R10 = 10k ohm + RPOT,
C6 = 0.01 uF
Tx = 24576 x (10k ohm + RPOT) X 0.01uF
We kept RPOT at lowest resistance which approximately equals 0 then,
Tx = 24576 x 10k x 0.01uF = 2.5 sec (approx)
Practically we got Tx around 2.7 – 2.9 sec approx.
The second is the "Ti" timeout: how long the output line is guaranteed to be LOW when there is no movement.
Ti = 24 x R9 x C7 (refer datasheet)
We can change or reduce the Ti time to zero. We changed it by removing its resistance and shorted the two points. This makes the Ti time to zero as R9 becomes zero.
So, when motion is detected output goes HIGH for 2.7 – 2.9 seconds (approx.) and becomes LOW. Now, its output will not have LOW for the guaranteed period and will become ready to detect motion.
PIR sensor senses motion in the radial direction but we need motion detection exactly under the sensor in the vertical direction.
So, to minimize the sensor’s sensitivity area, we have not exposed the complete sensor surface to the environment. We just exposed the small and center part of the sensor to the environment. This enclosure arrangement helps to focus on a specific vertical region.
2. Smell Sensor
A smell sensor Node is a wi-fi-based sensor that will detect the level of gases that causes the bad smell in the Toilet.
- Selection of Sensor
- Need to detect gas H2S (Hydrogen Sulphide) which is produced from Human waste.
- Need to detect NH3 (Ammonia) which is produced in Urine.
- It should not consume more power.
- It should get less affected by ambient environment factors like temperature, humidity, etc.
- It should have a long life.
To fulfill all the above requirement, we found two sensors
- TGS2602
- MQ135
Comparison Between TGS2602 and MQ135
Testing MQ135 and TGS2602 on Field:
Circuit Diagram for TGS2602 Gas sensor
Circuit Diagram for MQ135 Gas sensor
Based on the tests, considering stability and lifetime, we have decided to use the TGS2602 sensor.
3. Water Level Sensor
The water level sensor node is a wi-fi-based device that is used to detect four levels i.e. 25%, 50%, 75%, and 100% (full) in the tank.
There are many water level sensors are present in the market. But, we need to use cost-effective water level sensor, so we have selected Conductivity based water level sensor which is as follows:
we used carbon plated water level sensor to avoid rusting because of water.
To detect 4 different levels, we have to insert 5 carbon-plated conductors. Out of which one is connected to the ground placed at the bottom of the tank.
And the other 4 conductors placed at different detecting levels which are connected to different inverting terminals of comparator LM324
4 conductors are placed at 25%, 50%, 75%, and 100% level in the tank, and the conductor which is connected to the ground is placed at the bottom of the tank.
at the time of assembly, we don't have 12v on PCB SMPS, So we used an external adapter here.
4. User Feedback Machine
The user feedback system is a wireless-based device that takes user feedback in terms of Toilet cleaning. There are three switches for Clean, average, and Dirty feedback.
Schematic
Metallic Enclosure
5. Star Light Display
Star Light Display is a wi-fi-based device that will display a Star rating of Toilet.
All Devices
Production
Testing
Installation
IoT Backend and Dashboard
All devices are wi-fi capable which can send data directly to the cloud each minute.
We used custom Timescale DB and microservices for monitoring.
Dashboard: Check Demo Dashboard: Click here
Individual Toilet Dashboard
The smart toilet system provided real-time visibility of the whole city's toilet state, which helped for easy governance and keeping them clean.