The Idea and Details About Sunrise Pialarm
Published on:
My custom sunrise alarm clock using a LED strip. Read about the why, what and how. This is a tutorial-like series.
Sunrise Alarm Clocks
They are special clocks. They are not like regular alarms on people’s phones. Instead of playing loud music, it simulates a sunrise. The light will be like a sunrise, it will get brighter and brighter. The period of the light varies from 15 to 60 minutes. These clocks typically use LED lights. This is an existing product, for a list, take a look at best sunrise alarm clocks.
Why Are They Good?
Imitated sunrise can help your Circadian Rhythm, which is like a 24-hour clock that controls some essential things in your body. This rhythm is influenced by various external factors, for example light and darkness. Disruptions (for example jet lag) of this rhythm can have negative effects on you.
The sleep-wake cycle is controlled by the circadian rhythm. During the day, release of hormones like cortisol and norepinephrine will be released which helps wakefulness. At night, the awake related hormones decrease and melatonin production increases, which helps drowsiness. Sunrise, light as an alarm, will help you put into the day/awaken state.
This type of alarm is especially useful if, in the morning (at the time you want to wake up) no light gets into your room. For example, living at part of the world where the sun gets up later.
Lots of articles and studies confirm that natural light will “get you out of bed”. Also, if you feel dizzy when you wake up, this might help you. More tips related to sleep: How to Wake Up Easier.
I Need My Own Alarm
The very few clocks which I liked are high-priced. I knew it could be made easily. With a LED strip I could create the same product. My own alarm can be customized however I want, I have full control over it. Plus, I had the required things at home for it.
Implementation
Physical Part
Two main things I needed: a LED strip and something that could control the light with code. I had a Raspberry Pi which I did not use and knew I could connect the strip to it. A Raspberry Pi is a small one board computer, you can run code on it and connect all kinds of electronic components to it. I connected the LED strip to the board, and now I can control it with code however I want. Read more: How to connect a LED strip to a Raspberry Pi.
My Passcode System
I made my own feature. 31 passcodes are generated which I write down on a paper. To stop the alarm, you have to input that month’s day’s passcode. I put the paper in the kitchen, so I must wake up and go out there. The passcodes are 6 digits long and fully random. I am pretty sure I won’t remember them. Read more: My 31 Days Passcode Based System for My Sunrise Alarm.
Sunrise Lights
I had to find an easy way to program my own sunrise. What color it starts with, where it stops, etc. I created an easy way I can configure a sunrise based on RGB colors. I tested it out and finally made the perfect sunrise. Only problem I found while testing was that the LED was too bright sometimes, but eventually I figured out that. To make sure that I wake up, I included a flashing ending. If I don’t wake up in a few minutes, the LEDs start to fade in and out. Read more: My Own Schema to Create Colorful Sunrise.
Interface to Control
There is a web interface which can be accessed on the local network. It is only on the local network, meaning it only loads if you are connected to my home internet. You can do two things on it: set the alarm, turn off the alarm by providing the passcode. It is the simplest UI. The functionality matters more than the look. It works both on a PC and a mobile. Read more: Web Interface of My Sunrise Alarm
Further Information
I did this project a few months ago, but I did not use it because it had some small issues. I decided to rework it, and here I am sharing it with you. All together it took about a week to develop it.
I made it fully open source: GitHub - 11Firefox11/sunrise-pialarm. If you find it useful please star my repository. All kinds of contribution are welcomed. The project is fully finished for me. I have few ideas how I could make it better, but that won’t come anytime soon.
In this series I will share with you step-by-step how I made Sunrise Pialarm.
Next Part