Monday, February 16, 2015

My Secret Dice Box

My Secret Dice Box 


The Secret Dice Box is a sealed box that automatically opens upon “rolling” a combination sequence, revealing the treasures stored inside.  

This project was completed for a microprocessor programming class in the Sierra College (Rocklin, CA) Mechatronics Program. 


Here's a video demonstrating the functionality, the combination is set to 3-5-4-6-2-1:
 
 Here's the circuit schematic for the electronics:
The Picaxe 08M2 is at the heart of this project.  I used a digital accelerometer to determine what side the die is on.  By way of I2C protocol, this digital accelerometer (MMA8451) made static object orientation detection a breeze.

Here's the detailed parts list:

  • Picaxe 08M2 Microcontroller
  • Osepp LS-1006A Metal Gear Analog Servo
  • Adafruit Triple-Axis Accelerometer MMA8451 Breakout Board
  • [R3 & R4] 4.7k Ohm Resistors (2)
  • Square Latching Switch
  • Panel Mount 2.1mm DC Barrel Jack
  • 3AA Cell Battery Holder
  • Picaxe 08 Proto Board Kit:
    • Proto Board PCB
    • [R1] 10k Ohm Resistor
    • [R2] 22k Ohm Resistor
    • [C1] 100nF Polyester Capacitor
    • 8-pin IC Socket
    • 3.5mm Stereo Programming Jack
    • 3-pin Header & Jumper Link
    • Battery Clip
Here's the internal latch mechanism and electronics layout:
  

More Photos:


close-up of DC Barrel Jack

close-up of semi-hidden latching switch


 
spring loaded lid assembly


some early prototype photos and sketch:
Here's the code:
This project was inspired by PICing4fun's project: 
and by these projects on DeddiesLab:  
&
-Thanks Guys!


1 comment: