This is an old revision of the document!
The purpose of this project is to build an interactive puzzle box based on the ATmega328P Xplained Mini microcontroller. When the user presses the start button, the box opens using a servo motor and starts a timed puzzle challenge. The system displays the current level and the remaining time on an LCD, and it uses LEDs and a buzzer to signal success or failure.
The main idea behind the project is to combine a simple game-like experience with embedded control, timing, sound feedback, and multiple difficulty levels. The project started from the idea of a simple access system, but it later evolved into a puzzle-based interactive system, which is more interesting from both the hardware and software point of view.
We chose this idea because it is interactive, easy to demonstrate, and allows us to combine several topics studied during the laboratory sessions, especially interrupts, timers/PWM, and UART for debugging. We think the project is useful for us because it gives us practical experience with both hardware and software integration.
The project is built around the ATmega328P Xplained Mini, which controls all the hardware components. The system has the following main modules:
A simple logical flow of the system is the following:
The project can be described using the following software states:
The following block diagram presents the main hardware modules of the system and the way they interact. The ATmega328P Xplained Mini is the central control unit. It receives input from the buttons, controls the LCD, drives the servo motor, activates the buzzer and LEDs, and can optionally communicate with a PC through UART for debugging.
The ATmega328P Xplained Mini is the main controller and will be placed on a breadboard together with the supporting passive components. A 16 MHz crystal and two 22 pF capacitors will be used for stable clock generation. The reset pin will use a push button and a 10 kOhm pull-up resistor.
The LCD will display the current level, the timer, and game messages such as:
The servo motor will be used to physically open the box. Because the servo may create small voltage fluctuations, a larger capacitor (100 uF) will be placed on the power rail for stabilization.
The buzzer will provide sound notifications:
The LEDs will provide simple visual feedback:
The buttons will be used as follows:
The project is designed to cover at least three laboratory topics from the course, not counting Lab 0.
Optionally, the project may also include:
Although GPIO is naturally used in the project for buttons, LEDs, and basic control signals, the core requirement of covering at least three laboratories is satisfied through UART, Interrupts, and Timers/PWM.