0%
0%

# PuriBottle

A bottle that will measure your water intake so you can drink well and enough !

Similar projects worth following
304 views
PuriBottle is a project about a bottle that will measure the amount of water you drink through the day, the main objective is to avoid any risks of dehydration.

We are a group of 4 students in the International track of the ESME Sudria, engineering school.

We were asked to build a project around the Sustainable Development Goals. So we've decided to pick up the one about "Good Health and Well Being". That's why we came up with a water purifying bottle that tracks the amount of water you drink during the day. But then we were told that we had to choose between purifying and tracking the amount of water. Thus we had to know who were we adressing this project to and what was the real purpose of this waterbottle.

Today we know that the purpose of doing this project is to improve and insure people's health, in making a bottle that count the amount of water you drank through out the day so you know if you need to drink more or not.

In fact, we want to give a solution for those who don't drink enough, especially the elderly. Older people are more vulnerable to dehydration due to physical changes in the ageing process : these changes include a reduced sensation of thirst. What are the consequences of dehydration, you'll ask us ? It's associated with poor health, increase of diseases, even mortality.

• 1 × Arduino Pro Mini 328 – 5V/16MHz
• 1 × Waterproof Ultrasonic Sensor
• 5 × Real Time Clock
• 10 × Buzzer 5V
• 10 × B3F-1000 Omron Tactile Switch
• ### Finally

Here is our final program :

