Introduction: Pacman Alarm Clock

This instructable was created in fulfillment of the
project requirement of the Makecourse at the University of South Florida (www.makecourse.com).

The end result of this project was a Pacman Themed Clock that stores a set time and updates it every minute, and can store an alarm time that will go off once every 12 hours. This instructable will cover the necessary materials, resources, and steps to recreate my Pacman Alarm Clock. This covers the 3D models used, wiring diagrams, and assembly.

Step 1: Materials

Parts you'll need:

Tools you'll need:

  • 01 - PH0 Philips Head Screwdriver
  • 01 - PH1 Philips Head Screwdriver
  • 01 - Hot Glue Gun
  • 01 - Roll of Black Electrical Tape
  • 01 - Pair of Wire Strippers

Software you'll need:

Step 2: 3D Printed Parts

The following files will need to be 3D printed:

  • DC-47B Base.stp
  • DC-47B Lid.stp
  • Pacman LEFT.stp
  • Pacman Right.stp

Step 3: Assembling the Clock

Arduino:

  • Mount the Arduino and Breadboard to the Base Plate.
  • Velcro the Base Plate inside the box. Arduino Power Jack and USB port should point towards the top of the box (Points towards the cutouts). The right side of the base plate should be an inch from the right wall. The bottom side of the base plate should be against the bottom of the box.

Servo:

  • Place the servo in the rectangular hole at the top of the box.
  • Hold centered, and screw an M4 Self-Tapping Screw into each mounting hole to secure the servo in place.
  • Seal with hot glue for added stability. *Be Careful not to infringe the servo's motion!*
  • Attach 4 segment servo horn to servo. Use screw packaged with the servo to secure horn to servo.
  • Using Wire Strippers or Pliers, bend the long ends of the servo horn up to form a mount for the 9/16 inch dowel.
  • Hold dowel at center of servo. Place a screw through each bent servo horn and into the dowel.
  • Wrap Dowel with Electrical Tape.

Pacman:

  • Use hot glue to bond both halves of Pacman together.
  • Use electrical tape to draw contrast between the plastic Pacman and his mouth.
  • Attach Pacman to dowel mounted on servo horn.

Joystick:

  • Place Joystick through hole at the top of the box farthest from the Servo.
  • Using the M4 Screws, mount the Joystick to the box. Use 4 screws, and 8 nuts to secure the joystick.

Minute Set Button:

  • Slide Arcade button through the hole closest to the Servo until both snap locks latch.

Alarm Set Button:

  • Slide Arcade button through the hole closest to the Joystick until both snap locks latch.

RGB LED Matrix:

  • Connect one end of the ribbon cable to the Input header on the LED Matrix.
  • Using the M4 Screws, attach the RGB LED Matrix to the Lid. *Be careful not to over-tighten the screws!*

Step 4: Wiring the Arduino

Arduino:

  • Connect a jumper wire from the 5V pin on the Arduino to the Positive Rail on the breadboard.
  • Connect a jumper wire from the GND pin on the Arduino to the Negative Rail on the breadboard.
  • Wire the 9 Volt, 2 Amp Power Supply to the Arduino power jack.

RGB LED Matrix:

  • Using Jumper Wires, connect the cables as follows: (Use the Ribbon Cable Header image as a reference)
    • R1 connects to Digital Pin 2
    • G1 connects to Digital Pin 3
    • B1 connects to Digital Pin 4
    • GND connects to breadboard ground
    • R2 connects to Digital Pin 5
    • G2 connects to Digital Pin 6
    • B2 connects to Digital Pin 7
    • GND connects to breadboard ground
    • A connects to Analog Pin A0
    • B connects to Analog Pin A1
    • C connects to Analog Pin A2
    • D connects to breadboard ground
    • CLK connects to Digital Pin 8
    • LAT connects to Analog Pin A3
    • OE connects to Digital Pin 9
    • GND connects to breadboard ground
  • Connect the Molex Power connector to the back of the LED Matrix. Connect the Red lead to the 5V Positive Rail on the breadboard, and connect the Black lead to the Negative Rail on the breadboard.

https://learn.adafruit.com/32x16-32x32-rgb-led-mat...

Joystick:

  • Connect the 5V pin on the Joystick to the 5V Positive Rail on the breadboard.
  • Connect the GND pin on the Joystick to the Negative Rail on the breadboard.
  • Connect the VRx pin on the Joystick to Analog Pin A4 on the Arduino.
  • The VRy and SW pins on the Joystick are no connects.

Minute Set Button:

  • Tie a jumper cable to each lead coming out of the Arcade button.
  • Place both ends on the breadboard, in different rows.
  • Connect a wire from one row containing a Arcade button lead to Digital Pin 10.
  • Connect a 10K resistor from ground to row connected to Digital Pin 10.
  • Connect a wire from the 5V Positive Rail to the row that does not connect to the resistor or Digital Pin 10.

Alarm Set Button:

  • Tie a jumper cable to each lead coming out of the Arcade button.
  • Place both ends on the breadboard, in different rows.
  • Connect a wire from one row containing a Arcade button lead to Digital Pin 11.
  • Connect a 10K resistor from ground to row connected to Digital Pin 11.
  • Connect a wire from the 5V Positive Rail to the row that does not connect to the resistor or Digital Pin 11.

Servo

  • Connect the Brown Wire to the Negative Rail on the breadboard.
  • Connect the Red Wire to the 5V Positive Rail on the breadboard.
  • Connect the Orange Wire to Digital Pin 12 on the Arduino.

Step 5: Upload the Code

Install the following libraries in your Arduino IDE installation directory:

  • RGB-Matrix-Panel-Master
  • Adafruit-GFX-Library-Master

Connect the Arduino to a computer via USB cable.

Upload the attached code to your Arduino: "Pacman_Alarm_Code"

Step 6: Verification and Attaching the Lid

Disconnect the programming cable from the Arduino.

Power up the clock with the 9V power supply.

Verify the following:

  • The LED Matrix turns on.
  • Holding the minute button changes the current time.
  • Holding the alarm button displays the alarm time.
  • Set the current time equal to the alarm time.
  • When the current time equals the alarm time the servo oscillates.
  • Holding the joystick to the side for 8 seconds turns off the alarm.

When all of these functions are successful the project is functioning as it should.

Attach the Lid slowly, making sure not to damage the ribbon cable or disconnect any of the wiring.

Verify the Alarm Clock once more.

Screw down the lid when the Alarm Clock has passed it's final verification.