View of the top and 2 sides of the box. The left side shown is where the power is, and the top is where the cup goes.
This project helps me to remember to drink water throughout the day. The bottle is placed on top where it says "Place Cup Here" and after 30 minutes, the box will make a loud continuous beep until the drink is picked up. If the bottle is placed back down too quickly, the box will start to beep again to ensure I actually drink the water.
Back side of the box, showing the top and 2 sides, including the side with the speaker holes.
Close up photo of the speaker holes.
Close up photo of the power connectors, showing both options one can use for power.
Bird's eye view of the inside of the box, showing all the components.
In this video, I show the me putting my bottle on to the box. After 5 seconds (timer was shortened for the video), the box beeps to tell me to drink the water. After I put it back on, I then show the box beeping again, but this time I put the bottle back on too quickly and it beeps at me again telling me as such.
Laying all the interworkings on a drawn layout of my box to try and get a feel for where they will end up in the final build.
Original box that was cut. Things didn't exactly line up as needed. Multiple sides were re-cut to remedy this.
Original design of the box, when I first wanted it to be a hexagon.
The process was a relatively simple one in my opinion. Originally, I wanted a hexagonal box for design purposes, but that was phased out fairly quickly when I realized it would just be an all around tough shape to work with. So a rectangular box was settled on. The wiring and technical stuff wasn't too hard or complicated. The coding was not bad either. It was a bit of a process trying to figure out exactly how to implement the anti cheat. I went through a couple things that didn't work but ended up getting it just right. I'd say the biggest issue I ran into during the process was working with Autodesk. Designing the box on Autodesk wasn't too hard, but it was definitely finicky is some areas. I originally was having trouble getting the finger joints to work properly, but figured that out. The most annoying part was trying to turn the pieces into sketches that could be laser cut. I went to Google for help after a while, and found a solution that worked, thankfully.
During the in-class critique, multiple critique comments were made. One of the was "Could have different kinds of sounds to represent different things, such as a chirping noise to remind you to put your cup back on the sensor." This is a solid idea. It definitely could be good for me to implement something like this. My only hesitancy is if I leave the bottle off of the box on purpose for any reason, it would beep when I don't want to put the bottle on the box. This isn't a huge deal because I could just pull the power from the box. Another critique was "The anti cheat is amazing, I love that you have to hold the cup for a bit." I appreciate this. My intention of this was to prevent myself from just quickly picking up the cup and then putting it back down just to stop the beeping. Forcing me to pick it up for a short period of time makes it much more likely I will actually drink water. I am happy with how the project came out. I feel like it could look a little nicer, better lined up edges and tape along the corners, but I still think it looks good. My project definitely can help me drink more water throughout my day. Just a simple reminder telling me I haven't drank anything yet is all it is, and yet it is super useful. I could've made it a bit more complicated, give it more useful things that it does, but I overall like my final product. I enjoyed growing my technical knowledge during the process of this process. Even though the wiring was more simple than complicated, just getting practice doing things again was good at cementing this in my knowledge bank. Laser cutting for the first time as well was cool and learning how to do that will be useful down the line. Learning Autodesk was a bit of a challenge. Trying to convert the model that I made to sketches that could be laser cut was difficult, but in the end I did it. I would tell my past self to start a bit earlier to maybe try to make the box look nicer. My next steps with this project are minimal. I don't see myself adding on or making a new box. If I was to, however, I would add some more features like it telling me to put the cup back on if it hasn't been there for a while. I would make a nicer looking box as well, one that is sleeker and maybe colored as well. I'd also solder some connections too.
/*
Water Bottle Timer
Peyton Moffatt
This code makes a buzzer make noise after 30 minutes of the IR proximity sensor sensing the water bottle is above it. It also
has an anti-cheat, by ensuring the bottle is gone for at least 5 seconds or else it will continue making noise.
Arduino pin | role | description
___________________________________________________________________
A0 input attached to output leg of IR proximity sensor
8 output connected to active buzzer, to make noise
*/
const int BUZZERPIN = 8; //declare buzzer pin
const int SENSORPIN = A0; //declare IR sensor pin
#include <Wire.h>
unsigned long timer = millis();
unsigned long waittime = 1800000; //Time before buzzer buzzes to alert to drink
int temp = 0;
unsigned long drinkwait = 0; //Variable for the anti-cjeat
void setup() {
// put your setup code here, to run once:
pinMode(BUZZERPIN, OUTPUT); // set buzzer pin mode
pinMode(SENSORPIN, INPUT); //set IR sensor pin mode
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
// detect force sensor input
// if force sensor input > value{
// if it has been long enough{
// make buzzer make noise
// }
// }
// if force sensor inpput < value{
// reset timer variable
// }
int sensval = 0;
sensval = analogRead(SENSORPIN); //Reading value from the IR proximity sensor
Serial.print("Sensor value: ");
Serial.println(sensval);
Serial.print("Millis: ");
Serial.println(millis());
//This resets the buzzer once it detects the cup has been picked up
if (sensval < 60){
if (temp == 0){
temp = 1;
drinkwait = millis() + 5000;
}
timer = millis();
digitalWrite(BUZZERPIN, LOW);
Serial.println("RESET");
}
//This is checking if the cup has been on the sensor for too long, and makes it buzz
if (sensval >= 60 && millis() - timer > waittime){
digitalWrite(BUZZERPIN, HIGH);
temp = 0;
Serial.println("BUZZING");
}
//This is to detect if the cup is put back down too quickly
else if (sensval >= 60 && drinkwait > millis()){
digitalWrite(BUZZERPIN, HIGH);
temp = 0;
Serial.println("DIDNT DRINK LONG ENOUGH");
}
Serial.println(drinkwait);
}