Wake Up Clock




Introduction: Wake Up Clock

What time is it? It’s wake up time! We’ll explore the Intel® Galileo Gen 2 board’s real time clock (RTC).

The RTC, once set up, will run even if the board is turned off so long as it gets power from the attached battery. While this is a relatively simple function of the board, it has its obvious uses - scheduling, timing, or calculating intervals.

We will be making a “wake up clock” which will turn on and illuminate the room slowly, simulating a morning sunrise. Hopefully, it will make waking up on Mondays a bit easier.

Here is a video of the completed project.

This tutorial was originally published on Intel Communities here.

Step 1: Needed Components and Tools

  1. Intel® Galileo Gen 2
  2. Intel® Galileo Gen 2 power supply
  3. Arduino Protoshield
  4. LED power supply
  5. 1 High power white LED(3v 700mA)
  6. 1 1000 μF Capacitor
  7. 1 2.1 mm DC jack-to-screw terminal adaptor
  8. 1 10k potentiometer
  9. 1 1.8Ohm 2w resistor
  10. 1 LM317t voltage regulator
  11. 2 10kOhm resistor
  12. 1 2n7000 transistor
  13. 1 Coin battery holder Jumper wires
  14. Colored wire
  15. Pin header
  16. 1 8 mm magnet
  17. Stiff wire (that is attracted to magnets)
  18. Wood glue
  19. Hot glue sticks
  20. 4 mm MDF components - lasercut according to drawing
  21. Plexiglas components - lasercut according to drawing
  22. Nuts and bolts
  23. Rubberband

Step 2: Sort the Lasercut Pieces for Easier Construction.

Sort all the pieces according to the image

Step 3: Solder the Electronics

Use the schematic to solder the electronic components together.

Step 4: Solder the Magnetic Switch

Cut two 20 cm lengths of stiff wire and solder them to the protoshield assembly as indicated in the drawings above.

Step 5: Attach the Intel® Galileo Gen 2 Board

Use parts B4 as spacers for the board.

Step 6: Connect the Intel® Galileo Gen 2 Board

  1. Connect two jumper wires to the two pin headers
  2. Connect the protoshield to the Intel® Galileo Gen 2 board
  3. Connect the power to the RTC
  4. Connect the two jumper wires from the Intel® Galileo Gen 2 board to the protoshield assembly
  5. Insert the coin battery

Step 7: Connect the LED

  1. Attach the LED to the back plate
  2. Place the LED into Part B2
  3. Screw onto Part A8

Step 8: Connect the Potentiometer

  1. Insert the potentiometer
  2. Place the potentiometer into Part A9 making sure to align the tab properly
  3. Secure with the bolt provided

Step 9: Assemble the Whole Case Pt1

  1. Attach Part A5 to Part A9
  2. Attach Part A8 and Part A9 to Part A6
  3. Attach Part A3 to Part A6
  4. Insert Part A4 to Part A6
  5. Place Part A7 onto assembly
  6. Place Part A1 onto assembly
  7. Connect the terminal adaptor
  8. Insert the positive and negative leads into the adaptor
  9. Insert the 1000 μF capacitor and tighten screws to secure

Step 10: Assemble the Whole Case Pt2

  1. Place the alarm dial onto the face of the clock
  2. Insert the potentiometer through the hole on Part A9. Make sure to line up the stabilizing tab on the potentiometer to the small hole provided
  3. Screw on the locking nut
  4. Slip Part B1 onto the potentiometer knob
  5. Install the magnetic switch
  6. Push the wires through the holes at the bottom of Part A9
  7. Cut off excess wire
  8. Bend the wires back through the hole
  9. Attach Part B3 to Part A4 where indicated
  10. Glue the magnet into the hole
  11. Make sure that both wires touch the magnet
  12. Note: It helps if the wires can slide loosely in and out so that both will make contact with the magnet

Step 11: Assemble the Whole Case Pt3

  1. Place the dial and Plexiglass cover
  2. Slide Part B1 on the potentiometer
  3. Glue the Part C1 onto Part A9
  4. Attach the power cables and USB to program the board
  5. Detach the USB and close the clock
  6. Attach Part A2 to the assembly

Step 12: Upload the Sketch

Make sure you have the Arduino IDE from Intel® properly installed.

If you haven’t done that yet, go through the Getting Started with Intel® Galileo Gen 2 guide

Download RunAlarm and SetTime sketch from the attachment and place it in the sketchbook folder.

Open the SetTime sketch, configure the current time for your Intel® Galileo Gen 2 by modifying the line dateCmd+="'20150120 07:14:40'";

Upload the sketch. It’ll configure your clock accordingly.

Then upload the RunAlarm sketch. The alarm clock would be up and running after this point.

Step 13: (Optional) Use the Web Interface

Alternatively, you can use a web interface to set the time and alarm!

We made a web server with node.js, so you can check the time/alarm setting in your Galileo, as well as changing the settings whenever you want.

Set up the web interface

  1. Find the ip address of the Intel® Galileo Gen 2, corresponding to the method of connection.
  2. Download Server.js from the attachment to your computer, and put the ip address found from last step to it. Look for the line “var IP='';”
  3. Transfer Server.js to the Intel® Galileo Gen 2. Use scp if you’re using Linux/mac, or pscp if you’re using windows. e.g. “scp /path/to/server.js root@[insert Intel® Galileo Gen 2 IP here]:/home/root/”
  4. Start the server.
  5. SSH to the Intel® Galileo Gen 2 terminal, type “node
    /home/root/server.js” to start the node.js server. You’ll see the message “Server running at http://[your Intel® Galileo Gen 2 IP here]:1337/” in the terminal when it’s ready.
  6. Test the server.
  7. Open a browser in your computer, type [your Intel® Galileo Gen 2 IP here]:1337 in the address bar to access the web interface.

Configure the time and alarm

  1. You can see the current time in the web interface, as well as the alarm.
  2. Type the time and alarm in the corresponding input box. Note that you need to type in both or it’ll fail.
  3. You need to use a specific time format, as described in the interface. Put it as “HH:MM:SS”, if a number is smaller than 10, fill a 0 in front of it.
  4. Press “Set” button when it’s done. The page will refresh and you can see the new settings.
  5. Upload the Arduino sketch.
  6. Download RunAlarmWithWeb from the attachment (previous step), and upload to Intel® Galileo Gen 2. It should be working now!

Be the First to Share


    • Mason Jar Speed Challenge

      Mason Jar Speed Challenge
    • Bikes Challenge

      Bikes Challenge
    • Remix Contest

      Remix Contest



    4 years ago

    Which Laser cut did you use to prepare the box? I guess its very epensive here in India. Can anyone suggests me few good options to get the laser cutting part done in India?