Smart Public Toilets Making Public toilet smart and hygienic

Published Dec 11, 2020
 250 hours to build
 Advanced

There are over 100 Million Urban Poor living in Indian cities, who rely on public toilets. However, a large number of these toilets are today in a bad state, unusable. Smart Public Toilet is an IoT and AI-enabled governance platform that enables Urban Local Bodies and schools to improve toilet cleaning and standardization of toilet hygiene.

display image

Components Used

APA102 RGB Color Control LED
APA102C is an RGB full color LED control IC which has an SPI interface.
1
PIR Sensor
PIR motion sensors sense the Infrared signal radiated from moving objects including human or animal body. It is generally used to detect the presence of human or animal motions.
1
MQ135 Gas Sensor
MQ135 is a gas sensor used for gas detection and air quality control.
1
ESP12F
ESP12E
6
LDR -Photocell Photoresistor
LDR -Photocell, Photoresistor
1
5V SMPS
Switching Power Supplies AC-DC 35W LOW COST
1
12V SMPS
Switching Power Supplies AC-DC 35W LOW COST
1
Enclosures
Enclosures, Boxes & Cases ME-IO 37 6 EB 10U TBUS 7035
1
Tactile Switches
Tactile Switches 12 x 12 mm 12 mm 100 gf Short Crimped Black Through Hole SPST
1
TGS2602
GAS Sensor: High sensitivity to low concentrations of odorous gases such as ammonia and H2S generated from waste materials.
1
GX connector
1
Water level Sensor
The microcontroller unit based on Atmega328p
1
5 Watt High Power LED
1
Metal enclosure mold
1
Description

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 

  1. Number of Male/ Female using toilets
  2. Water Usage and Level monitoring
  3. The smell in the toilet.
  4. Light/ Darkness in the Toilet
  5. 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. 

PIR Sensor for User Counting

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.

User Counter with PIR Sensor 
PIR Sensor hole on top

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.

  1. 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:

TGS2602 On field test response 

 

MQ135 Response Graph

Circuit Diagram for TGS2602 Gas sensor

Circuit Diagram for TGS2602 Gas sensor

Circuit Diagram for MQ135 Gas sensor

Circuit Diagram for MQ135 Gas sensor

Based on the tests, considering stability and lifetime, we have decided to use the TGS2602 sensor.

Enclosure & PCB Fitting

 

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:

Normal Conductor
Carbon Plated Conductor

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 

Circuit connection of water level sensor with 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.

Water Level Sensor

at the time of assembly, we don't have 12v on PCB SMPS, So we used an external adapter here.

 

Water Level Sensor

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

 

Two Switch Feedback machine

 

5. Star Light Display

Star Light Display is a wi-fi-based device that will display a Star rating of Toilet.  

 

Mold Dimension
Mold Production

 

Schematic 
Installation on Toilet

All Devices

Production

Testing

Installation

Old version Installation
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

 

Dashboard 1: City Level (Pune)

 

Individual Toilet Dashboard

Toile wise- Monitoring

 

 The smart toilet system provided real-time visibility of the whole city's toilet state, which helped for easy governance and keeping them clean. 

 

Codes

Downloads

Smart Toilet General_v3 Download
Comments
Ad