The solution for creating such an alarm clock may be suitable for those who have long been tired of a normal alarm clock with a nasty signal. The lamp on it has the ability to smoothly increase brightness, thereby simulating the sunrise. The main feature of such an alarm clock is the ability to fine-tune its components. A repeating signal with a setting for any day of the week, a smooth eclipse, the maximum brightness of the light, the duration of the increase in brightness, etc.
Materials:
- Arduino Uno
- bright LEDs 12 pcs
- 300 Ohm resistors 12 pcs
- NPN transistor (author uses TIP-120)
- buttons 7 pcs
- resistors of 10 kOhm 8 pcs
- LCD display (the author uses an LCD display with I2C interface to save Arduino ports)
- squeaker (buzzer)
- plugs for connecting parts to Arduino
Circuit assembly:
To facilitate connecting / disconnecting LEDs to the circuit, the author soldered the connector to the wires for the LEDs. This will come in handy when the entire structure will fit in the housing at the end of the job.
Further, all other components are connected according to the scheme.
The source code of the program can be downloaded under the article
The archive contains a sketch for Arduino and all libraries. The author decided not to create the "Bounce", "LiquidCristal_I2C" and "Wire" libraries, but if you decide you can also use them, they are in the public domain. The author also created
After downloading the program in Arduino, you can begin to create the enclosure.
LEDs are placed in the ceiling, the display and buttons are mounted in specially drilled places for them.
Here is the alarm in the final assembly:
The display says “Maandag” which means “Monday” in the author’s language, but everything is changed to English in the code.