The alarm is finished and functional! I have not been able to update as frequently as I would have liked so this will be an overview of what the design is now, some changes that I had made from the last update, and (of course) what I plan to do for the next version.
The Current System The alarm on the iPod or phone goes off silently with only lights going off. This is the primary alarm, or PA (contrasted with the secondary alarm, or SA, which is the Arduino). The PA is resting on the top of the box, which contains an Arduino Uno and a circuit board. Also included is a photoresistor, which has its head sitting flush with the box. A photoresistor is an electrical component whose resistance varies with how much light it gets. When the alarm goes off, the Arduino can sense it by the difference in the resistance given by the photoresistor. When this happens, the SA begins its work. For the rest of the SA’s sequence, it will ignore the PA completely.
The first thing the SA does is to slowly increase the brightness of two white LEDs mounted into a sleeping mask worn by the user. These LEDs are mounted over the eyes, making sure the user gets all the light and none is expelled to the room. The LEDs are mounted in soft foam and the entire mask is made from a thin fabric that fits over the user’s head, keeping it in place over night. The mask is connected to the SA with a flexible wire that leave out of the top of the mask to the SA, which is placed behind the user. This makes sure the cord cannot be accidentally wrapped around the user’s neck.
After the LEDs are at full brightness (about five minutes), they begin to blink slowly. The idea here is that the fading on is a gradual transition for the brain from sleep to wakefulness. Since the brain will most likely not completely wake up from the fading, the blinking then begins to transition the brain from being “half asleep” to fully awake. This blinking continues until one of three things happen.
The first thing that can happen is the off button on the SA can be pressed, resetting the program. The SA can now be activated by the PA once again.
The second thing that can happen is the SA’s snooze button can be pressed. This causes the blinking to stop momentarily, after which the SA will blink once for every time the snooze button has been pressed. The pause in blinking is so the user can differentiate between the blinking to wake the user up and the blinking showing how many times the snooze button has been pressed. This second blinking gives the user some indication of how long it has been since the alarm has gone off.
The third and final thing that can happen is mainly there for Sabbath observers, although it is also useful if you’re afraid the alarm will go off by accident while you’re away and can’t turn it off. Because the alarm cannot be turned off on the Sabbath, the SA is programmed so that if it has been blinking for 10 minutes, it automatically resets, just as if the off button had been pressed. The assumption is that if it wasn’t the Sabbath and the user just hasn’t woken up after 10 minute of a light blinking in their face, they’re not going to wake up if it continues either.
Improvements There are many improvements I plan to make to this design. However, these will be improvements to the current design, and not a new design in itself, making this future version V3.2.
Changes to physical design:
- For safety reasons, I plan to make the cord connecting the mask to the SA built so that if it’s pulled, it will come out of the mask as an extra precaution against choking. However, I am trying to think of different ways this problem can be avoided, as this method can also cause the alarm to be disconnected for other reasons, like it getting caught on the bed.
- The base of the SA, now a cardboard box, will be built into a more permanent structure, probably either wood or plastic.
- The Arduino will be replaced with a PICAXE microcontroller. This was actually part of the initial design but because I was unable to connect to the PICAXE chip, I had to use the Arduino instead. The PICAXE will be used because it is significantly cheaper and I prefer to use the Arduino continually and not have it stuck in one project.
- The mask will be completely redesigned. One thing I noticed while using this alarm is that the mask, while soft, is not very comfortable for longer periods of time. Although it is completely soft and cannot dig into the user’s face, I’d prefer if it were flat. The foam will be removed and the LEDs possibly replaced with flat ones.
- Right now, the PA must be placed face down on the SA’s base. I might make the photoresistor removable and attached to a smaller plate so that it can be pressed against any surface that the user wants to use the PA as. This means that the user won’t have to worry about the PA falling off the SA as well as the ability to use multiple PAs at once. The user can simply put the photoresistor plate in a dark box with whatever PAs they want and if any of them go off, the SA will be activated.
Changes in the programming
- I will be making the fade take a little longer to get to full brightness and stay at full brightness for a minute or two before it starts blinking. This is more of a personal preference that I want to try out.
Here is a gallery of pictures from the build process.
Here are pictures from the design right before this one. You can see the evolution the design had from this to the final product.
April 26, 2015 update: I have realized that this project doesn’t make sense to continue since I no longer have a need for a specialized alarm. While the project would be fun and I might come back to it later should circumstances change, for now I’m going to work on projects that are fun and useful.