Schematics
The schematic of the whole circuit in *.pdf form can be downloaded here. The module-level circuits are shown below with descriptions of basic function. The microcontroller used for the project was a Texas Instruments Tiva C Series LaunchPad.
Beard Potentiometer and LED Indicators for the Wire Game
The circuit for beard game has a potentiometer which provides an analog input to the Tiva. The LED indicators for the starting and ending positions of wire game are switched by a single digital output from the Tiva. Multiple capacitors (polar and non-polar) were added in parallel to the potentiometer to reduce high-frequency noise. In addition, 160-Ω resistors were used to provide approximately 20 mA to the wire game LEDs (with forward voltage drops of approximately 1.8 V).
Hall-Effect Sensors
Open-collector Hall-effect sensors were used for the wire-loop game. The copper wire for the game is connected to ground with pull-up resistors, while the metal loops are connected to the 3.3-V power supply. Standard pull-up and pull-down resistors were used (ranging from 1 kΩ to 3.3 kΩ, depending upon availability).
LED Indicators for the Buttons and Beard Game
Six LED indicators for the buttons and one LED indicator for the beard game are connected to a shift register (74HC595). The shift register requires three digital outputs from the Tiva. A voltage buffer (74ACT244) is needed to raise the Tiva's output voltage to 5 V so that the shift register can recognize the signal as a logical "high." Once again, 160-Ω resistors were used for the LEDs.
Button Vibration Motors
The vibration motor on each button is controlled by an N-channel MOSFET (2N7000). A voltage buffer (74ACT244) is needed to raise the Tiva's output voltage to 5 V so that the MOSFETs can recognize the signal as a logical "high." Note that a bipolar junction transistor was not used to drive a single vibration motor, as it required greater than 2 mA (default setting) from the Tiva GPIO pin to maintain a 10:1 collector-base current ratio. In addition, MOSFETs are inherently more efficient at switching loads and, thus, conserve power. A flyback diode (1N4993) was used for each motor to prevent inductive kickback from damaging the circuitry.
Buttons
Each button is connected to a digital input of the Tiva. A standard pull-down resistor (10 kΩ) was used.
Lid Motor
The gear motor that controls the opening and closing of the lid is driven by an H-bridge circuit (L293NE). Flyback diodes (1N4993) were used to prevent inductive kickback from damaging the circuitry.
LEDs for the Mummy Eyes
The light emitted by two RGB LEDs is switched using three N-channel MOSFETs (2N7000). A voltage buffer (74ACT244) is needed to raise the Tiva's output voltage to 5 V so that the MOSFETs can recognize the signal as a logical "high." Based on a forward voltage drop and a forward current of 1.8 V and 15 mA, respectively, a 100-Ω resistor was used for the red LEDs. For the green and blue LEDs, 68-Ω resistors were used (based on a forward voltage drop and a forward current of 3 V and 15 mA, respectively).
Servos for the Timer and Facial Expression
Servo-motors were used for the timer and facial expression. The control lines of the servo-motors were connected to PWM outputs of the Tiva.
Board-Level Protection
Board-level capacitors (polar and non-polar) protect the whole circuit by mitigating sudden changes in voltage and high-frequency noise.
Pin Assignments
Given below is a table of the microcontroller pin assignments for the entire DDM: