Hello friends, here we are with one more tutorial and that is home monitoring system for elderly persons.
Now, we can not see and care our relatives all the time, so for that we can make one system in which we can monitor our elderly relatives. In this case we are going to take care about smoke detection, temperature and humidity of the room, fire in the room, door bell monitoring and carbon monoxide detection. So here we are going to monitor these 6 things for our elderly relatives.
Software Required:a) Raspbian OS: This is the recommended OS for raspberry pi. You can also installed other OS from third party. Raspbian OS is debian based OS. We can install it from noobs installer. you can Download it from here
b) Python idle: This is the software we get in raspbian os. For this project we have used python script.
c) Putty: We are using putty for remote access of Raspberry Pi.you can Download it from here
d) Win32DiskImager: This software is used to burn Raspbian Os on SD Card. you can Download it from here
e) SDFormatter: This software is used to format memory card. you can Download it from here
Components Used:For this project you need : 1) Raspberry pi :
This is the latest version of raspberry pi. In this we have inbuilt Bluetooth and wi-fi, unlike previously we have to use Wi-Fi dongle in one of its usb port. There are total 40 pins in RPI3. Of the 40 pins, 26 are GPIO pins and the others are power or ground pins (plus two ID EEPROM pins.) There are 4 USB Port and 1 Ethernet slot, one HDMI port, 1 audio output port and 1 micro usb port and also many other things you can see the diagram on right side. And also we have one micro sd card slot wherein we have to installed the recommended Operating system on micro sd card. There are two ways to interact with your raspberry pi. Either you can interact directly through HDMI port by connecting HDMI to VGA cable, and keyboard and mouse or else you can interact from any system through SSH(Secure Shell). (For example in windows you can interact from putty ssh.) Figure is given above.
2) Smoke Sensor (MQ-2) :
The MQ-2 smoke sensor is sensitive to smoke and to the following flammable gases: LPG, Butane, Propane, Methane, Alcohol, Hydrogen.
The resistance of the sensor is different depending on the type of the gas. The smoke sensor has a built-in potentiometer that allows you to adjust the sensor sensitivity according to how accurate you want to detect gas.
3) Carbon Monoxide Sensor (MQ-7) :
This Carbon Monoxide (CO) gas sensor detects the concentrations of CO in the air and outputs its reading as an analogue voltage. The sensor can measure concentrations of 10 to 10,000 ppm.The sensor can operate at temperatures from -10 to 50°C and consumes less than 150 mA at 5 V.
4) Flame sensor :
Flame Detection Sensor Module is sensitive to the flame, but also can detect ordinary light. Usually used as a flame alarm.
Detects a flame or a light source of a wavelength in the range of 760nm-1100 nm. Detection point of about 60 degrees, particularly sensitive to the flame spectrum. Sensitivity is adjustable, stable performance.
5) DHT22 sensor :
The DHT22 is a basic, low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin (no analogue input pins needed). Its fairly simple to use, but requires careful timing to grab data. The only real downside of this sensor is you can only get new data from it once every 2 seconds, so when using our library, sensor readings can be up to 2 seconds old.
6) Door Bell (Push Button):
Here we are using Push Button just to represent our door bell.
7) PCF8591 Module : In this project we are using 3 analogue sensors. As raspberry pi doesn’t contain analogue inputs so for that we need to use one ADC module. Here we are using pcf8591 ADC module
The PCF8591 is a single-chip, single‑supply low‑power 8‑bit CMOS data acquisition device with four analogue inputs, one analogue output and a serial I²C‑bus interface. Three address pins A0, A1 and A2 are used for programming the hardware address, allowing the use of up to eight devices connected to the I²C‑bus without additional hardware. Address, control and data to and from the device are transferred serially via the two-line bidirectional I²C‑bus.
Working of Project :
Here we are interfacing raspberry pi with smoke, CO, flame, dht22 and push button. Here smoke, CO and flame are analogue sensor and dht22 is digital sensor. As we all know that raspberry pi doesn't have analogue input pins so that's why for that we need to use one analogue module externally. And for that here we are using pcf8591 module which works on I2C. So first of all we need to connect all the components properly. In the next step you can go through our circuit diagram and connect your circuitry like that. After successfully making the connection it is time to do some coding part.
As we are monitoring 6 things so how we are monitoring that is the most important thing. So here we are using one pushbullet app, so whenever smoke will reach above the threshold value whatever we set so immediately we will get the notification in our smart phone through pushbullet app, same thing will work with other sensors like carbon monoxide, flame, dht22 and door bell. So whenever any of these sensors value will reach above the threshold value, immediately we will get the notification in our smartphone and then we can take care of our elderly relatives
Now we are using raspberry pi, so you can use raspberry pi in two ways either you can take a dedicated monitor and just power up your raspberry pi or else you can use your raspberry pi through SSH. I'll prefer SSH as you can easily login through SSH in raspberry pi. So after successfully login to your raspberry pi you can make one directory named home_monitoring, for that you can give command like that
First go to Desktop
cd Desktop
sudo mkdir home_monitoring
Now you need to clone our github repository.
Command will be like that
git clone <github link>
you can go to our github link which is given in the coming steps.
Now run the code by giving the command
sudo python home_monitor.py
How to Use Pushbullet:Firstly You need to register in Pushbullet account for notification. Go to this link https://www.pushbullet.com
You can register through either Google or Facebook.
In my case, We are using Gmail Account.
After successfully signup, log in and go to
Settings –> Account to create an API access token.
We need that key for Raspberry Pi to push notifications. Just note down that key in the code.
Images are given below
Circuit Diagram:
Code of the project is given in our Github Link
And the whole project description is given in the above video
One additional thing also you can do in this project as in the video we did not explain that but it is very simple and that is in this github page one motion detection directory is also there so you can monitor the motion of your elderly persons for that you need to run motion_main.py. Here is the command for that
sudo python motion_main.py
So whenever movement will be there immediately you will get the notification in your smartphone through pushbullet. You can also get the image and video of those motion. And you can check any time those images and video.
Remember you need to put raspberry pi camera for running this motion_main.py, as through raspberry pi camera only we are going to monitor the movement.
And the whole project description is given in the above video
Congratulations you have successfully finished your project If have any doubt regarding this project feel free to comment us below or you can mail us on info@deligence.com
And if you want to learn more about these type of project then feel free to visit our youtube channel
Thanks & Regards,
Deligence Technologies
Comments