Smart WakeUp

by Tibe Demeulemeester in Circuits > Raspberry Pi

171 Views, 0 Favorites, 0 Comments

Smart WakeUp

IMG_20220614_124958.jpg
IMG_20220618_144949.jpg
IMG_20220618_160727.jpg
IMG_20220618_160746.jpg

At the end of my first year of MCT (Multimedia and Creative Technologies) I had to make a project. I came up with the idea to create a smart alarm clock.

I got that idea because I've overslept multiple times.

In this Instructable I'm going to share how I made my smart alarm clock.

Materials

blokschema.drawio.png

The first thing I did was think of all the materials I was going to use for my project.

I made a list of all the components and how much it all costs. The price for all the components was € 117,87.

The full list of parts I used for this project are in my github repository

Creating a Database

erd engels.png

When I knew what I wanted to build and what materials I was going to use I started making my database.

I created this ERD (Entity Relationship Diagram) using MySQl Workbench.

In my database there are 5 tables. The main table is the table history where I receive all the data from my sensors and where I can see what action they did. Then I also have a table alarm where I store the data of all the alarm clocks. Lastly I have a table sleep where I store the data when you sleep, when you wake up and when you turn off the alarm.

You can find my SQL database in my github repository

Building the Circuit

breadbord.png

After all the components arrived I started making my circuit.

Firstly, I made a Fritzing scheme so I could visualize my circuit better. Then I recreated my circuit.

You can find my Fritzing scheme in the attachments or in my github repository.

Designing a Website

website.PNG
website2.PNG

Now that I had a database and a circuit I started designing my website.

Before I made my design using html and css I made my design using Adobe XD.

My website has 2 main webpages the first one is the main page. The page that you see when you open the website. You can see all the alarm that you have set and if they will repeat. When you scroll down you can customize the RGB ring. The second page is the graph page. Here you can see how long you have slept or how long it took to turn off the alarm clock.

You can find my design in Adobe XD in my github repository

Writing the Code

code.PNG

Now that I have a design in my head I started coding. Firstly I wrote some code for all my components in a test file. When most of my components worked individually I started putting things together.

When everything worked I started making my website and integrated my components in my website.

You can find the code I wrote and the roadmap of how to run the code my Github repository

Building a Housing

IMG_20220614_124958.jpg
IMG_20220618_144949.jpg
IMG_20220618_160132.jpg
IMG_20220618_160727.jpg
IMG_20220618_160746.jpg
IMG_20220613_201531.jpg
IMG_20220614_105548.jpg

When I was ready with writing my code it was finally time to make my housing for my electronics

I decided to laser cut a box for my circuit. I made the design for my housing using the program Adobe Illustrator. When I had all my wooden plates I started putting my components in the housing. I drilled 3 holes for my buttons and I drilled a hole for the cables of my RGB ring. Finally I cut a hole out for my weight sensor and then placed all my components in the housing.

You can find my design in the attachment below

Downloads