int trigPin = A0; //Trig - green Jumper int echoPin = A1; //Echo - yellow Jumper long duration, cm, inches; // on assigne chaque led a une borne de l'arduino // const int A = 2; const int B = 3; const int C = 4; const int D = 5; const int E = 6; const int F = 7; const int G = 8; const int H = 9; const int I = 10; const int J = 11; const int K = 12; const int L = 13; const int M = 1 ; const int N = A5 ; void setup() { //Serial Port begin Serial.begin (9600); //Define inputs and outputs pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(A, OUTPUT); pinMode(B, OUTPUT); pinMode(C, OUTPUT); pinMode(D, OUTPUT); pinMode(E, OUTPUT); pinMode(F, OUTPUT); pinMode(N, OUTPUT); pinMode(G, OUTPUT); pinMode(H, OUTPUT); pinMode(I, OUTPUT); pinMode(J, OUTPUT); pinMode(K, OUTPUT); pinMode(L, OUTPUT); pinMode(M, OUTPUT); pinMode(N, OUTPUT); // Mise a l'etat Haut de ces sortie pour eteindre le Led de l'aficheur// digitalWrite (A,HIGH); digitalWrite (B,HIGH); digitalWrite (C,HIGH); digitalWrite (D,HIGH); digitalWrite (E,HIGH); digitalWrite (F,HIGH); digitalWrite (N,HIGH); digitalWrite (G,HIGH); digitalWrite (H,HIGH); digitalWrite (I,HIGH); digitalWrite (J,HIGH); digitalWrite (K,HIGH); digitalWrite (L,HIGH); digitalWrite (M,HIGH); digitalWrite (N,HIGH); } void loop() { // The sensor is triggered by a HIGH pulse of 10 or more microseconds. // Give a short LOW pulse beforehand to ensure a clean HIGH pulse: digitalWrite(trigPin, LOW); delayMicroseconds(5); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); // Read the signal from the sensor: a HIGH pulse whose // duration is the time (in microseconds) from the sending // of the ping to the reception of its echo off of an object. pinMode(echoPin, INPUT); duration = pulseIn(echoPin, HIGH); // convert the time into a distance cm =((duration/2) / 29.1); inches =((duration/2) / 74); Serial.print(inches); Serial.print("in, "); Serial.print(cm); Serial.print("cm"); Serial.println(); delay(250); if (inches == 0) { digitalWrite (A,HIGH); digitalWrite (B,HIGH); digitalWrite (C,HIGH); digitalWrite (D,HIGH); digitalWrite (E,HIGH); digitalWrite (F,HIGH); digitalWrite (N,LOW); digitalWrite (G,HIGH); digitalWrite (H,HIGH); digitalWrite (I,HIGH); digitalWrite (J,HIGH); digitalWrite (K,HIGH); digitalWrite (L,HIGH); digitalWrite (M,LOW); digitalWrite (N,LOW); } else if (inches == 1) { digitalWrite (A,HIGH); digitalWrite (B,HIGH); digitalWrite (C,HIGH); digitalWrite (D,HIGH); digitalWrite (E,HIGH); digitalWrite (F,HIGH); digitalWrite (N,LOW); digitalWrite (G,LOW); digitalWrite (H,HIGH); digitalWrite (I,HIGH); digitalWrite (J,LOW); digitalWrite (K,LOW); digitalWrite (L,LOW); digitalWrite (M,LOW); digitalWrite (N,LOW); } else if (inches == 2) { digitalWrite (A,HIGH); digitalWrite (B,HIGH); digitalWrite (C,HIGH); digitalWrite (D,HIGH); digitalWrite (E,HIGH); digitalWrite (F,HIGH); digitalWrite (N,LOW); digitalWrite (G,HIGH); digitalWrite (H,HIGH); digitalWrite (I,LOW); digitalWrite (J,HIGH); digitalWrite (K,HIGH); digitalWrite (L,LOW); digitalWrite (M,HIGH); digitalWrite (N,LOW); } else if (inches == 3) { digitalWrite (A,HIGH); digitalWrite (B,HIGH); digitalWrite (C,HIGH); digitalWrite (D,HIGH); digitalWrite (E,HIGH); digitalWrite (F,HIGH); digitalWrite (N,LOW); digitalWrite (G,HIGH); digitalWrite (H,HIGH); digitalWrite (I,HIGH); digitalWrite (J,HIGH); digitalWrite (K,LOW); digitalWrite (L,LOW); digitalWrite (M,HIGH); digitalWrite (N,LOW); } else if (inches == 4) { digitalWrite (A,HIGH); digitalWrite (B,HIGH); digitalWrite (C,HIGH); digitalWrite (D,HIGH); digitalWrite (E,HIGH); digitalWrite (F,HIGH); digitalWrite (N,LOW); digitalWrite (G,LOW); digitalWrite (H,HIGH); digitalWrite (I,HIGH); digitalWrite (J,LOW); digitalWrite (K,LOW); digitalWrite (L,HIGH); digitalWrite (M,HIGH); digitalWrite (N,LOW); } else if (inches == 5) { digitalWrite (A,HIGH); digitalWrite (B,HIGH); digitalWrite (C,HIGH); digitalWrite (D,HIGH); ...

• ### Week 12

We tried to make them work together but.... we're still work on it!!

• ### Week 10

The ultrasonic sensor worked really well!

But the screen didn't yet.

• ### Week 9

Soooo

The group of Laura and Marie-Issa decided to work on the screen and tried to make it work. So they found a great program!

The group of Emma and Sahitia choose to work on the ultrasonic sensor...

• ### Week 8

The circuit were really hard to make, because of the complexity of the diagram they found. We have found a great program in hackaday that really matched with what we wanted to do: count the water and display the result. But it didn't work at all, but we didn't lose hope.

So we were recommended to make at least work one of our main components (The screen and the ultrasonic sensor)

• ### Work group

Group : Laura and Marie-Issa

They were working on the circuit to light up the display that is composed of 2 screen for 4 segments.

Group : Sahitia and Emma

We had to use arduino for programming our arduino card, but we had no notion at all about how to use arduino. So we have learn on Internet.

• ### Week 6

We managed the productivity of our work. That is to say that we had to be divided in two groups of two persons: Laura and Marie-Issa were working on the circuit; Emma and Sahitia were working on the program.

• ### Week 5

We have received all of our components! So we were looking for the best way to make them work (building a circuit and trying to find a good program adaptated).

