Smart Light Alarm

Project overview

Smart Light Alarm is a device that helps you quickly wake up in the morning by emulating a sunrise. It is based on an Arduino microcontroller, RTC module and big LED. I designed an electrical circuit, created a driver for RTC and made the whole program in C++. You can set the desired time for sunrise, and it will help you feel it even in winter. Arduino uses its PWM (Pulse-Width Modulation) signal to change the brightness of the LED and make it gradually increase brightness as the sun would in the sunrise.

Business Value

Many people struggle to wake up early in the morning when it is winter and sunrise is delayed. For example, in Washington, in summer-time, you may find sunrise at 5:40, however, in winter, sunrise happens at 7:30. That causes trouble for people to get up in winter and be at work in time. That is where Smart Light Alarm comes to help! You can set the timing for sunrise emulation and fool your brain into stopping producing melatonin, which helps you wake up.

Technical Details

The project consists of two parts: Electrical Circuits and Programming in C++. The circuit is straightforward. It only connects the RTC module to Arduino with I2C pins and connects LED to Arduino. However, basic calculations are required to build a proper amplifier with transistors, as LED were 12V and 1A, whereas Arduino outputs only 5V and 50mA.

Challenges

  • Arduino limitations. Arduino has limited timer precision. Its embedded millis() function increments every 1.024 ms, not every 1 ms. Therefore, I couldn’t use an embedded Arduino timer for time measurement.

Solution: I researched how other devices measure time accurately and found an RTC (Real Time Clock) module that all computers and other devices have. I bought one and connected it through the I2C protocol to Arduino. That enabled Arduino to use a particular API to get an accurate time.

  • No Library for RTC. The real-time clock module had no working library that would provide an API to Arduino. The only existing libraries were not working as they were supposed to.

Solution: I explored the datasheet on the RTC module and created my library. I have gone to the lowest level, operating with registers and hex-values they are supposed to have for various settings. I made an API that communicates through I2C protocol and works directly with RTC module memory.

Future Works

There are several ways to improve the project to make it a high-value product on the market:

  • Low Energy. One of the ways to decrease energy consumption is to set Timer Interruption that will wake up the device right before sunrise. That would mean the device will be in sleep mode all the rest time, excluding the exact sunrise process, and only RTC module will work to generate Wake Up Signal.

  • Design. A mechanical design is the only thing that differentiates the device from its competitors. It lacks a beautiful structure and miniature case. For example, Lepro Table Lamp has a fabulous light diffuser that makes light smooth. Also, it has a smooth and rounded form to make it fit in the interior. My Light Alarm device needs to have good visual quality as its competitors.

Example of competitive design solution

Results

I created a working prototype of the device that helps people to wake up early as it emulates sunrise at any time they want. My product is not ready for the market, as it doesn’t have a case or suitable user interface. However, the electrical circuit and controlling program are already producing value, and the prototype could already be used as it is supposed to be used as a device.

You can see a video below that shows how bright the device could shine. The sunrise that slowly adds lighter from complete darkness to this light level will work as sunrise would.

Video: https://youtube.com/shorts/pd-yPMGe9Do

Previous
Previous

Acoustic signal classification

Next
Next

Digital Signal Processing