Smart Washroom using Embedded Systems
We ,group of eight members are designing a smart washroom during our embedded systems training in Delhi.i.e. energy efficient washroom such that when a person enters the washroom ,light turns ON automatically and OFF when the person exits and also the exhaust and fragrance turns ON for two minutes. All this we will do with the help of PIR sensor.
Often it happens you forget to turn off the geyser ,so here we will make a timer using RTC and LCD for display for geyser such that all you have to do is set the ON and OFF time and geyser will do the task automatically.
This project we are estimating to complete in 7-8 days.
Today four of our members worked on LCD display and the other 4 on RTC ds 1302.
We started our project with the LCD display for our geyser. We did coding to enter the ON/OFF time using push button and display it on LCD.
FLOWCHART for LCD display:
Here we are using RTC ds 1302 for maintaining the time and running the alarm function to ON/OFF geyser.We did coding with RTC ds 1302 with the output on serial monitor. But in RTC ds 1302 set time command was not properly compatible with the time library.So we decided to work with RTC ds 1307 .
DAY 2 :
Since we were not able to run the set time command properly ,so we decided to use RTC ds 1307 instead of RTC ds 1302. We did complete coding for RTC ds 1307 both for the alarm and maintaining the time .
There is a drawback with the LCD coding we made yesterday that the minimum time for which our geyser will be ON is 1 hour . Therefore we made our LCD code better by adding a function for minutes in addition to hours.
Here is a video demonstrating LCD functionality in our project:
Firstly,we set the range and time of PIR sensor to its maximum and minimum values respectively.We did programming for PIR sensor such that when a person enters the washroom,CFL gets ON and a timer is activated for 2 minutes during which it checks for the another motion.when detected another motion within 2 minutes then it reactivates the timer.Similarly, when a person leaves the washroom i.e. when no motion is detected ,CFL gets OFF and exhaust fan gets ON for 2 minutes .
Then we decided to test the coding for PIR sensor by using relay modules ,a bulb and a power supply with the program uploaded in the arduino .Here to test, we have used a bulb in replacement for CFL and LED on another relay module was used as an indication for the ON/OFF of the exhaust fan.The code was working well as was our aim for the setup.
Today, we have installed the PIR sensor along with the arduino ,12V adaptor ,power supply and relay driver circuits soldered on PCB.All were assembled in a plastic box.We were aiming towards testing and implementing of PIR sensor in a washroom and observing it for one day .According to the length we decided to fix 2 PIR sensors facing towards each other through telephone wires . We observed that PIR sensor worked properly .
Finally , we have merged the coding for RTC ds 1307 and PIR sensor.Then we decided to install to our smart washroom system in our campus washroom using gang box and telephone wires .Firstly we have organized the components in the gang box for this we have made a power supply and 3 relay driver circuit .All the four circuit were soldered on a small PCB that would fit in our gang box using glue gun.Then we took a common AC terminal from which power supply will be driven.
Finally,the day arrived when we installed our smart washroom system .We connected two PLA relays through switch board which were arranged in the gang box . We took a common AC terminal inside the gang box to prevent the user from any shock .After all connections were made ,we then fixed the gang box on the switch box and then we tested the system. We then noticed that we were having a problem with the PLA relay that it was not getting sufficient voltage i.e. 12V because the tranformer we used was of 9-0-9V.Then to rectify this problem,only solution was to change the transformer to 12-0-12V.
We are extremely thankful to Meherban sir for the unconditional support and guidance .