Members

about-img

Manquan Fang, mf734, M.Eng at Department of ECE, Cornell University

about-img

Haodong Ping, hp394, M.Eng at Department of ECE, Cornell University

Project

Home Intelligent Assistant

Abstract

This project is designed to develop a Home Intelligent Assistant based on Raspberry Pi which realizes functions of providing residence with security alerts, daily information, and the ability to interact with this system.

Index

Home Security; Internet of Things; Intelligent Assistant; Web Server

Introduction

Nowadays, topics like Smart Home or Internet of Things become so popular bacause they provide users a brand new way to get the information or send out the data wirelessly in order to take control of things in their residence. In our project, we will be able to provide a reasonable priced (under costs of 100 USD) Home Intelligent Assistant, which can work in different working modes to provide users with home security, vocal outputs, web login servers and user-friendly interface. Its features will be introduced in detail below.

Features

To complete this project, our team members plan to use temperature & humidity sensor and PIR sensor to detect the temperature, humidity and motion information of a house, and then report any potential unusual or dangerous situations to the owner via email. We will also have simple and clear user interferance and a web server for registered users to access the data to support provide an user friendly experience. For the UI, we will also use PiTFT to display the settings and controls over the device, then use a speaker to speak out things like present time and weather. They are attached below.

Motion Sensor

PIR HC SR501

PIR motion sensor is used to detect any unusual motions in a specific area. The detecting range and angle can be modified to meet user's requirements, here we keep it default.

Digital Humidity Temperature Sensor

DHT11

Digital humidity & temperature sensor is used to detect any unusual temperature or humidity. The preset values of this sensor can be directly changed via a file on the Raspberry Pi.

Vocal Output

Speaker XXX

Speaker is used to play the music at alarm time and speak out the information as present date, weather, and some warm hearted recommendation based on the temperature. With this feature, our project will provide users with useful daily information in a easier more futuristic way.

Virtual Output

2.8" Pi TFT

The Pi TFT will display things virtully like: UI to change settings, enable the functions, and activate different working modes. With this feature, our project will be more user friendly.

Cloud Server

Ali Cloud

The Ali cloud server is used to store memos from our registered users, then load it to our Intelligent Assistant System. After that, our Intelligent Assistant can display memos on screen.

Email Server

Sina Email

The Sina email server is used to send out notification of detected data from sensors via email, which will provide users with the home security information.

Discussion

There are a lot of valuable things during the design can be discussed: details of our components, reasons we choose specific parts, or improvement can be made in future, etc. They will be demonstrated below:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
• • • There is one reason Sina Email Server is selected: Sina is guranteed to not require any verify code or multiple log in process, which can directly send out the email without being interrupted.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
• • • There are two reasons we use a web server: Firstly, we have designed a memo function for our Intelligent Home Assistant system, but it is almost impossible for users to type in memo information throught the Pi TFT. Therefore we use a web part to deal with those problem. When users login into a website, they can easily type in what they want by their own computers or cellphones. Second, since the memo is part of personal privacy, we design an user management system that can not only guarantee the user information security, but also support a lot of users who use our own Home Assistant System. In addition, since the database collects a lot of data like temperature and humidity, then by some data analysis, we can make our control operation more intelligent in the future, like controlling the air conditioner remotely based on the temperature information.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
• • • Spec of Our Web Server:
Ip Address: 47.254.19.144;    Configuration: 2 vCPU 4GB Ram;    OS: Ubuntu;    Server: apache-tomcat-7.0.90





- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
• • • There are some reasons we used the touchscreen instead of GPIO buttons to change the alarm setting: Usually for a alarm setting, we have to change the settings for both hours and minuts by adding or substracting both two: which means we will need four buttons. However, if all four buttons are used, then we lose the ability to have any spare functions, for examole, emergent escaping button. Also, the buttons will not be as user-freindlt as a touchscreen, since the touch screen is much more straight forward, as shown below. Last but not the least, a touchscreen will be more fancy and mechanically reliable than a physical button.



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
• • • At first, we designed a really good UI with fancy effects like mouse hover effect, however, after we loaded it up to Pi TFT, it turned our that these fancy effects would actually lag the screen, and also, since we used our hands instead of mouse, these effects turned out to make no pratical difference. Therefore, we discarded these effects but focused on the most basic but clear one.



