Skip to content

mtthwm/PuzzleBox

Repository files navigation

About

Description

This is a project built for our ECE 5780 (Embedded Systems) final project. We built a puzzle box that requires the user to interact with it in novel ways to unlock and reveal the prize inside.

Puzzle 1: Knock and Response

The buzzer plays a common knock rhythm, and the user must respond to finish the rhythm. Image of the common door knock rhythm that everyone knows

Puzzle 2:

Led on sides of the box lights up, rotate the whole box so the LED points down. Repeat 3 times with a random side each time.

Puzzle 3:

Using multiple photoresistors, a sequence of holes needs to either be lit or covered.

Puzzle Completion:

Using a servo, unlock the box for opening. Puzzle restarts on close.

Collaborators

  • Matthew Morales
  • Daniel Reyna
  • Casey Wolfe
  • Griffin Rodgers

Project Setup Instructions

Assembly

  1. Print the box and lid using the provided STL files. Our original design was slightly off, which required us to drill into the box to make room for the servo locking mechanism.
  2. Glue LEDs and photoresistors into the holes in the side. Each LED has a 220 Ohm resistor in series, and each photoresistor is part of a voltage divider with a 10k Ohm resistor. Make sure to match up the LEDs which correspond to the photoresistors. Photoresistor voltage divider example
  3. Attach the piezo resistor to the underside of the lid using hot glue. This seems to cushion the vibrations picked up by the piezo resistor enough to avoid large voltage spikes. As a result, we didn't connect it to a voltage divider.
  4. Once the piezo sensor is attached, you may need to use usart to display the values in order to pick a proper voltage threshold for the piezo sensor. It seemed the voltage generated by these sensors varied significantly
  5. Open the project in Keil uVision, compile the project, and flash it to your STM32F0 Discovery Kit Board.

Pins

  • I2C:

    • SCL: PB10
    • SDA: PB11
  • UART (debug):

    • TX: PC10
    • RX: PC11
  • ADC: PC0-3

    • Piezo: PC0
    • Photoresistors PC3,4,5
  • Buzzer: PB5

  • Box-Side LEDs

    • PA0 -- Top LED
    • PA1 – Base LED
    • PA8 – Front LED
    • PA9 – Back LED
    • PA10 – Left Side LED
    • PA15 – Right Side LED
  • Servo: PB3

Puzzle Box - Hints & Solution

Hints (for fun)

Given: Each stage completion (3 total) will be associated with a victory tune, as well as a brief LED light show.

Hint (1):

The box plays a near complete tune, no question there; make haste and knock to – to finish it is the burden you bear.

Hint (2):

The box has many sides, it is of no surprise; what does the light confide? Rotate to abide?

Hint(3.1):

Your final steps await, the box’s prize is in your fate; darkness – you think – may be your friend, but its enemy may tend.

Hint(3.2):

Thus far you found your tool, you’re on the path; but have you checked if there is a dual?

Solution

(1) A buzzer plays an incomplete tune. Wait until it finishes. Knock once, wait half a second then knock again. A victory tune will be played (2) An LED will indicate which side needs to be up. First is bottom, then right side, then top. A victory tune will be played (3) LEDs will indicate which side’s photoresistor must be interacted with. You must shine a light to the bottom side photoresistor first, followed by the back, followed by both back and top (2 lights required, or 1 shining on both directly) (4) An extended victory tune is played, followed by a LED lightshow. The box servo unlocks shortly after and can be opened.

About

Our final project for ECE 5780. Team consists of Casey Wolfe (@cabobalot), Daniel Reyna (@dreyna134), Griffin Rodgers (@griff761), Matthew Morales (@mtthwm)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors