SMART WATER BOTTLE
Dissertation submitted to
Shri Ramdeobaba College of Engineering & Management, Nagpur
in partial fulfillment of requirement for the award of degree of
Bachelor of Engineering
Computer Science and Engineering
Shubham Pyase Shubham Chouksey Guide
Department of Computer Science and Engineering
Shri Ramdeobaba College of Engineering and Management, Nagpur-13
(An Autonomous Institute Affiliated to Rashtrasant Tukdoji Maharaj University)
SHRI RAMDEOBABA COLLEGE OF ENGINEERING & MANAGEMENT, NAGPUR
(An Autonomous Institute affiliated to Rashtrasant Tukdoji Maharaj Nagpur University )
Department of Computer Engineering
This is to certify that the Thesis on “Smart Water Bottle” is a bonafide work of Himanshu Maheshwari, Pranav Sharma, Shubham Pyase, Shubham Chouksey submitted to the Rashtrasant Tukdoji Maharaj Nagpur University, Nagpur in partial fulfillment of the award of a Degree of Bachelor of Engineering, in Computer Science. It has been carried out at the Department of Computer Science and Engineering, Shri Ramdeobaba College of Engineering and Management, Nagpur during the academic year 2017-18.
Date : 27/04/2018
Prof. V.Bongirwar Dr.M.B.Chandak Project guide H.O.D
Department of Computer Department of Computer
Science and Engineering Science and Engineering
Dr .R.S.Pande Principal
I, hereby declare that the thesis titled “Smart Water Bottle” submitted herein, has been carried out in the Department of Computer Science and Engineering of Shri Ramdeobaba College of Engineering & Management, Nagpur. The work is original and has not been submitted earlier as a whole or part for the award of any degree / diploma at this or any other institution / University.
Roll. No. Name Of Student Signature
49 Himanshu Maheshwari
57 Pranav Sharma
66 Shubham Pyase
68 Shubham Choukase
? Approval Sheet
This thesis entitiled “Smart Water Bottle” by Himanshu maheshwari,pranav Sharma,Shubham pyase,Shubham Choukase, is approved for the degree of Bachelor of Engineering.
Name & signature of Supervisor(s)
Name & signature of External.
Name & signature RRC Members
Name & signature of HOD
We would like to express our sincere gratitude to Dr.M.B. Chandak, Professor, and Head of Department of Computer Science and Engineering for allowing us to undertake this work.
We are grateful to our supervisor Assistant Professor V.Bongirwar Department of Computer Science and Engineering for his continuous guidance advice effort and invertible suggestion throughout the research.
Lastly we would like to express our sincere appreciation to our parents for encouraging and supporting us throughout the study.
Shubham Pyase Shubham Choukase
This app calculates required hydration level goal according to our personal parameters such as age, height, weight, gender.
By using the app we can manually set our water intake goal for improving hydration level . Our App will remind you the water you need to drink in a day.
Smart water bottle that automatically tracks how much water you drink and syncs with this app via bluetooth. This bottle will give notification when you need to drink more water.
Our App Will Show hydration progress over time in a daily, weekly, and monthly view.
Our app will also send helpful reminders and notifications when you begin to fall off track and need to drink more water. The bottle will also light up and glow as a fun way to remind you to drink water. Normal Water Bootle can not do this.
To measure the level of water we are using Ultrasonic Sensor which measure the amount of water present in water bottle.
By getting the location temperature in Android device through internet we are able to detect how much litre of water to be consumed in a particular season like winter or summer.
TABLE OF CONTENTS
Chapter Title Page No.
Table of Contents 7
List of Figures 9
1 INTRODUCTION 1.1 Project Background 12
1.2 Project Objective13
1.3 Project Limitations 13
2 LITERATURE REVIEW 2.1 Ozmo 14
2.1.1 About 14
2.1.2 Features 14
2.2 Hidrate Spark 14
2.2.1 About 14
2.2.2 Features 14
3 MATERIAL AND METHODOLOGY 3.1 Planning 16
3.1.1 Requirement Analysis 16
3.2 Risk Analysis 16
3.2.1 Prototype 16
3.3 Engineering 17
3.3.1 Development and Testing 19
3.3.2 Arduino 19
3.3.3 bluetooth sensor(hc-05) 20
3.3.4 ultrasonic distance sensor 22
3.3.5 sqlite database 24
3.3.6 Android 27
3.3.7 android Bluetooth API 28
3.4 Evaluation 29
3.4.1 Customer Evaluation 29
4 RESULT AND DISCUSSION 4.1 Usage of app in daily life 31
4.2 The flow pattern of the data 31
LIST OF FIGURES
Fig. No. Name of Figure Page No.
1 Illustrates the components and how data flows 17
2 Final Prototype 18
3 Show the Notification Panel 18
4 Ardunio Board 19
5 Bluetooth Board 21
6 Ultra Sonic Sensor 22
7 Water chart 25
8 Login Page 29
9 Signin Page30
1.1 Project Background
In this project we aim to solve the problem of low water consumption in human beings.
Current Scenario :-
Here are some problems that are caused by dehydration and low water consumption :-
Overweight and obesity
High and low blood pressure
High levels of bad cholesterol
Diseases of the digestive system
Problems with the respiratory system
Urinary tract infections
Importance of hydration
Our body loses water through breathing, sweating . That is why it’s necessary to rehydrate by drinking water and eating foods that contain water.Our body uses water in all its cells, organs, and tissues to help maintain temperature and other body functions.
1.2 Project Objectives
Our aim is to build a system which is connected to user’s smartphone via bluetooth/wifi and one android mobile app which does analytics on the data received from the system.
These app calculates a recommended hydration goal based on your personal parameters such as age, height, weight and gender.
Water tracker that will remind you the water you need to drink rest of the day.
Customised starting and ending time to drink water within a day.
1.3 Project Limitations
Limitations of this project are as follows : –
There are chances of recording errors here.
Important messages could be missed if the mobile runs out of battery or is switched off.
Our Smart Bottle connects via bluetooth to record our water consumption and tracks our progress throughout the day and show us how much water we need to drink throughout the days . It syncs with blutooth device to evaluate remaining water .
Notification that remind us to stay hydrated throughout the day
It automatically detects water level.
Easy to carry water bottle throughout the day .High accuracy in measurement
Up to 3 weeks of battery on single, full charge
LED lights that communicate achievement without App .
2.2 Hidrate Spark
Our bottle comes included with a ?distance sensor, that does not required any
batterie. (That means no charging to worry about!)When we drink out of the bottle, the sensor measures how much we drink and transfers this info to the hydration app, which tracks our progress throughout the day.
Sends fun, push reminders to our phone
Automatically tracks water intake
Syncs with hydration app via Bluetooth
Syncs with blutooth.
Calculates a personalized daily water level
MATERIAL AND METHODOLOGY
MATERIAL AND METHODOLOGY?
3.1.1 Requirement Analysis
On consulting a large number of people from youngsters to the elderly,we came to a common conclusion i.e. effectively aiding people to drink desired amount of water.For that 2 things are vital.They are :-
A simple method to record the amount of water consumed
Giving timely reminders on the basis of recorded data
3.2 Risk Analysis
1.Malfunctioning in one or more hardware part/s
2.Prototype consuming too much power
1.Final prototype is too costly
3.3.1. Development and Testing
Fig 1 illustrates the components and how data flows
Below steps were followed while developing the prototype:-
1.The load cell sensor was placed on a solid platform(In this case, it was a wooden plank)
2.The sensor was then connected to HX711 Amplifier.
3.The Amplifier was connected to Arduino Mega.
4.A Bluetooth module(HC-05) was connected to Arduino Mega.
5.A smartphone having Bluetooth was paired with HC-05.
6.The Arduino Mega was connected to laptop for uploading code from laptop to arduino and also for power supply.
Fig. 2 shows the final prototype
Fig. 3 shows the notification panel.
Arduino is used for building projects and is an open source platform.
18097528448000Arduino consists of a circuit board that can be programmed (often named as
Fig 4 Ardunio Board
microcontroller) and software, or Integrated Development Environment that runs on computer and used to write and can be uploaded code to the physical board.
The platform on which Arduino has becoming very famous among programmers just starting out with electronics, and for good reason. Unlike previous programmable circuit boards, the Arduino does not require a extra hardware (named as programmer) .If we want to load new code onto the board we can simply use a USB cable. The Arduino IDE uses a easy version of C++, making it very simplar to learn about program. At last the Arduino provides a good form factor that uses the functions of the micro-controller into a more accessible package.
Bluetooth works on wireless technology and can be used for interchanging the data over limited distances (using short-wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz) from stable and mobile devices, and is used for personal area networks (PANs). It has a range which is approximately 15 Meters (3.5 feet).
Here is a great instructor that shows us how to make an Android phone control on a 3-D maze through the HC05 module, Aurduino RoboRED and a couple of servers.
Above modules are based on the Cambridge Silicon Radio BC417 2.5 GHz bluetooth chip. The chip uses an external 8 Mbit flash memory. Hence this low-cost Bluetooth different modules canwork well with Arduino and other processors.
HC-05 is much efficient module that can used with either Master or Slave
HC-06 is a Slave only device. (It look just like the HC-05).
These small ( 4 cm long) modules runs on 3.5V power with 3.3V signal levels, It consist of no pins and can be usually attached to a big board.
The module works on two different modes of operation, Command Mode in which we can send AT commands to it and consist of Data Mode where it sends and receives data to another bluetooth module.
“Breakout” Boards which make these very easy to use are easily available and recommended. It is attached to the sub-module like that shown on the right on a slightly larger board. NOTE: Shopkeepers also label them as “HC-05” or “HC-06”, but it has some other model number on the backside. Most of this bluetooth boards which uses operation at 4V-5V power and has a interface to 5V Arduino signal levels using different technique of level shifting. A typical “breakout” board has shown below
Fig 5 Blutooth Board
Sections of the BT Board:
It has Green HC-05 different-module and is soldered on top of the Bluetooth Board
The HC-05 module has a Radio and Memory chips and it uses a 26 MHz crystal, antenna and has a RF matching network.
The right side of the Bluetooth Board consist of connection pins used for power and signals and consist of a 5V to 3.3V Regulator, LED, and level shifting.
HC-05 PinOut (Right) :KEY: It uses a HIGH power , forces AT Command Setup Mode. LED is blinked to 2 sec.
VCC: +5 Power
GND: System / Arduino Ground
TXD: It Transmits a Serial Data from HC-05 onto a Arduino Serial Receiver. NOTE: 3.3V HIGH level: OK for Arduino
RXD:It Receives Serial Data from a Arduino Serial Transmit
STATE: Tells us weather it is connected or not.
How does an Ultrasonic Distance Sensor work?
The Ultrasonic Sensor has a high-frequency sound pulse and then it judges how long it is taking for the echo of the sound in order come back. The sensor consist of 2 openings on its front. First opening which is used to transmit ultrasonic waves, (like a small speaker), and the other receives them, (like a small microphone).
The sound travels at an speed of approximately 341 meters (1200 feet) per second in air. The ultrasonic sensor takes above information using given time difference between sending and receiving the sound pulse to measure distance of an water. The following mathematical equation is used:
Distance = Time x Speed of Sound divided by 2
Time = the time between when an ultrasonic wave is sended and when it is received
We divide this number by 2 because the sound wave has to travel to the water level and comes back.
Fig 6. Ultra Sonic Sensor
Why/When to use Ultrasonic Sensors ?Basically it is used to measure perfect, automatic distance measurement in different environments
Particularly used for environments where optical sensors are unused such as smoke, dust.
Very accurate, stable and can be used over large ranges.
Ultrasonic sensors can be used to measure the following parameters without using the medium to be measured:
Ultrasonic sensors make perfect measurements in many tough environments and unusual materials. Measurements are unaffected by:
Mist and Vapor
SQLite databases has an internal-process in it which will uses a self-contained, with no server, there is no-authentication and transactional SQL database . The code for SQLite database is in the public domain and is hence it is free open source database for use for any purpose for both commercial or private. SQLite database is the most widely used database in the world with many applications than we can use, including high-level projects.
SQLite database is an embedded SQL database software. Unlike most other SQL databases, SQLite does not uses a separate server process. SQLite database writes directly to normal disk files. A full SQL database with different tables, indices, triggers, and views, is contained in a single disk file. The databasehas a file format which a cross-platform – we can freely copy a database between 32-bit and 64-bit systems or between big-endian and little-endian CPU. These features make SQLite database a popular choice as an Application for File Format. Think of SQLite database not as a replacement for Oracle dadatabase but as a replacement for fopen()
The SQLite databases having complex library which has included all the library, where the library size can be less than 500KB, depends on optimization settings and compiler code. (64-bit code is larger. And some compiler optimizations such as aggressive function inlining and loop unrolling can cause the object code to be much larger.) There is a tradeoff between memory usage and speed. SQLite databases runs faster when you gives more memory to it. Nevertheless, performance is quite usually good even in low-memory available. Depending on how it is used, SQLite database can be faster than direct filesystem I/O.
Fig 7.Water Chart
NOTE: 1 OZ = 0.0295731 LTR 1 LBS = 0.45359237 KG.
SQLite database is very carefully tested prior to every release and has a reputation for being very fast and secure. Most of the SQLite database source code is used purely for testing and verification. An automated test uses a millions and millions of test cases involving thousands of individual SQL statements and achieves 100% branch test coverage. SQLite-database responds fully to memory allocation failures and disk errors. Transactions are ACID properties even if interrupted by system crashes or power failures. The system failuers is to be verified by the automated tests using some specified test. Of course, but there is still errors even after all this testing. But unlike some similar projects (especially commercial competitors) SQLite database is open source platform and honest about all errors and provides bugs lists and every minute chronologies of changing code.
The SQLite-database code base is supported by an international team of developers who work on SQLite-database full-time. The developers continue to expand the capabilities of SQLite database and enhance its reliability and performance while maintaining backwards compatibility with the published interface spec, SQL syntax, and database file format. The source code is free to anybody who wants to use it, but professional support is also available.
We the developers hope that you find SQLite database useful and to use it well: to make good and beautiful products that are fast, reliable, and simple to use. As you forgiveness different user forgive this. And just as you have received SQLite database for free, so also freely give, paying the debt forward.
Android was developed by Google and it is mobile operating system, It is made especially for smart touch screen mobile devices such as phones and tablets and it is an updated version of the Linux kernel. In addition, Google has also developed Android TV for televisions, Android Auto for cars, and Wear OS for wrist watches, each with a specialized user interface. Variants of Android are also used on game consoles, cameras, PCs and more electronics.
Firstly developed by Android Inc., which Google Launch in 2005, Android was unveiled in 2007, with the first commercial Android device launched in September 2008. The operating system has since gone through multiple new update, its current version being 8.1 “Oreo”, released in December 2017. The core Android source code is known as Android Open Source Project (AOSP), and is primarily licensed under the Apache License.
Android is developed by Google, including core apps for services such as Gmail and Google Search, as well as the application store and digital distribution platform Google Play, and associated development platform. Manufacturers of Android devices has certified that apps and certificates are imposed by Google, but AOSP has been used as the basis of competing Android ecosystems software, such Fire OS, which utilize its own equivalents to these Google Mobile Services.
Android Bluetooth API
There are different ways,in which Bluetooth to send or receive data between android and the Arduino. Android has a platform support for the Bluetooth framework that allows a device to wirelessly exchange data with other Bluetooth devices.
Android provides Bluetooth API to perform many work .It Detects other Bluetooth devices
Get’s a list from paired devices
It also Connect’s to other Ardino through service discovery
Android also consist of Bluetooth Adapter class which communicate with other Bluetooth. It also Creates an object by calling the static method getDefaultAdapter(). Its syntax is given below.
private BluetoothAdapter BA;
BA = BluetoothAdapter.getDefaultAdapter();
To enable given Bluetooth on our device, call the intent with the following Bluetooth constant ACTION_REQUEST_ENABLE. Its syntax is.
Intent turnOn = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
3.4.1. Customer Evaluation
The customer was able to see the end result in the mobile app.Fig. 3 and Fig. 4 are screenshots of the app when the bottle was not placed on the load cell sensor and when the bottle was placed on it.
153063215183600Fig. 8 Login Page
Fig. 9 Sign Page
Chapter 4 : Result and Discussion
4.1 Usage of app in daily life
Our app calculates considerable hydration goal based on user’s personal parameters such as age, height, weight, sex.
4.2 The flow pattern of the data
Analog data from load cell -; HX711(Amplification and Analog to
Digital) -; Arduino -; Bluetooth Module-; Mobile A
Chapter 5 : Conclusion and Summary
We learned how to use arduino ,and how to perform real time communication through bluetooth, how to catch the data through Bluetooth on android mobile app?.
More features can be built on the app using the data from the bluetooth module.
Websites referred :
Software Engineering: A Practitioner’s Approach by Roger S. Pressman
Guidelines for thesis preparation by SRCOEM Nagpur
Software Used :