Your water drinking water reminder and monitor!

Time-lapse of drinking a water bottle – Sorry the video quality is bad, I had to compress it a lot to upload it

 

The overall image of the project

 

This is an image of the LCD displaying the amount of water drank

 

The project in action!

 

Decision points:

  • Creating a laser cut box for the exterior of my project. This was a big decision point for me as I was debating on just using a cardboard box but realized the need for a sturdy box to use the load cell. Hence, I decided laser cut the box
  • I wanted to make my device to reset the number of bottles drunk every day, but I was unable to make the clock part work with my device and so decided it was not as important as working on the rest

Process Pictures

Load cell assembly – Load cell is placed between two wooden planks and attached to each of the planks on opposite sides of the cell to allow for bending when a wait is applied.

Image of the circuit inside the box

Clamps being used to hold the wooden box together waiting for the wood glue to dry up

 

Responses to other’s feedback

Your end product looked really nice and was a great idea. Like someone said it would be nice if this was a coaster that you could bring with you “

“I think your project is super helpful (as someone who doesn’t drink water either haha) – It could be interesting to see it as an attachment to a water bottle, like an attachable base, or have it be incorporated into your primary work desk so it’s almost indetectable.”

Since all my critique was essentially the same, I will respond to all of them at once. The reason I chose the topic, as it was pointed out in my critique, is because I need to force myself to drink more water regularly, and I am really glad that there are people other than me who think this is helpful and a good idea. The common feedback that I got from the critique as well as during the presentation was that the project would be better if I could make it smaller and more portable. I definitely like the idea of a coaster or an attachable base. However, the idea of embedding it into my work desk is something new that I never thought of but I really like. It is definitely something I would like to explore as a next step.

 

Self critique:

Overall, I think I am quite happy with the way my project turned out. I am specifically very happy with how the exterior of my project, the laser cut box, looks. This is because design and presentation is something I am very new to, and I did not expect it to turn out the way it did. In addition, it took me quite a bit of time to figure out how to make the design for the laser cutting. 

The one part I am not as happy with is that I was unable to get the LCD to reflect the exact volume of water that was consumed. This was one of the goals I was very excited about, but I was unable to figure out exactly what the conversion from load cell readings to volume in ml was.

 

What I learned:

There were a lot of different skills and concepts I learned through this project. Like I mentioned before, how to create laser cutting designs, how to make precise measurements for the drawings as well as how laser cutting works is one of the big learnings I had from this project. In addition, just thinking about the project not just in a technical way, as I have been doing all along, but as a product is a completely new lens I adopted through this project.

I also found the code for the project more challenging than normal, especially the part where I had to calculate the volume of water drank. This was quite difficult because I had to account for cases where the bottle was no longer on the load cell, when the volume of water decreased, as well as when the volume increased (when the bottle is refilled). In order to account for all of this, I had a lot of variables that I needed to keep track of which got very confusing at first. Later, however, I created a flowchart of how the code should work in each of the cases listed above, after which the coding process got a lot smoother.

In addition, I also had a little bit of trouble soldering my wires together. For some reason, the tip of my solder would not heat up, but the areas just below the tip would heat up just fine. It took me a while of thinking I didn’t know how to solder and thinking the solder wasn’t hot enough to realize this behavior, after which the process was easier, though it was still harder to use the thicker part of the solder rather than the tip.

 

Next Steps:

My next steps would be to build a more compact and portable version of the project, as well as better calculate the volume of water drank.

 

Schematic:

