I made a project that i call smartwake. It is essentially an alarmclock that also measures light intensity, air humidity and barometric pressure.
Here I will explain how it works.
For this project i used:
- raspberry pi 3
- light dependent resistor
- adafruit oled
- piezo buzzer
- 2 10k resistors
As for the housing I used a box i had lying around, it doesn't really matter what you use just make sure you dont break anything trying to fit it
Step 1: Setup Raspberry Pi
First you have to get your raspberry running properly. To do this you will have to install a mysql server for the database in the backend.
Secondly you will also have to have a webserver running and you have to be able to connect your backend to the frontend with socketio.
My instructables however assumes your pi is already set up to do this, but if you want to know how to do this there are many tutorials out there explaining that.
Step 2: Lay All Your Components Out
An important step if you want to have a clear view of everything at your disposal is not just heaping everything up, but make it easy to setup and connect.
Step 3: Wiring
Next you have to hook up all your sensors, the screen and the buzzer. I have included a picture showing how everything has to be connected, but do make sure your resistors are 10k ohm and watch out to not use the wrong voltages!
My components explained:
- DHT11 which I use for measuring the air humidity.
- BMP180 for measuring the barometric pressure.
- LDR for measuring the light intensity.
- MCP3008 for reading the ldr analogically.
- Buzzer for the alarms
- OLED for displaying the ip-adress and the clock
Step 4: Housing
In this step you make a nice housing covering everything up. Mine however is way too big and ideally you would take something smaller, but I had this wooden box laying around and decided to do something with it.
After this step it should be ready to plug it in and just use it. The time will be displayed on th screen and so will the ip-adress.