• ### Re-start

We have done new researches on the project while we were waiting for the components which were ordered last week.

• ### Week 3

The project had to be rethink; regarding the fact that making a bottle that have to count and purify water was to expensive because of the UV water filter, that was necessary for purifying. So, we have decided to build a bottle that just keep track of water intake.

• 1
Step 1

To make the ultrasonic sensor work, you have to read this program and create the circuit that matches with it!

Here is the program:

/*

* created by Rui Santos, http://randomnerdtutorials.com

*

* Complete Guide for Ultrasonic Sensor HC-SR04

*

Ultrasonic sensor Pins:

VCC: +5VDC

Trig : Trigger (INPUT) - Pin11

Echo: Echo (OUTPUT) - Pin 12

GND: GND

*/

int trigPin = 11; //Trig - green Jumper

int echoPin = 12; //Echo - yellow Jumper

long duration, cm, inches;

void setup() {

//Serial Port begin

Serial.begin (9600);

//Define inputs and outputs

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

}

void loop()

{

// The sensor is triggered by a HIGH pulse of 10 or more microseconds.

// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:

digitalWrite(trigPin, LOW);

delayMicroseconds(5);

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

// Read the signal from the sensor: a HIGH pulse whose

// duration is the time (in microseconds) from the sending

// of the ping to the reception of its echo off of an object.

pinMode(echoPin, INPUT);

duration = pulseIn(echoPin, HIGH);

// convert the time into a distance

cm = 17 - ((duration/2) / 29.1);

inches = 20 -((duration/2) / 74);

Serial.print(inches);

Serial.print("in, ");

Serial.print(cm);

Serial.print("cm");

Serial.println();

delay(250);

}

• 2
Step 2

To make the screens work, you have to make the diagram below twice!!

And this is the program that matches with them:

// on assigne chaque led a une borne de l'arduino //

const int A = 2;

const int B = 3;

const int C = 4;

const int D = 5;

const int E = 6;

const int F = 7;

const int G = 8;

const int H = 9;

const int I = 10;

const int J = 11;

const int K = 12;

const int L = 13;

const int M = 1;

const int N = A5;

int tempo = 1000;

void setup()

{ // definitio des broche en sortie//

pinMode(A, OUTPUT);

pinMode(B, OUTPUT);

pinMode(C, OUTPUT);

pinMode(D, OUTPUT);

pinMode(E, OUTPUT);

pinMode(F, OUTPUT);

pinMode(G, OUTPUT);

pinMode(H, OUTPUT);

pinMode(I, OUTPUT);

pinMode(J, OUTPUT);

pinMode(K, OUTPUT);

pinMode(L, OUTPUT);

pinMode(M, OUTPUT);

pinMode(N, OUTPUT);

// Mise a l'etat Haut de ces sortie pour eteindre le Led de l'aficheur//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,HIGH);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,HIGH);

}

//A1-G1 chiffre des décimals et A-G chiffre des unités//

void loop()

{

// chifre 0//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,HIGH);

digitalWrite (L,HIGH);

digitalWrite (M,LOW);

digitalWrite (N,LOW);

delay (tempo);

//chifre 1//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,LOW);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,LOW);

digitalWrite (K,LOW);

digitalWrite (L,LOW);

digitalWrite (M,LOW);

digitalWrite (N,LOW);

delay (tempo);

//chifre 2//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,LOW);

digitalWrite (J,HIGH);

digitalWrite (K,HIGH);

digitalWrite (L,LOW);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chifre 3//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,LOW);

digitalWrite (L,LOW);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chifre 4//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,LOW);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,LOW);

digitalWrite (K,LOW);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

// chifre 5//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,HIGH);

digitalWrite (H,LOW);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,LOW);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chifre 6//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,HIGH);

digitalWrite (H,LOW);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,HIGH);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chifre 7//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,LOW);

digitalWrite (K,LOW);

