This is an alarm designed to force you to leave your room. Once the set time has reached, the speaker in the device will go off and keep beeping until you turn off the light.
Step 1: Preparing Materials
For the device:
- an Arduino Leonardo board
- a breadboard
- some wires
- 2 LED lights (red & green)
- an Arduino speaker
- an Arduino LCD
- a photoresistor
- two 82Ω resistor
- a 47Ω resistor
For the box (optional):
- a utility knife
- a ruler
- hot glue
- paper (any kind you prefer as long as light can go through it)
Step 2: Circuit
Connect the speaker, LCD, LED lights, and photoresistor on to your Arduino Leonardo board and breadboard as the picture above shows.
The picture doesn't show it, but note that the 47Ω resistor is the one with the photoresistor.
Step 3: Code
The Arduino code for the device is attached. Explanations are provided for you to understand what each line is about.
Step 4: Creating the Box
- Using a ruler and utility knife, cut the 6 pieces out of the cardboard as one of the pictures attached shows. You can decide how big you want your box to be, but make sure the lengths would fit to make a box that's big enough to contain your Arduino and breadboard.
- On one of the side pieces, cut a small hole so the cable for the Arduino board could extend out and connect to power.
- On the top piece, cut a rectangle so the LCD screen could fit through.
- These six pieces will form a box. Use hot glue to glue them together.
- Fit your Arduino board in.
- Take any kind of paper light can go through and tape it on to the big opening. Trim it so it fits.
- Voila! Try your device :)
Step 5: Product
The finished device works like this:
- Set the time for how long you want before the device starts beeping. (The time is set for 7 seconds in the code given. You would know where to change that with the explanations provided within the code).
- After reaching the set time, the speaker will start beeping and the red LED will light up. Until lights are turned off, the noise will stop and the green LED will light up. (The device determines if the lights are turned off when the environment becomes dimmer than the set value. This is explained in the code, too.)
Embedded is a video of my finished product.
Or go to the link: https://www.youtube.com/watch?v=oh9c58yCv3M
This is an entry in the