This box reminds the user to write something down at the end of every day to entice journaling habits!
This video demonstrates how the box works. The box is triggered by the IR sensor detecting a person approaching near the box, then it releases the solenoid, popping open the box, and sounds an alarm that doesn’t stop until the user takes the journaling book out of the box.
Process Images and Review
Discussion
This project was overly ambitious when it came to its ideation. Before starting the project, I had an idea of a box that pops open when I get close to it during bedtime. Unbeknownst to me, the box would be a terribly complex thing for me to build without knowing how to design a box that springs open and locks. I 3D modeled a box with an enclosed compartment and finger joints with no issues, so I laser cut all of the pieces out with a few minor hiccups as it was my first-time laser cutting. however, after meeting with Professor Zacharias a few more times working out how I will make the box lock and open, I realized that I need to scratch the top half of the box and redesign it so that it can lock the box in place and be bolted down with two self-opening hinges (which I mistakenly bought over self-closing hinges, which could have saved the effort cutting out notches on the box for the spring of the hinge). The project became a lot more woodshop heavy than I imagined when I decided that I didn’t want to waste a lot of the wood I have laser cut before, so I resorted to a mortise and tenon machine, band saws, and other types of machinery. Because of this, I was unable to get the lock mechanisms fully working with the solenoid because I drilled the hole for holding the solenoid a little too low. Justifiably, I got comments such as “Improve the locker for the next step” and “I think the lock can be worked on a little more” for the critique comments, and I think it is completely valid as my whole box relied on this mechanic. I also got a comment saying that I should “make the top just a flat piece of wood” as the book is very thin and doesn’t need the space up top; I completely agree with this comment as the top was also a lot heavier than the spring of the hinges can handle, so they barely lift the top unless it’s at less of an angle, and it is just a lot more efficient material-wise if I used a flat top.
Overall, I am mostly satisfied with what I had come up with and created, as this project marked a lot of firsts for me, first time designing a mechanism, first time laser cutting, first time combining woodshop skills with wiring and coding, the list goes on. However, I do think that there are also a lot that I could improve on and a lot that I learned from. I learned that it is very easy to over-scope projects and overestimate my skills and abilities, and it is very hard to create a fully functioning mechanism. If the mechanism doesn’t work perfectly, it doesn’t do its job correctly. In the future, I will try my best to gauge and estimate each step of the design and see if it will fit into the schedule. A completed but less fancy project would be better than a project that doesn’t work at all.
I think I won’t try to make a completely new iteration of the project, but I were to, I would change the top like the comment suggested to one piece of wood, sand down the lock mechanism so it closes and opens properly, and add a safekeeping system to prevent the book from not being returned to the chest.
Technical Information
Block Diagram:
Schematic Diagram:
Code:
/* Project Titles: Daily Reminder Box Project Creator: Weiwen "Andy" Jiang Description: Real Time Clock activates the rest of the device when the time is between 9 pm and 11:59 pm.The Arduino first checks for whether or not the mechanism has been triggered or not. If not, the outside IR sensor checks if subjects are approaching the box. If anyone is approaching, the box snaps back the solenoid and releases the lid while activating a buzzer every one second. Then the buzzer continues to beep until the book is removed from the box. The inside IR sensor would detect that removal and stop the buzzer and the solenoid, also marking the mechanism as "triggered already" for the day through a boolean variable. Pin mapping: Arduino pin | role | description ------------|--------|------------- A0 input Outside IR proximity sensor A1 input Inside IR proximity sensor 4 output Buzzer 9 output Solenoid SCL SCL of Real Time Clock SDA SDA of Real Time Clock Real Time Clock code adapted from: https://create.arduino.cc/projecthub/MisterBotBreak/how-to-use-a-real-time-clock-module-ds3231-bc90fe Comment formatting adapted from: Siddarth Parthiban */ #include <config.h> #include "ds3231.h" #include <Wire.h> //Initialising structure t for the Real Time Clock struct ts t; //Initializing pin ports for Arduino const int IROutPin = A0; const int IRInPin = A1; const int SolePin = 9; const int BuzzerPin = 4; //Initialising other variables int currentHour; int irInVal; int irOutVal; int irT = 0; //Setting up boolean variables that stores the status of the box bool trigger = 0; //Stores the status of the buzzer and solenoid bool removed = 0; //Stores the status of the book bool done = 0; //Stores whether or not the mechanism has been triggered for the day //Initialising time variables unsigned long prevBuzztime = 0; unsigned long prevRTCtime = 0; void setup() { Serial.begin(9600);//Setting data rate Wire.begin();//Setting up wire library //Setting up pin mapping pinMode(IROutPin, INPUT); pinMode(IRInPin, INPUT); pinMode(SolePin, OUTPUT); pinMode(BuzzerPin, OUTPUT); //Setting up real time clock DS3231_init(DS3231_CONTROL_INTCN); t.hour = 22; t.min = 10; t.sec = 0; t.mday = 20; t.mon = 2; t.year = 2022; } void loop() { //Read IR proximity sensor input for every 1/4 second if (millis() - irT >= 250) { irOutVal = analogRead(A0); irInVal = analogRead(A1); } //Read real time clock input for every second if (millis() - prevRTCtime >= 1000) { DS3231_get(&t); currentHour = t.hour; prevRTCtime = millis(); } //Check if the box has been activated already today if (done == 0){ // Activate the buzzer and solenoid when it is between 9:00 pm and 11:59 pm and if IR sensor detects subject approaching if (currentHour >= 21) { if (irOutVal > 40) { digitalWrite (SolePin, HIGH); trigger = 1; //stores the status of the alarm removed = 0; //stores the status of the book } } //Sound the buzzer every 1 second and unlock the chest if the book has not been removed if (trigger == 1) { if (removed == 0) { if (millis() - prevBuzztime >= 1000) { if (digitalRead (BuzzerPin) == HIGH) { digitalWrite (BuzzerPin, LOW); } else { digitalWrite (BuzzerPin, HIGH); } prevBuzztime = millis(); } //if the inside IR sensor detects the removal of the book, stop the solenoid and the buzzer, reset the status of the boolean variables of the buzzer, solenoid and the book, change the status of the box to had been activated if (irInVal < 40) { removed = 1; digitalWrite (BuzzerPin, LOW); trigger = 0; digitalWrite (SolePin, LOW); done = 1; } } } } //reset the status of the box to haven't been activated for today at 12am if (currentHour == 0){ done = 0; } }