----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Conclusion

From above, it shows that our project can work perfectly in different modes as expected, and meets the budget requirement of less than 100 bucks. With our device, the users can easily control the components and get the information remotely. The home security part can provide users with relatively accurate data via email even when users are not around, while the web crawler can get the date and weather information as required then speak it out via a speaker. The web server can store data like memos of registered users, and can be ready for being captured by our system, while our UI can display all these things virtually through the Pi TFT.
In this project, we leveraged the knowledge from the labs and lectures we have down before, implemented bash scripts, Python codes or Java scripts to achieve some functions, demonstrated our ability to design UI with PyGame, interact with system and data through Pi TFT, GPIO buttons, web server, email server, speaker, etc. This project is not only a good chance for students to bridge the real world and embedded system with their own design, but also a good chance to show their understanding and passion to this course. Overall, we are really proud of our project.

Cost

Total price of these parts should be under a budget of $100.
Our project has a total cost of 6 USD excludes Raspberry Pi, Pi TFT and personal own speaker.

Raspberry Pi & Pi TFT

Already provided free in this project.

PIR HC SR501

$ 2. Provided by Professor Joe.

DHT11

$ 4. Purchased from Ebay.com.

JBL Clip Speaker

$ ~20. Provided by Professor Joe. Can be replaced by cheaper speaker or earphone using 3.5mm jack.

Reference

[1] Email Icon: https://e-nautia.com/mail/
[2] Speaker Icon: https://www.from.ae/en/jbl-clip-portable-bluetooth-speaker-yellow
[3] PIR Icon: https://www.indiamart.com/proddetail/pir-sensor-17478420473.html
[4] DHT11 Icon: https://store.nerokas.co.ke/index.php?route=product/product&product_id=251
[5] Cloud Server Icon: https://www.iconexperience.com/v_collection/icons/?icon=server_cloud
[6] PIR Price: https://www.amazon.com/2013newestseller-HC-SR501-Pyroelectric-Infrared-Detector/dp/B00TW2DFYK/ref=sr_1_3?ie=UTF8&qid=1541385207&sr=8-3&keywords=hcsr501
[7] Web Template: http://demo.cssmoban.com/cssthemes5/cpts_1043_boj/index.html
[8] Pi TFT Logo: https://www.pi-shop.ch/pitft-plus-320x240-2-8-tft-capacitive-touchscreen-mini-kit-pi-2-and-model-a-b
[9] SD Setup Guide: https://blackboard.cornell.edu/bbcswebdav/pid-3885059-dt-content-rid-21763376_1/courses/12545_2018FA/SD_setup_mac_fall_18_v1%281%29.pdf
[10] The Python Standard Library: https://docs.python.org/2/library/index.html
[11] How to use interrupts with Python on the Raspberry Pi and RPi.GPIO: http://raspi.tv/2013/how-to-use-interrupts-with-python-on-the-raspberry-pi-and-rpi-gpio
[12] HC-SR501 PIR Motion Detector: https://www.mpja.com/download/31227sc.pdf
[13] DHT11 Humidity & Temperature Sensor: https://www.mouser.com/ds/2/758/DHT11-Technical-Data-Sheet-Translated-Version-1143054.pdf
[14] Lab3 Manual from Course ECE 5725: https://blackboard.cornell.edu/bbcswebdav/pid-3911886-dt-content-rid-22116961_1/courses/12545_2018FA/Lab%203_Fall18_v3.pdf




GitHub Link for Code

Link 1: https://github.com/hp394/ECE5725
Link 2: https://github.com/mf734/ECE5725




Acknowledgement

We would like to express our sincere gratitude to our course advisor Professor Joseph F. Skovira and M.Eng project advisor Professor Bruce Land, as well as our TAs (Sorted alphabetically) Joao Carvao, Mei Yang, Rohit Krishnakumar and Xitang Zhao, for their continuous support of this project with their patience and immense knowledge.




Thank You

For taking time to review our project.

Top