digitalWrite (L,LOW);

digitalWrite (M,LOW);

digitalWrite (N,LOW);

delay (tempo);

//chifre 8//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,HIGH);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chifre 9//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,HIGH);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,LOW);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

// chifre 10//

digitalWrite (A,LOW);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,LOW);

digitalWrite (E,LOW);

digitalWrite (F,LOW);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,HIGH);

digitalWrite (L,HIGH);

digitalWrite (M,LOW);

digitalWrite (N,LOW);

delay (tempo);

//chifre 11//

digitalWrite (A,LOW);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,LOW);

digitalWrite (E,LOW);

digitalWrite (F,LOW);

digitalWrite (G,LOW);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,LOW);

digitalWrite (K,LOW);

digitalWrite (L,LOW);

digitalWrite (M,LOW);

digitalWrite (N,LOW);

delay (tempo);

//chifre 12//

digitalWrite (A,LOW);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,LOW);

digitalWrite (E,LOW);

digitalWrite (F,LOW);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,LOW);

digitalWrite (J,HIGH);

digitalWrite (K,HIGH);

digitalWrite (L,LOW);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chifre 13//

digitalWrite (A,LOW);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,LOW);

digitalWrite (E,LOW);

digitalWrite (F,LOW);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,LOW);

digitalWrite (L,LOW);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chifre 14//

digitalWrite (A,LOW);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,LOW);

digitalWrite (E,LOW);

digitalWrite (F,LOW);

digitalWrite (G,LOW);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,LOW);

digitalWrite (K,LOW);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

// chifre 15//

digitalWrite (A,LOW);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,LOW);

digitalWrite (E,LOW);

digitalWrite (F,LOW);

digitalWrite (G,HIGH);

digitalWrite (H,LOW);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,LOW);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chifre 16//

digitalWrite (A,LOW);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,LOW);

digitalWrite (E,LOW);

digitalWrite (F,LOW);

digitalWrite (G,HIGH);

digitalWrite (H,LOW);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,HIGH);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chifre 17//

digitalWrite (A,LOW);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,LOW);

digitalWrite (E,LOW);

digitalWrite (F,LOW);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,LOW);

digitalWrite (K,LOW);

digitalWrite (L,LOW);

digitalWrite (M,LOW);

digitalWrite (N,LOW);

delay (tempo);

//chifre 18//

digitalWrite (A,LOW);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,LOW);

digitalWrite (E,LOW);

digitalWrite (F,LOW);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,HIGH);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chifre 19//

digitalWrite (A,LOW);

digitalWrite (B,HIGH);

digitalWrite (C,HIGH);

digitalWrite (D,LOW);

digitalWrite (E,LOW);

digitalWrite (F,LOW);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,LOW);

digitalWrite (L,HIGH);

digitalWrite (M,HIGH);

digitalWrite (N,LOW);

delay (tempo);

//chiffre 20//

digitalWrite (A,HIGH);

digitalWrite (B,HIGH);

digitalWrite (C,LOW);

digitalWrite (D,HIGH);

digitalWrite (E,HIGH);

digitalWrite (F,LOW);

digitalWrite (G,HIGH);

digitalWrite (H,HIGH);

digitalWrite (I,HIGH);

digitalWrite (J,HIGH);

digitalWrite (K,HIGH);

digitalWrite (L,HIGH);

digitalWrite (M,LOW);

digitalWrite (N,HIGH);

delay (tempo);

}

• 3
Step 3

The bottle was supposed to look like this:

Share

## Discussions

PuriBottle wrote 05/31/2017 at 14:35 point

Thank you!

The screen will display the right measure only when the bottle is vertically lay! :)

Are you sure? yes | no

ajlitt wrote 05/31/2017 at 13:40 point

Great idea!

I'm curious: how are you measuring the liquid level accurately if the container is frequently tilted?

Are you sure? yes | no

# Does this project spark your interest?

Become a member to follow this project and never miss any updates