Sunteți pe pagina 1din 9

Home Sign Up!

Browse Community Submit


All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech

Building IllyClock - an alarm clock in a coffee can


by florinc on February 18, 2010 Table of Contents License: Attribution Non-commercial Share Alike (by-nc-sa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro: Building IllyClock - an alarm clock in a coffee can . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 1: Assembling Wiseduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 2: Assembling the Dual bi-color LED matrix shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 3: Programming Wiseduino (uploading the sketch) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 4: Prepare the coffee can enclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 5: Install electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . step 6: Use it . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 4 6 6 7 8 9 9

http://www.instructables.com/id/Building-IllyClock-an-alarm-clock-in-a-coffee-ca/

License: Attribution Non-commercial Share Alike (by-nc-sa) Intro: Building IllyClock - an alarm clock in a coffee can
The purpose of this project is to build an alarm clock similar to the one presented in the video below.

Beside the enclosure, the original feature of IllyClock is showing the time in colors: 3 hours before wake-up time, color changes from green to orange; 1 hour before wake-up, the time is shown in red. One can estimate how much sleep is left just by squinting at the clock. Parts you will need: - Illy coffee can (250g); chosen because it is easy to find, has a screw-in lid (for ease of access to internals) and it can nicely accommodate two medium size LED matrices on top of each other; - Wiseduino kit (buy here ): this is an Arduino clone with a real time clock chip (DS1307) and an EEPROM (24LC256) on board; - dual bi-color LED matrix shield kit (buy here ). These are the five major steps in building this project: 1. assembling Wiseduino; 2. assembling the LED matrix shield; 3. programming Wiseduino with the provided software (open source, downloadable); 4. preparing the coffee can as an enclosure (cutting the display opening in the coffee can, drilling the lid for the rotary encoder); 5. install the electronics.

Image Notes 1. rotary encoder 2. coffee can 3. dual RG LED matrix

http://www.instructables.com/id/Building-IllyClock-an-alarm-clock-in-a-coffee-ca/

step 1: Assembling Wiseduino


Wiseduino is an Arduino clone which has real time clock (DS1307) and EEPROM (24LC256) on board. Wiseduino can be purchased as kit here . The kit contains the following components: - PCB (in black); - ATmega328P micro controller with the Arduino bootloader; - 28-pin socket for ATmega328P; - resonator 16MHz; - DS1307 real time clock chip; - 24LC256 EEPROM chip; - crystal 32768Hz; - CR1220 coin battery; - coin battery holder; - 2N2222 transistor; - 10K resistor (4 pieces); - 100nF capacitor (4 pieces); - 40-pin female header; - 10-pin female header; - 6-pin male angled header; - SPDT micro switch; - 2-pin JST angled power connector; - power cables: one with 9V battery snap connector, the other with 2-pin JST jack. To assemble Wiseduino follow these sub-steps. a. Start with soldering the IC sockets. Make sure their notches match those on the silkscreen, so the correct orientation of the chips will be easy to identify later, when the chips are inserted. b. Solder the battery holder. (photo 2 ) c. Solder the power connector, then the 6-pin angled male header (used as FTDI connector). d. Place the micro switch on the pads and solder the middle terminal, so that the switch's lever sticks 1mm out of the board. After the micro switch is positioned properly, solder the other 2 terminals. (photo 3 ) e. Solder the 4 resistors, placed vertically. They all have the same value (10K), so there is no possibility for error. f. Solder the 4 capacitors. As well, they all have the same value (100nF). g. Next solder the 16MHz resonator. Its orientation is not important. h. Insert the small cylindrical crystal (32768Hz, used by real time clock chip). Bend its terminals so that the crystal is parallel and close to the board, then solder it. (photo 4) i. Break the 40-pin female header into four pieces: two 8-pin headers and two 6-pin headers. This should be done by removing one pin between each two pieces, then cut (more like crush) with a wire cutter along the empty space. j. Position the headers into their right places along the sides of the board. Turn the board over and let it sit on the headers, making sure they are perpendicular to the board. Now solder all four headers. (photo 5 ) k. Solder the transistor, placing it to match its shape on the silkscreen. l. Insert the 3 chips into their respective sockets, paying attention to their orientation. Their notches must match those in the sockets (whose notches should match those on the silkscreen). m. Insert the coin battery in its holder. At this point Wiseduino is assembled and ready to be used/tested. It should look like in photo 1 .

http://www.instructables.com/id/Building-IllyClock-an-alarm-clock-in-a-coffee-ca/

step 2: Assembling the Dual bi-color LED matrix shield


IllyClock displays the time on a 8x16 LED matrix, made by putting together two 8x8 bi-color, medium size, LED matrices. The LEDs are driven by shift registers controlled by Wiseduino. The display itself is an Arduino shield, which can be also bought here as a kit. This "Dual bi-color LED matrix shield" kit contains the following components (photo 8 ): - PCB; - 2 medium size (47mm x 47mm) red-green LED matrices; - 4 shift registers (74HC595); - transistor array ULN2803; - 4 16-pin IC sockets for the shift registers; - 32 resistors (100 ohm); - 4 decoupling capacitors (100nF); - 4 12-pin machined female headers (used as sockets for the LED matrices); - 40-pin male header; - rotary encoder with push button and knob. Here are the mini-steps required to assemble the "Dual bi-color LED matrix shield": a. insert and solder the IC sockets, making sure their orientation is correct (their notches match those on the silkscreen) (photo 2 ); b. cut four pieces out of the 40-pin male header: two 6-pin and two 8-pin; plug them into the Wiseduino extension headers, then insert the shield on top and solder these male headers to the shield (photo 3 ); c. solder the four 12-pin female headers, making sure they are perpendicular to the board (photo 4 ); LED the matrices will be plugged into these later; d. solder the 32 resistors (photo 5 ); e. solder the 4 decoupling capacitors (photo 6 );

http://www.instructables.com/id/Building-IllyClock-an-alarm-clock-in-a-coffee-ca/

f. insert and solder the transistor array chip (ULN2803); pay attention to its orientation, so that its notch matches the one on silkscreen; g. insert the shift register chips (74HC595) into their sockets, again paying attention to their orientation (photo 7 ); h. lastly, insert the LED matrices into their connectors; their pin numbers are hand-written on the back, so make sure these pin numbers match those on the silkscreen. In the end, the assembled LED matrix shield should look similar to that in photo 1 .

Image Notes 1. 32 resistors 2. 4 decoupling capacitors 3. 40-pin male header

http://www.instructables.com/id/Building-IllyClock-an-alarm-clock-in-a-coffee-ca/

4. 4 12-pin machined female headers (sockets for LED matrices) 5. 2 8x8 red-green LED matrices 6. PCB

step 3: Programming Wiseduino (uploading the sketch)


Download the IllyClock sketch from here . The code was tested with Arduino IDE 17. Once compiled, upload the sketch to Wiseduino through an FTDI cable (or FTDI breakout ).

step 4: Prepare the coffee can enclosure


This is where we transform the coffee can into an enclosure. The work consists in: a. cutting an opening on the side of the can for the LED display; To draw the lines that need to be cut in the metal can, first prepare a paper rectangle matching the dimensions of the LED display. Place this template over the side of the can, and follow its shape with a marker. Next, use a dremmel tool to cut along the lines. After this operation, the edges will be sharp. Stick some electric tape over them. b. drilling a hole in the lid for the rotary encoder; Use a 5/16" drill bit, which is just a bit thicker than the "shoulder" of the rotary encoder. Drill a hole in the center of the lid. c. drilling another hole on the side, close the the bottom, for the power cable; Chose a drill bit which is a tad thicker than the USB cable you have. Drill the hole at the base of the coffee can, opposite the opening for display. d. drilling a few more holes for the speaker. Optionally (if you want to have a functional buzzer for alarm), drill a few small holes for the speaker/buzzer. Think well about their positioning, since the speaker will be placed in the can behind these holes. A good place could be close to the bottom, about 60 degrees from the hole for the power cable.

http://www.instructables.com/id/Building-IllyClock-an-alarm-clock-in-a-coffee-ca/

Image Notes 1. cut opening here 2. here drill hole for rotary encoder

step 5: Install electronics


This is where we enclose the sub-assemblies (boards, parts). Before that (optionally though), we should install the rotary encoder on its own little board. As shown in photo 2 , I used a piece of leftover perfboard, where I also soldered a female header, as a way to connect the wires going to the shield (inputs from the rotary encoder). Other things to do are: a. Mount the rotary encoder in the lid. Insert the shaft, screw the nut on the outside, then attach the knob to the shaft. b. Make and attach the power cable. Whatever USB cable you have, cut the connector opposite to the one that plugs into the computer; insert this end of the cable into the can through the special hole drilled in step 4.c. With the USB cable inserted, solder together the red and black wires, respectively, of the USB cable and the JST cable that comes with Wiseduino. Insulate the 2 wire connections with electric tape. c. Insert the boards. Plug the LED matrix shield into Wiseduino, then insert the 2 boards into the can, aligning the matrices with the opening. Once in place, insert a kitchen sponge behind the boards, making sure it pushes firmly against the can. (photo 1 and 3 ) d. Attach the speaker/buzzer (optional). Place the buzzer behind the set of holes drilled in step 4.d. Stick the buzzer to the can with electric tape.

http://www.instructables.com/id/Building-IllyClock-an-alarm-clock-in-a-coffee-ca/

Image Notes 1. kitchen sponge 2. USB cable used for power Image Notes 1. the 5 terminals of the rotary encoder are all connected to the header

Image Notes 1. dual RG LED matrix shield 2. Wiseduino (with real time clock on board) 3. rotary encoder connected to the shield through 5 wires

step 6: Use it
The attached image shows the state-machine diagram for the IllyClock. The "stable" (main) state is "show current time" . From this state, by pressing the knob in different ways (once, twice, or prolonged), various states are entered, as shown.

http://www.instructables.com/id/Building-IllyClock-an-alarm-clock-in-a-coffee-ca/

Related Instructables

BookClock - a wise clock in a cardboard box by florinc

Solid Wood Digital Clock by J_Hodgie

LED Matrix Test 1 using an AS1107 IC (video) by earthshine

The BlokClok Concept Arduino driven RGB Abstract Clock (video) by earthshine

Pong with 8x8 Led Matrix on Arduino (video) by bsoares

Assembling "Wise Clock 2" by florinc

LED Matrix Coffee Table (slideshow) by trialex

Make a 8x10 L.E.D Matrix by Syst3mX

Advertisements

http://www.instructables.com/id/Building-IllyClock-an-alarm-clock-in-a-coffee-ca/

S-ar putea să vă placă și