This instructable was created in fulfillment of the project requirement of the course Physical Interaction(DH2400) at the Royal Institute of Technology in Sweden, Stockholm.
This project is to design and build a device which re-purpose or re-use parts from outdated everyday devices. In this case, we decided to build an alarm clock which could control your window blinds, and by doing so it allows the user to get natural light into the room before waking up, easing up the wake-up process.
This instructable is divided into 4 steps:
2. Building the clock
3. Blinds controller
4. Case building
Step 1: Preparation
To build this, you can use the following:
The parts from an old battery driven alarm clock (we re-used the bell and mini-sledge, the DC-motor, the switch and the pointers)
1 x Breadboard
2 x Adafruit Feather Huzzah + battery for each
1 x Arduino Uno R3 + battery
1 x Phidgets Precision Light Sensor 1127_0
1 x Hitec HS-422 servo motor
1 x Fitec FS90R continous servo motor
1 x White/RGB LED
2 x Regular LED
5 x 270 ohm resistor
1 x 1k ohm resistor
1 x PNP transistor
1 x standard DC motor (should be a part of the alarm clock)
1 x 3V battery pack
Wires, Alot of wires.
Before starting to connect anything, first we have to pick apart a few.
Disassemble the alarm clock, you will find the switch, alarm bell and alarm motor. We are keeping those for the construction of this project.
To be able to use the servo motor as an input-only device, we need to modify it. Opening it up will reveal the internal wirings of the servo, what we need to do is to solder a new jumper cable to the potentiometer. This would allow us to read position data from the servo motor even after we detach it in the code.
Step 2: Build the Clock
The clock part of this project serves as an controller for all devices included. It is the main interaction part and it is here the alarm is set and devices are controlled from.
First, download and install the Time library for Arduino, this will allow the Arduino to do have some more advanced time keeping functionalities that we need in this project.
Here is the code for all the functions in this alarm clock, for demonstration purposes, the system time and alarm time is hardcoded, changing the commented if-statements would allow this alarm clock to function in realistic settings.
For wiring of the devices, the attached image above will demonstrate how devices are attached to each other.
You will notice that in the schematics, there are an Arduino board and an Feather Huzzah board. The Feather Huzzah board is used purely as an wifi module, to allow wireless communication between the clock and the blinds controller. This could be replaced by a wifi-module connected directly to the Arduino instead. Code for the Feather Huzzah this specific setup is found here.
The connection setup details are hardcoded (SSID and password), you need to assign these values for your own wifi router for this to work.
To be able to set the alarm, you will need to design and print a grayscale picture similar to the attached picture, so that the light sensor could differentiate between different hours.
Step 3: Blinds Controller
The blinds controller part is a client to the clock part, which listens the clock to see when the blinds should be opened.
The blinds controller communicates with the clock through a UDP connection over a common WiFi (for example the one in your home). Constructing it is simple enough (see Fritizing schematics above) and the only thing needed to change is the hardcoded SSID and Password for your WiFi in the code (found here) and connect a power source of some sort.
Step 4: Case Building
As shown above fitting everything in a single case can prove difficult when there are many moving parts but is absolutely do-able. We used a single plank which we attached most components to, since it was important that they remain stable, and foamboard for the remaining walls and the servo's wheel.
When constructing the custom gradient-wheel-light-sensor we fit the RGB-LED inside a straw to send the light emitted in one direction without it being so close to the wheel that it would burn it. With the LED on one side of the gradient wheel we position the light sensor on the opposite side meaning. Every time the user turns the gradient and sets a new time, the light shines through the gradient and a new light-value read by the sensor which is then calculated by the controller to tell what time the wheel is positioned at.
Attach the blinds controller to your blinds, hang the clock on the wall and you're done! Enjoy waking up with natural light from outside your window!