My project comes from two main ideas :-
The first idea was artistic coffin that looks very attractive with the artistic touch in and it's shape
The second idea was a box that closes with a timer and keeps your phone locked inside
I made a combination of the two ideas and came out with this and artistic cuffing that closes and opens
I made a combination of the two ideas and came out with this and artistic cuffing that closes and opens
As I said the main idea was to make a box that looks like a coffin and keeps while inside it was something that where it's very inspiring by the way like an addiction box and you keep your mobile wire buried into the Coffin and locked and for a while to finish your job so the shape is not a concidence there was no concidence in that it was all intended from starting to the end shape
The main source of inspirations to me was skulls that has Roses inside and the Shape of the coffin with the second source of inspiration that was their bucks that keeps your mobile inside so I decided not to make a box that keeps your mobile inside just that no but a coffin that is a box inside a coffin or a coffin that is a box and keeps your mobile inside with a timer
What the function of a mobile keeping box that keeps your mobile lockdown for a while you set and a structure of the box as it has two structures the idea is the outer structures is the artistic coffin and the inner structure if keeping box
It will make my personal interest to make an artistic opening/closing coffin box & also it will also solve the problem of mobile addiction and wasting time by it as it can't open since you close it 😃 you'll have to wait till the time passes you lazy work delayer 😃
And of course
And of course Some Artistic Rose
With the main function of
I used Tinker cad to model and simulate my circuit and to test it before circuit building
I used Fusion 360 to model my design and to and make it at the final shape for exportation
For coding and code uploading I used Arduino IDE
after I exported the DXF files I used Laserwork to prepare the file for the laser cutting machine
I used Gemini to give me ideas that he gave me very good ideas that most of them were "nice to have" and others were "great" to have
I used windows features & windows shortcuts to help me save time and work faster like clipboard for copy & keyboard short cuts & mic for making faster
I used paint as draft to note my measurements and hand-sketch my drawing to make it easier to make the model
I used Google to search for ideas and to get visual information that helped me get inspiration and develop the concept.
after exporting STL files from fusion I used Ultimaker Cura to prepare files for 3D Printing making the slicing for the file
I used GrabCAD to find a ready-made hinge model instead of having to build one from scratch. It was exactly what I needed and saved me a ton of time.
I used card board for prototype modeling and enclosure making as outer structer in making the artistic coffin cardboard type
As a temporary joints and holds I used the tape as an alternative for brackets in early prototyping stage
I used scissors for cutting and curves making and hole making in the cardboard that it was really help ful and useful
I used cutter after I defined the sketch or the route I'm going to need , the cutter was the best choice in as it's edges-clean and produces equal edges
Glue gun was the best choice fixing the cardboard pieces together as there no solution with the same efficiency with the card board it's like brackets in early stages
I used pencils , markers and rurales to get accurately cut and dimensioned pieces
I used resistances to limit the current flow head to LEDs so that I keep them safe from burning out
as a reference for the current mode chosen for the time setting preset
I used RGB LED as a reference and a cool look for time going forward percentage as it changes between 5 values when percent changes between 5 values
LCD screen is the main project face and eyes I depend on it to show me time count and time chosen and modes and it's the main part of project
bush button is the input method to the project , it starts , resets , adds time , choses presets and does every thing on the screen
Buzzer is like a reaction it buzzes when something happens starting from clocking on buttons reaching for timer is over , it gives sense to the project
I used the slide switch to easily change between the project's different modes. It's a simple way to turn a feature on or off with just a flick.
Jumper wires are the project veins the connect every component to the main brain and gives power to each component
The Arduino is the brain of my entire project. It's where I upload my code and it controls everything, telling all the other components what to do and when to do it.
The breadboard holds all the components together and lets me connect them without any soldering. It's like a playground for the electronics, making it easy to test connections and change the circuit if needed.
The main power source was too strong for the small components. I used this step-down converter to safely reduce the voltage and give the Arduino and other parts the exact amount of power they need without frying them.
The servo motor is what creates the physical movement in my project. I can program it to turn to a precise angle, which was perfect for operating a locking mechanism or moving a small part.
I chose thin 3mm sheets to build the main body of the project. It's strong enough to be durable but also lightweight and really easy to cut into the exact shapes I designed.
This filament is the raw material for all the custom 3D printed parts. I used it to create the smaller, more detailed pieces that would have been too complex to make out of wood.
The laser cutter was the most important tool for getting clean and precise cuts on the plywood. It let me perfectly cut out all the pieces of my design, ensuring everything would fit together just right.
For the project's internal mounts and custom-shaped components, I used the 3D printer. It allowed me to bring my digital designs to life and create parts that were a perfect fit for the electronics.
Before we start of Cad modeling process we list group of our final cad models we included
Outer structure of box & servo with hinges
The outer artistic coffin structure with unique 3D brackets & Arduino
Decrative parts with electronics & components
Starting with CAD process
Starting with the making the Base and after that making the edges from sketching on the component then making our joints from projections then finally we extrude our sketch as we see to get our like-reality joints for faces
Now we head to making the lids and importing our hinges to make the rotation move and to take our projections to make holes Then we kame rotation joints inside the hinge itself to make it realistic and to take accurate results from the design
Making revolve and rotate joints with the hinge we brought and taking out our measurements to make accurate and extra accurate holes and dimensions for assembling to be right and most accurate it can be
After we made our holes we make our fixing joints and rigid joint between the hinge and the box side to head to the next step and project with the lids to make the full real motion body will go by , so as we see we centerd holes in sketch earlier the we now fix the hinge to centered holes
Now we make the joints for the second hinge and second taste face and we join them together as we did before by taking projections on the center of the face from the hinge holes to make holes in the side face and we then take our make our relations and joints also as we did with the other one
after we are able to move the lead we can simulate the real motion now with simulating the real motion we can see the obstacles and we can solve their problem before we start the making of the project like here we find obstacles so we work on removing them and removing the excess parts
Now we drill and extrude cut for the head base joints places and these joints with faces then we remove an exist part we didn't remove earlier to be all clear and clean then we prepare for the servo motor to include into the design
Now on grab cab library we look for 3D CAD model of servo motor as we need to take projections on it and place it in the design so after we find the servo motor we download it and upload it to the design we are working on then we go to the main Gear of the servo and take our projections on it to make the piece installed to end of the servo
We review the main design and idea that we take our design motion from and we sketch then we review then we get back to sketch after we make the sketch and make sure that the sketch has no mistakes and everything is alright we will have to head to the next step
Here we see that we are making a pass for slider that would be somehow moving and making the transportation movement while the rotation happens here we take our measurements and projections again to make the slider and its pass
Now for the servo we need to make a stand for stand that makes the service table and fix it to the side so it's properly able to do its job and move their lid opening and closing we make this by extruding and sketching using some projections to get accurate measurements to the servo
Now after everything is all set the stand is ready and the arm is done and finished we now fix all things together and join them making joints between them and in order to simulate the real motion that we need to see and check we make rotation joint between the arm and the servo motor to be real then we had to an important step that is to make joints between faces two completely finished that design
Now after we made the main structure of the project we head to the artistic enclosure
First we include servo motor and move it to the location we desire how to make joints with
Second we make the arm for the second server mode we choose to make it from the first arm indirectly
To make the arm unfollowing and independent we mirror the arm and take component for paste as new from the mirrored one
We now make rotation joints with the servo motor
As a fixed joint with the lid we need to locate this joint correctly so we sit the location precisely
After location is set and everything is right we take our projections to make the hole
Now for the base we extrude cut places with joints will get into
For other sites we draw our joint sketches that will get in with the other faces and base
We extra cut our sketches to get the joints places done
And now for the Coffin pieces that we created to be an outer enclosure we make the joints with each other piece
Then using projections and measurements we had to the next joints in the next piece
Like now we got three pieces of the outer frame ready
We had to the other piece downward
Then we head to the next face and using sketches and projections we make our places of joints
Now editing on this packet we make our brand new 3D bracket
We extrude to make the third aixs extrusion
We draw our schedule that will be the hole and the nut
We extrude cut from the middle after we make middle plan to use for
Now with our 3D bracket newly ready we give them the final touches of cuts in the edges and chamfer
We make another different 3D bracket within editable angle to be different from the 90 degrees angle that we just made
We make third axis side to get the Nut and to make the whole in
Our bracket is editable even it can be 90 degrees bracket different from the first bracket
After we made our five 3D different brackets we save them all in the folder brackets they start from the Narrow angle brackets to the cube packet and 90 degrees bracket and wide angle bracket of course
Now we use our special brackets we just made with our non-uniform and angles by giving the bracket the value of the angle we have as it is editable
We start by digging holes and extruding cut holes by using projections in the three axis faces starting with this face
To make extra strong fixes by 3D brackets and not to duplicate with the same direction twice to avoid being useless usage we make one with the upper face and one downward with the base to make extra strong fixings
Now this is the shape while we made our holes and some other holes were not done yet
We continue making holes and place brackets on their holes
And this is the shape for the placing of brackets to get the extra strong results
Now we make joins with pieces with the way we mentioned to get extra strong results
Now we place next brackets
Actually the way we make the bracket connections and joints extra accurate is two measure the angle between the Faces we are going to join with bracket
And move the bracket face or rotate it with the same angle value so they are parallel for plans
then we make the bracket tangent with the face by moving it with the specific distance between it and the face and they are parallel to each other or to just make them tangent
then it is finally ready for us to make projections by
Here after we check everything is right and no mistakes had happened
We select the face we are going to project on
Then we activate the face only and make the sketch then extrude cut it
We do the same with the other faces and base
And also we do the same for old brackets in the top and in the bottom for faces and for that celling or top
Here at the shape of the whole after its correctly done you can not see bracket as they are all collinear 😃 and so work is correct
Now with holing the upper part it is like this when two holes of three are done
We hear our placing the bracket that holds Three Faces from them is the upper part
Now we make tangent as I said earlier
And pingo here is the shape with the all brackets placed
And her the artistic coffin well it's include your ready just missing some final touches
From this final touches comes the holes making for the components that are gonna be installed
And here we come with our components that we are going to use in the project like buttons
After buttons and screen are placed initially we just put the buttons in appropriate location by eyes
Then we actually do our measurements and make the spaces and measurements uniform
We make an update that well make the project more stable and stronger we extend the base and make brackets that are going to join it with the down base and faces to make three joints with only one 2D bracket that will be very useful
Here is the shape our project after we place components
We actually make also four parts four wire holding, that will work by using screw that will hold the wires and also hold the part
We place parts on their locations and ports we extruded cut
And here is how the project looks from upper side
We save and outer version as exportation for being safe if anything happens 😄
Now we had to the next step and write the names of the buttons that we are going to use by craving on wood this world the final step before going to the fabrication preparation
Now here on laser work we try to play sports with no inner spaces between them
We head back to program to adjust pieces poses for laser Exportation
We do best we can on putting parts to the sheet not to make any inner spaces
Here we inserting our Decorative parts into the design
To know the right scale we should make in fusion we use cura to see what scale percent gives us width of 3 cm and pingo!
we get the value
we use the value in scale in fusion
we set the position of the decorative skull and place it in the best place for where it could be
We also insert our dramatic Rose and plce it with adjusting its size and position
Lastly and last , we put our last decorative part befor saving and leaving fusion , and here how our decorative box looks like.
Now we can head for fabrication programes to set our settings 🔨
For LaserWork
We continue setting our cutting settings & parts locations in the sheet and so for colors and cutting speeds we set for 65 and speed 25
for a previously used sheet there was space enough to fabricate the base exactly so all good.
And so for the upper fase we used the sheet from week 2 as it had more than enough space and not to waste material
We set cutting settings and parameters for speed cut and cut options for getting the results we want
For UltiMaker Cura
After we previously exported our parts as mesh STL files we import them in Cura and place them in appropriate places
we also add our decrative models to cura and also we place them in suitable location
We set setting for dynamic but woaaah !!! 19 Hrs?!!!
Of course No , so we head to changing parameters
We set setting for Low and now time is suitable
We continue changing parameters and increasing infill to make our parts stronger
And now we are ready for fabricating 🔨🔨🔨
For Laser Cutting
I connect Laptop to the machine via usb cable
I click on "download" on laser work after connecting laptop to machine
I click on Udisk+ using buttons
I copy my file to the machine memory by clicking "copy to mem"
I click on file button and click on my file using arrow buttons
Last i click "Run" and close the lid and watch my job getting done. like taken videos and photos below
Here my job finally getting fabricated by laser beam cutting 3mm wood sheets
to product the wooden cut parts of my enclosure of project
And here moving to the second sheet to produce the second cut
making Some outer pieces Llke coffin base and box Sides with coffin fame parts
And for the Wood sheet we had befor from week 2
We use it to cut the upper face of the decorative coffin making us using as low waste are as we ever could and it's the best as we learnt
And here comes the rest of week 3 sheet which was un uniform but , getting our diementions from LaserWork and measuring the wood part ny hand we discovered that it's exactly the same diamention wth millimeters , so the is no place for mistake
And for so I made my sketch on the wood back and adjusted it precisely on the LaserCutter bed and every thing went as planed and pingo! the pierce were made successfully !
And this is How Is It Looks Like When it's only wooden parts Assembled
🔰
🔰 This IS its SHAPE 🔰
🔰
And this is How Is It Looks Like When it's only 3D printed parts Positioned and located in places
🔷
🔷 This IS its SHAPE 🔷
🔷
And this is How Is It Looks Like When it's only about components when they are in its places
and positions
🧧
🧧 This IS its SHAPE 🧧
🧧
AS we see in the circuit wiring there are input components and action component
Input Components
These parts send signals to the Arduino.
Push Buttons & Switch: You use these to give commands (set time, start, change mode).
Action Components
These parts receive commands from the Arduino.
Servos: The muscles. They lock and unlock the box.
LCD Screen: The display. It shows the time and status messages.
LEDs (RGB & Yellow): The indicators. They show the current mode and timer status with light.
Buzzer: The speaker. It makes sounds for alerts and button feedback.
An exact simulation circuit of our working circuit and components
We used Power source as 9V adapter
as we couldn't depend on the arduin's 5V port it won't give us much current for motors to work
We used step down Convertor with the power source
as Servo motors wouldn't afford 9 volts and will burn out
it changed our voltage to 5v and gave servos current they need
Project Coding
An 8 hours video 32x Speed up for coding ohase working with the help of friend of mine
with coding & logic
Coding phase explained
first things first, I just had to include the libraries for the main components. Wire and LiquidCrystal_I2C work together to control the LCD screen, and Servo gives me the commands to control the servo motors
here is shown same initial setup code as the first one, covering the libraries and component object creation
This is just me making shortcuts for the pin numbers. It's way easier to remember button1 is for my first button than trying to remember it's on pin 7 I used const because these pin numbers aren't going to change
Just defining the angles for the servos here. This way, I can use the words lockAngle and unlockAngle in the code instead of remembering the numbers 0 and 90. It makes what I'm trying to do more obvious
These are the variables I'm using to keep track of everything. totalSeconds obviously holds the time
the most important one is timerIsRunning. It's just a simple on/off switch (true or false) that I use to tell the code if it should be counting down or if it should be waiting for me to press buttons
Alright this is the setup part that runs once. First I just wake up the screen and turn its light on. Then I tell my two motor variables which pins they're actually connected to on the Arduino
Still in setup. I m telling both servos to move to the unlockAngle right at the start I did this to make sure the box is always open when it first turns on
Here I'm just telling the Arduino which pins are for input and which are for output. For all the buttons and the switch, I used INPUT PULLUP which is a neat trick. It turns on a resistor inside the Arduino so I didn't have to wire them up myself which made the circuit a lot simpler The rest are OUTPUT because the Arduino is sending signals to them.
this is the last part of setup I set the starting color of the RGB light to blue just to show it's on and ready Then I print a Box Ready! message on the screen for a second and a half before clearing it to get ready for the main program
This is the start of the loop the part of the code that runs over and over. First, I read the physical switch to see what mode it's in. The next few lines are a simple check to see if I've just flipped the switch If I did, it raises a flag that tells the screen it needs to be updated. Finally if the switch is in the first position (Mode A), it turns the yellow LED on
This part handles what happens in Mode A when the timer is not running It checks if the screen needs an update and if it does, it clears it and prints "Set Time:" Then it checks if the first button (button1) is being pressed. If it is it makes a quick beep adds 10 minutes (600 seconds) to the timer and sets the displayNeedsUpdate flag so the screen will show the new time.
This is still in the waiting part of Mode A. The first if block checks for the reset button (button3). If I press it, it just sets the timer back to zero. The second if block checks for the start button (button2). If I press it and there's actually time set on the counter it plays a little startup tune saves the starting time sets the timerIsRunning flag to true and finally tells the servos to move to the lockAngle.
this is the code that actually prints the time on the screen while in the "waiting" state. It only runs if the displayNeedsUpdate flag is true (so it doesn't cause flickering). It just does some simple math to convert the total seconds into hours minutes, and seconds, and then prints them neatly on the second line of the LCD The if (h < 10) parts are just to add a leading zero to single-digit numbers so it looks nice like 09 instead of 9
okay this is the start of the countdown logic. The else means this code only runs when timerIsRunning is true.The if millis is the important part; its a timer that runs its code block once per second without freezing everything up. Inside, it subtracts one second from the totalSeconds, clears the screen and prints "Time Left:" to get ready to display the new time
this part controls the RGB light during the countdown. The first if checks if the time is in the last 60 seconds. If it is, it runs the code to make the red light blink. The lastMinuteLedState variable just flips between true and false each second to create that on-off effect If there's more than 60 seconds left it goes to the else block and calculates the time percentage to figure out the color for the gradient effect
this is the Time's Up! code It runs when totalSeconds finally hits zero. It resets the timerIsRunning flag back to false tells the servos to open the box, sets the LED to a solid green color plays a success tune, and then waits for 3 seconds. After that, it returns the LED to the default blue color making the box ready for the next use
This is the beginning of the logic for Mode B (the preset times). First it turns the yellow LED off. Then, if the timer isn't running, it checks if the screen needs an update. If it does it clears the screen and prints the instructions Choose Preset: and "45m 90m 4h.
This is the button logic for Mode B. The first if block checks if you pressed button1. If you did, it plays a beep and a special tune, immediately sets the timer to 45 minutes sets timerIsRunning to true, and locks the servos The next block does the exact same thing for button2 but sets the time to 90 minutes
This just finishes the button checks for Mode B This if block handles button3 setting the time to 4 hours (240 minutes) and starting the timer just like the other two buttons. The final } else { marks the end of the "waiting" state and the beginning of the countdown logic for Mode B (which is a repeat of the countdown code from Mode A
This is the main countdown part. The if millis is a way to make a timer that checks once every second without freezing the program. Inside if the time isn't 0 yet I subtract one second from the counter clear the screen and print "Time Left:" to get it ready for the updated time
This is the code for the last minute warning light. It checks if totalSeconds is 60 or less. If it is, it uses the lastMinuteLedState variable as a simple on off switch. If the switch is true, it turns the red light on. If its false it turns it off. The last line flips the switch for the next second which is what creates the blinking effect
This part runs if there's more than a minute left. It calculates the percentage of time remaining and then uses a simple if and else if chain to pick the right color for that stage of the countdown. It just works its way down from blue to red as the time passes.
This is what happens when the timer finally hits zero. It resets the timerIsRunning flag to false, tells the servos to open the box, sets the LED to a solid green color, and plays a success tune. Then it waits 3 seconds before changing the light back to the default blue color, getting it ready for the next use.
AI helped me find bugs and solve problems
I got help from Gemini AI when the code didn't have any syntax errors and didn't work properly I asked him to help me get the error without solving it and it did , it was logic error that if case was inside another that it didn't work
The prompt : you see this code , this code doesn't work properly although it doesn't have syntax errors , so tell me what are the error and explain them to me but don't solve them just explain and i'll solve now go i'm waiting
Device after it's assembled in one assembly
Device working in desired phase after being assembled
Device working in desired phase after being assembled but closed and from another shot
Device working in desired phase after being assembled in unlocked phase working properly
Device working in desired phase after being assembled opening in the moment and screen is opening
Things I used attaching the device parts together and assembling parts :-
3D angled brackets that were previously designed
M3 nuts
3mm screws
Integration process of the project :-
First joining the box base with the project outer base
Joining other parts after that
IMPORTANT NOTE
((TAPE IN IMAGE IS NOT FOR ASSEMBLING BUT IT'S FOR TEMPORARY HANDLING UNTILL I PLACE OTHER PARTS THEN I REMOVE IT BECAUSE I WORK INDEVIDUALY AND AN'T HOLD THE PIECE AND ALSO JOINING OTHER PIECES I ONLY HAVE 2 HANDS SO I GET THE HELP OF THE TAPE BY MAKING IT HOLD IT TEMPORARY))!!
After removing temporary tape i continue adding screws and join pieces together
Then I add servos and make my wiring
I also add lids at earliear stage but remove it for easier working the adding it again
I add other electronic pieces then the screen and it's side
I add buttons after screen and continue implementing project
I wire everything and make project working correctly
In an earlier step I had already tried the circuit seperatly and it worked as desired
Testing the circuit separately and checking for errors
Then the project in it's pre final phase
Final video of project working
Final project doing its job and locking and unlocking
Yes
I asked my friend mohammed to help me with coding and solving problems which came up later
and he didi helped me
I really needed his help as my level in coding is not as him and most problems were difficult to me
How he helped me : he helped me come up with the logic of the coding and to correctly write code and to solve problems that appeared later with code
Screen was flickering and not clearly visible
my friend mohammed helped me find the solution which was to make falg in the code (Last mode != Current mode)
which means that screen won't refresh till the mode differs from known mode so the flickering was gone
Problem: I forgot to edit holes in design files right before the manufacturing phase.
Solution: I had to go back and solve this issue by renaming every single part from scratch, reconverting them to DXF format, and starting the assembly over. It was a good thing I caught this before I started the fabrication process, because it would have been a massive problem. It likely would have used up my entire material quota, turning into a very costly mistake.
I Hided every thing i'm not going to need and started over
2 THINGS
First: I'd add LDR sensor that makes buzzer go on if box is opened before time is up
Second: I'd add ultra sonic that detects if any movement is happening inside box while timer is running so box closes if its open
The main sketch of the forming of the outer enclosure
For making it easier for my self I created an empty part that has only a sketch !!!
That I would show this special sketch to create the different 6 frame parts and edges & it realllly helped it took me no time with great ease ❤️
The sketch was all about many areas calculated together to form separated parts with the same intersection areas to form the final cut parts of sheets with exact true angles and dimensions that was in the end very successful however it took hours but it was worth.
The 3D Brackets ideas that I came up with ⚡⚡
After we made our five 3D different brackets we save them all in the folder brackets they start from the Narrow angle brackets to the cube packet and 90 degrees bracket and wide angle bracket of course
We extrude to make the third aixs extrusion