/********************************
 * Project: Drink up!
 * By Sruti Srinidhi
 * 
 * The code below takes a load cell reading and 
 * outputs the volume of water drank, lights
 * up LEDs indicating the number of bottles
 * completed as well as sounds an alarm 
 * if water has not been drank for a while
 * 
 * pin   | mode   | description
 * ------|--------|------------
 * 7      output     LED indicating bottle drank   
 * 8      output     LED indicating bottle drank 
 * 9      output     LED indicating bottle drank
 * 11     input      Push button switch for calibration 
 * A1     input      Load Cell Pin
 * A0     input      Load Cell Pin
 * 3      output     Speaker Pin
 * 
 * 2      output     LCD BD7 Pin 
 * 4      output     LCD DB6 Pin
 * 5      output     LCD DB5 Pin 
 * 6      output     LCD DB4 Pin 
 * 10     output     LCD Enable Pin
 * 12     output     LCD Register select Pin
 * 
 * HX711 module by Rob Tillaart
 */

#include "HX711.h"
#include <LiquidCrystal.h>

const int BOTTLE1LEDPIN = 7;
const int BOTTLE2LEDPIN = 8;
const int BOTTLE3LEDPIN = 9;
const int CALIBRATEPIN = 11;
const int LOADCELLPIN1 = A1;
const int LOADCELLPIN2 = A0;
const int SPEAKERPIN = 3;

int bottleCount = -1;
int emptyWeight = 0;
bool calibrated = false;
bool increasing = false;
unsigned long timer;
bool drinking = false;
int volumeDrank = 0;
int weightReading = 0;
long lastWeight;
long LoadCellInput = 0;

HX711 cell;
LiquidCrystal lcd(12, 10, 6, 5, 4, 2);

void setup() {
  pinMode(3, OUTPUT);
  // put your setup code here, to run once:
  pinMode(BOTTLE1LEDPIN,OUTPUT);
  pinMode(BOTTLE2LEDPIN,OUTPUT);
  pinMode(BOTTLE3LEDPIN,OUTPUT);
  pinMode(CALIBRATEPIN, INPUT);
  lcd.begin(16, 2);
  cell.begin(A1,A0);

}


void loop() {
  lcd.setCursor(0, 0);
  //Ask to calibrate if it is uncalibrated
  if (!calibrated){
    lcd.print("calibrate");
  }
  else {
    // Show volume drank on lCD
    lcd.print("Volume drank:");
    lcd.setCursor(0, 1);
    lcd.print(volumeDrank);
    lcd.setCursor(6,1);
    lcd.print("ml");
  }
  LoadCellInput = cell.read()/1000;
  //Water drank if the bottle is lifted off the load cell
  if (LoadCellInput < emptyWeight){
    timer = millis();
  }
  else{
    //Srinking water
    if (LoadCellInput < lastWeight){
      increasing = false;
      if (calibrated){
        volumeDrank = volumeDrank + lastWeight - LoadCellInput;
      }
     }
    
    //Bottle is being replaced
    else if (LoadCellInput > (lastWeight + 300)){
        increasing = true;
        bottleCount++;
      }
    
    lastWeight = LoadCellInput;
  }
  
  
  //Sound alarm if water has not been drank in a while
  if ((millis() - timer) > 900000){
    tone(SPEAKERPIN,200);
  }
  else {
    noTone(SPEAKERPIN);
  }
  
  //Calibrate
  int calibrate = digitalRead(CALIBRATEPIN);
  if (calibrate == HIGH){
    calibrated = true;
    emptyWeight = LoadCellInput;
    bottleCount = -1;
    volumeDrank = 0;
    digitalWrite(BOTTLE1LEDPIN,LOW);
    digitalWrite(BOTTLE2LEDPIN,LOW);
    digitalWrite(BOTTLE3LEDPIN,LOW);
  }else{
    //Turn on LED to show bottle count
    if (bottleCount >= 1){
      digitalWrite(BOTTLE1LEDPIN,HIGH);
    }
    if (bottleCount >= 2){
      digitalWrite(BOTTLE2LEDPIN,HIGH);
    }
    if (bottleCount >= 3){
      digitalWrite(BOTTLE3LEDPIN,HIGH);
    }
  }
  
  weightReading = LoadCellInput - emptyWeight;
}