Good Morning and Welcome to this day
This project is a system that is designed to wake you up in a natural way. This is achieved by a LED light system that slowly dims on in the morning - emulating the rising of the sun. The lights dim on for an half hour - reaching the "On State". This allows your body to become aware of the "rising sun". Our bodies react peacefully to morning light other than an screaming alarm.
Once the lights are in the "On State", the lights will stay in this state for 45 minutes before automatically switching off. The idea behind this system is for the system to operate automatically with minimal user interface. So, how is this achieved?
By being smart! The Arduino Yun runs a HTML page, which can be accessed from your phone - through the WiFi. On this GUI page you can setup your alarms. You can setup your alarm for any day of the week, at unique times. This "alarm" (timer actually) will signal the lights to start the dimming sequence. For the weekends you can decide to sleep in if that is your routine. You setup once, and the system will keep you routine.
Additionally, you can use the HTML page to switch on the lights, and adjust the brightness to a comfortable/romantic level. This is ideal for watching series/movies in the bed =). The best part is, you can also command the lights - Say the movie is 100minutes - to switch off after that time, so that you don't have to.
The idea for this system is designed to be elegant, pleasant, and easy to use.
If you wake up in a good mood, your day will be even better!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: System Overview
In this picture you will see the components of the system.
First of all, we need a decent power supply for powering up the LED lights. The LED lights that I used are rated at 9W. I power them with a 12V supply. The Arduino YUN is powered with a 5V power supply. I used a old cell phone charger connected to the usb port of the Arduino. Some 12V power supplies also have a 5V out, which might be easier for you to use.
The 12V power supply gives power to the dimming circuit. The control input to the dimming circuit is a PWM (output) Pin from the Arduino. This pin controls the brightness. It is important to use a decent power supply, because you are about to connect the Power supply's ground with the GND Pin of the Arduino.
The Dimmer circuit is designed for 5 LED Lights. In application I only used 4 for my room. I installed a LED light in each corner in the roof. I wanted to put the 5th LED light positioned on top of my bed, but it was bright enough with 4.
The Arduino YUN, start up as a WiFi hotspot. You will need to configure that so that your Yun connects to your WiFi. Then you can get the IP of the Arduino, and log in to the HTML webpage to control the system.
You can also enable your router's port forwarding, create an account at www.NoIP.com , and control your home from the internet. -If you don't want to this is not required.
The Arduino YUN can be replaced with an Arduino with a WiFi bridge. However, minor updates to the sketch may be required. You can also leave the whole WiFi part, and just hard code the sketch to a fixed alarm setting. But that removes the interaction to the system, but you can easily do this too.
Step 2: Dimmer Circuit
This is the dimmer circuit that you have to build yourself. I think it is straight forward.
The convention I used to draw this diagram is that each BJT's base runs through R1. So point B,C,D and E is essentially point A in this picture - Running parallel.
VCC is the power from the 12V power supply.
PWM input from the Arduino. The Sketch cater for PIN9, but you can update the Sketch if your Arduino does not have a PWM pin on pin9. I did a good job with the programming of the Sketch, so that others can easily follow and read the code to understand. All the adjustable variables etc are defined in the beginning in the sketch as literals ( #defines).
Upgrade: (for experienced users) You can run each LED LIGHT from a PWM pin from the Arduino. This gives you control on each LED Light. So that you can throw a disco in your room if you like.
Step 3: Webpage Application
These photos are tagged to explain the pictures it self.
This website runs on the Arduino. This is loaded on the SD-Card of the Arduino. There is a readme.txt file that explains where to copy the content to - as you will see later =)
Step 4: Getting It Together
Step 5: Video
This is a demo sketch that I ran to test the design of the dimmer circuit.
This is what you can expect when the lights are dimming on. Except that in this video the dimming is happening in a few seconds and not in the duration of 30 minutes. This is only to demonstrate the dimming and the effect that it can have when dimming the system on for 30 minutes.
Step 6: Setup Arduino
Download the file Firefly - Release.
In this folder you will find:
- Arduino Libraries
- If you want to make changes to the sketch, install these libraries in order to compile.
- This include the timeh and time libraries. There is a "How to Install libs.txt" file inside this folder to help you to install these libraries if you don't know how.
- Arduino Project
- Use Awake_v02.ino Sketch to program your Arduino Yun.
- Open this Sketch and program your arduino with this Sketch
- In this folder you will find a folder named "Alarm" and a text file "Readme_english.txt"
- The content of Alarm is what you are going to copy to the Arduino's SD-CARD.
- This is the HTML file and the assets that is used.
- Read the readme file to assist you in exactly what you need to do.
- You will require some fundamental knowledge about wifi, and how to configure your arduino to connect to a Wifi. -I do explain this in the readme, but if you don't know anything, you might get lost. This is basic usage of the shield and the YUN. The internet is full of support for this if you are struggling.
Participated in the
Make it Glow Contest 2016
Participated in the
Arduino Contest 2016
Participated in the
IoT Builders Contest