Goal
My detail design focus was on the electrical system to drive the product. First I would collaborate with Chacha to develop the overall system and code architecture to satisfy the requirements of the game design.
Then I developed a more detailed electrical design and selected needed components. My primary goal was to develop a fast and efficient prototype to construct to validate the game and mechanical design, as the control of the final 5Wits product would be handled by a central computer for the adventure.Overall Product
![](hyperdrive.png)
This image shows our overall product for reference. Please see our team page for more details.
System Architecture
The heart of the system is the microcontroller, which governs all other elements. Use of a microcontroller allows us flexibility to vary our game design or control of mechanical systems quickly and easily as needed in later development work. It also effectively simulates the type of control system that would be used in the final product.
This processor first controls the lighting of the central column of the hyperdrive, both the large lighting rings or levels that indicate the completion of the challenge, or the number of puzzle cylinders inserted and locked successfully.
Second, the processor controls the systems of each puzzle cylinder individually. It controls actuators for the mechanical subsystems that enable/disable the ability to insert and lock the cylinder, that trigger the cylinder's ejection for reset, and monitors the contact sensor to determine when the cylinder is inserted and locked.
Each cylinder has two different "solved" states. Which state is the correct solution for each instance is determined by a switch controlled by the processor. Simple contact points in the cylinder complete an electrical circuit when the cylinder elements are in the correct positions. By selecting which state is powered, we select which contact points must be aligned. When each pair of elements are aligned, the appropriate lights along the elements light up. When all pairs of elements are aligned, the puzzle is solved, signaling the microcontroller to trigger the mechanical systems.
Software Architecture
The code outline below lays out the core required behaviors of the microcontroller.
MICROCONTROLLER MAIN LOOP OUTLINE
//For a given cylinder..
Trigger cylinder solution switch ->
Change state of sensor set selection switch
Trigger reset ->
Enable the lock release
Trigger cylinder solution switch
//For the overall system...
Every light line cycle time ->
Determine the next light line color
Switch the current color to the next color
Disallow locking of the current color's cylinder
Allow locking of the next color's cylinder
For each successfully locked cylinder ->
Turn on a light ring
When all cylinders are locked ->
Perform reward behavior
Reset all cylinders
Detailed Electronics Design
The circuit diagram shown here develops the system block diagram into a final electrical architecture. An Arduino Micro controls the system. It communicates with a multichannel LED Driver IC that simplifies the control of the main column lighting with RGB LED strips. It controls the electromechanical actuators with PWM outputs and monitors the cylinder lock sensor with a digital input. A digital output controls a single pole-double throw switch to select the active "solved" state. OR gates simplify the element lighting, allowing a single set of lights to be used for all solutions. If an element of the active, powered solution is solved, the OR gate will trigger a MOSFET transitor to safely power the corresponding lights. If the full puzzle is solved, the AND gate will signal the microcontroller.
Components
The core components selected for the system are:
- Microcontroller: The Arduino Micro is an inexpensive, small, easy to work with, yet powerful solution.
- LED Driver: The Texas Instruments TLC5941NT provides 16 channels of PWM LED brightness control with a simple serial interface from the microcontroller.
- Switch: The Analog Devices ADG419 is a simple single pole-double throw switch. A single digital signal switches which output is powered, grounding th other.
- OR Gate: The Texas Instruments SN74HCT32N provides 4 basic OR gates in a single IC.
- AND Gate: The Texas Instruments CD4073BE provides a trio of 3-way AND gates in a single IC.
- Lighting MOSFETS: An appropriate N-Channel MOSFET will be selected when the final lighting power requirements are determined.
Common passive elements such as resistors and capacitors are not included in the above table.