Showing posts with label Daylight Alarm Clock. Show all posts
Showing posts with label Daylight Alarm Clock. Show all posts

Tuesday, May 13, 2014

Daylight Alarm Clock - Indefinite Development Hiatus

To put it simply: this isn't working for us.  The real-time clock was a nice addition and guaranteed some sense of normal time-keeping but the the truth of the matter was that both my wife and I found the daylight alarm click unhelpful.  We tried different locations.  I tried different schedules, different total brightnesses, a diffusing enclosure but it simply doesn't work for us.  Maybe we've spent too long with a beeping clock but we find that preferable waking up to a lit room.  

For now, the project is being cancelled.  If we want to try it again, it should be very easy to pick it back up. Until then, no more messing with it.

Wednesday, May 07, 2014

Daylight Alarm Clock - Real-Time Clock

My wife and I are not sure yet whether this whole daylight alarm clock thing is a good idea but I'm pushing ahead for now.  The light failed to wake us the one time we've tried it and the the little direct light that came our way (the lamp was pointed at the ceiling) was too intense for early in the morning.
The first change I've made is moving the light from the dresser across the room to my night stand and putting it under  "frosted glass" (heavy scratched now translucent plastic bowl). We'll see if this works any better.

The big electronics improvement for this test is the use of a real-time clock module, driven by a DS1307. If you don't do much with embedded systems like this, it may not occur to you that the Arduino doesn't come with a built-in clock; it literally has no idea what time it is. To solve that problem common problem, there are many readily and cheaply available modules that can be purchased and wired into the Arduino.  These modules can be queried to determine the time and data and have a battery back-up so that even when they are not being powered by the Arduino, they still keep track of time.  Program the module once with the current time and you never had to worry again.

(Never is an approximation.  At some point the battery will run out and the modules have a reputation of being not atomic-clock accurate. Time can drift several seconds per day.)

Before the inclusion of the real-time clock, I had to program the Arduino with the specific number of seconds from when I plugged it in at night to when I wanted to light to begin fading up the next morning.  Now, with the real-time-clock, I let it take care of worrying about keeping track of time and I just have to program in what time I want to the fade to start.  This is progress and a lot more accurate than my previous technique.

We'll give it a few mornings try and see if we like it any better.

Tuesday, April 29, 2014

Daylight Alarm Clock - Proof of Concept

Have you heard of these daylight alarm clocks?  You set the alarm for your normal wake-up time and a the clock controls an attached light to gradually illuminate the room, reaching its full brightness at the alarm time.  Given that we Hardy's need to wake up early during the week, I've thought about giving the idea try to see if it can make the mornings less difficult.

I've decided to build a bare-bones system that will allow us to determine if there is any use in continuing down this path. If we like it, I expect to include a real-time clock module and a method of setting the time; for now, we're doing none of that.  I'll be using the not-necessarily-accurate internal oscillator on the Arduino to count the number of milliseconds from when the board get's powered up to when I want to light to start to ramp up.

The lamp I'll be using is a 12V LED lamp used in things like track lighting.  Control of the brightness is accomplished using the Arduino's pulse-width modulation for its analogWrite function.  The output from the Arduino pin runs through a 2 kohm resistor and into the base of a MPSA14 transistor. Since this is an NPN transistor, I'll be using low-side switching to pulse the ground leg of the lamp with the high side directly wired to 12V.

Based on my previous experience with LED lighting, I know that the relationship between input signal and output brightness is very non-linear.  Thankfully, somebody had already figured out a good sequence of input values that would a smooth change in brightness.  Take a look for yourself, it seems to work pretty well:




I'm going to move Arduino, lamp, and breadboard to an appropriate place in the bedroom tonight (after programming it so that it "goes off" at the correct time tomorrow morning) and we'll see how we like it.