Inspo
https://www.instructables.com/Arduino-MP3-Alarm-Clock/
https://sunrisealarm.sourceforge.net/
The idea of this project is to make a smart Alarm Clock and night lamp , so you replace the noisy mobile alarm with tablla so you can customize the alarm sound., in shape of decorative night lamp.
Fusion 360 - for designing.
Cura - for slicing and preparing the file to be printed
RDworks - preparing the file for cutting
vecty.co - open source library for the acrylic design
First,I tested different shapes in Fusion 360 to see which design would be better for the project. I tried circle and ellipsoid, then decided on the circle.
Tablla enclosure consist of 3 parts :
3D-printed cylinder.
two wooden circles as covers.
acrylic lamp.
journey teaser:I started the design by modeling, mounting, and joining the parts in Fusion 360. I took the cylinder shape, which would be 3D printed as an STL file, into Cura to begin the printing process. I downloaded the design that would be laser cut from an open-source site called Vectric.co
I collected my components as a buzzle to see the dimensions of the enclosure that can fit all these things inside .
Sketch
-started the sketch by drawing two fully defined concentric circles with diameter 182&180.
-extrude the smaller circle 3 mm to be our base.
-extrude vertically the 2mm between the two circles to form the body in a cylindrical shape with thickness of 2mm and height of 100mm.
- then draw the top part also circle with 180 mm diameter.
- added 2 small circles as a place for the joystick and pushbutton with diameter of 23 mm & 17mm respectively.
extrude the top 3mm and extrude cut the small inner circles.
mounting
-used GrabCad website to download step files for the components to be uploaded to fusion 3560.
-the components we have is breadboard, Arduino, speaker, LCD screen, nonpixel, pushbutton, Joystick.
- I started by mounting the Arduino to the base and added the holes , then mount it to the cylinder for the power outlet.
-then mounted the speaker to the walls , as we don't have the step file for it i draw a box with the speaker dimensions 90mm x 50 mm X 35 mm. with 4 holes .
-next is the nonpixel and LCD screen on the top .
- then overlaid the noepixel with the acrylic frame by adding a slit 3mm x 60 mm .
-uploaded the brackets from the weeks practice and mount it.
fab-lab machine - PRUSA i3- mk2
PLA plastic filament
fab-lab machine - El Malky ML149 CO2 Laser Cutter
PLY wood 3mm ,Screws and nuts
3D design :
I exported the cylindrical body as mesh and upload it on Cura software then added the 4 brackets.
i checked dimensions that it is as i want , then start preparing the file with the following settings:
- infill 20
default layer height 0.2
- temperature 215/ 60
-no support
the total print time was 8h so we let it to be overnight print with 80g
-To print the design we took the g-code file, after checking the parameters and edit the speed and heat ,and upload it into the machine.
-first thing we unloaded the old filament and added the new one, started heating the nozzle and bed , the machine did calibration on the bed then the printing process started .
-I checked the first layer that it is okay.
took the covers, and acrylic accesory part frame that will be laser cut on RDworks to check the paprmeters and start implemntation
In this stage, we need to check the parameters and upload the design on the machine, then adding the 3 mm sheet on the machine, set with the following parameters:
scan - power of 15 with 300 speed.
cut - power of 40 with 45 speed.
-making sure that it is fixed and sit flat .not skewed nor wobbling , then we checked the cutting space on the sheet by using the origin button and checked focus before starting .
wokwi - to simulate the circuit on it
Arduini IDE software
RTC/wires/ nonpixel/ Arduino/wires/9v adaptor/regulator/LCD screen/ 5v adaptor/button/speaker/ joystick
first i built the circuit using wokwi
then applied it on Arduino and breadboard
include tests
- test RTC for the first time
test neopixel
- test the LCD to write what on serial for RTC
test buzzer alone
integrate pushbutton
test joystick with RTC
then the full code
liberarys i used
Since this is a static device, I opted for an adapter as the power source. A 5V adapter was used to power the Arduino, which in turn supplied power to most of the components. the Neopixel required worked with the same 5v didnt need another voltage source.
Initialization:
Initialize RTC (Real-Time Clock) module.
Initialize LCD display.
Initialize NeoPixel LEDs.
Set up input pins for joystick, OK button, and push buttons.
Main Loop:
Read real-time from RTC.
Display current time on LCD.
Check for joystick input:
If joystick pressed, enter setting mode.
In setting mode:
Allow user to input desired hour, minute, and second using the Joystick :
as when moving up the time increase , move down time decrease , move left and right to move from hours to minutes .
Confirm settings when OK button is pressed.
Check for push button presses:
If push button pressed - case 1 , turn NeoPixel white.
If push button pressed - case 2, turn NeoPixel off.
If push button pressed - case 3, turn NeoPixel blue.
If push button pressed - case 4, turn NeoPixel off.
then iterate again
Compare current time with set time:
If current time equals set time, fire buzzer.
First i jointed the base with the body using two brakets
mounted the speaker
then ardino and breadboard
from the top i mounted the screen , led and push button ,
i made sure that everything is working before jointing the top with the encluser.
Display date and time on LCD Screen
Mount the comunents
controlling neopixel using pushbutton
display date and time on lcd screen and set alarm time using joystick
Menna was very helpful along the journey from discovering the components together and check the problem of the encoder , to the design she helped me a lot with it .
also Mego and Diaa helped me a lot in the code as me and Diaa was having similar functions with RTC and Joystick and they worked a lot on the code to modify it.
One Challenge was using Rotary encoder ,gives unstable result as rotating once doesn't always trigger a clear reading.
it has 3 digital pins do the following :
-CLK: Indicates rotation (0 or 1 on serial print).
-DT: Direction of rotation (0 or 1).
-SW: Button press (0 or 1) .
instead we used Joystick and it worked well with the code.
Another Challenge was working with curving shape like cylinder and mount components on it , it was the first time to design something not in form of boxes so it was a bit hard at the beginning.
Despite i made the diameter of the enclosure 180mm which is ig the components almost fit in and there is no place for another bracket that made the base not fully fixed to the enclosure.
I will make the design myself using fusion 360 to be like cactus.
add speaker and Bluetooth modules.
change the whole design.
use millis in the code do control the functions.
add snooze function and make it act a a reminder.
make it have memory to store different times .