iLocker – Big Picture

The concept of the iLocker came from old-school dial combination locks where the user turns the dial to select a sequence of numbers. If this sequence of numbers is correct, the lock opens; if not, the lock remains locked. Team Whirlaway decided to take this design into the world of microprocessors. The concept for our project is to use a potentiometer as the combination dial. Using the analog input from the potentiometer to the A3BU,  the LCD displays each number selected by the potentiometer. The microprocessor compares the input combination to the correct combination and informs the user of the lock/unlock status. If the combination is correct, the LED located on the breadboard will turn on and stay a solid color. If the combination is incorrect, the LED will flash on and off. The user is able to change their combination by selecting the option in the main menu. If this project were to be further developed, a solenoid could be added to the circuit to act as a lock.

Secured Music Box – Overview

We have a basic box with a cut out for the door, and an attached handle to open and close the door. There’s a magnetic reed sensor on the frame and a magnet on the door. The reed sensor was attached to an A3BU pin that outputs whether the circuit is open or closed, when closed the red LED comes on, and the A3BU LCD says either “Box Status Opened” or “Box Status Closed”. When the pin reads that the box is opened, the green LED lights up, and the buzzer then also starts to sound off. We originally had a 20 sided die that was glued to the front of the box, but the glue was not enough to hold it as securely as we needed. We ended up replacing it with a cardboard handle and used duct tape to make it stay in place. The door handle is much more secure now as a result. Next we assembled the LEDs with accompanying 100Ω resisters, each one was connected to the assigned pin we had picked out in the code, and then connected them to ground. The buzzer was also put in place, but assigned its own pin so it could operate independently and therefore create the assigned sounds without effecting the light coming from the red LED. The reed sensor and magnetic strip was taped in place so that the magnetic strip would stay with the door, and the sensor would stay in place.

Magnetic Alarm with Keypad – Schematic/Hardware Design

Here is the schematic and breadboard layout of our design. The Reed sensor and piezo buzzer each run off of five volts, and each has a signal going to/ coming from the A3BU. The Reed sensor provides a signal when a magnet is moved away from it, and the piezo buzzer produces an ‘annoying’ output when it receives an incoming pulse width modulation. The system will be reset with the keypad which runs off of a 4×3 matrix, for a total of 7 pins, using basic logic to match the pins to create the numbered inputs which will need to be defined in our code, or at least just mapped correctly.

Magnetic Alarm with Keypad – The big picture

Our group, Genuine Risk, have been working on creating a basic security system idea using a Reed sensor, a keypad, and a piezo buzzer. The idea is that the reed sensor could be placed in a door, on a window, or the like and be affected by a magnet in the moving portion. When the subject is opened, the reed sensor’s output goes high. The A3BU board then takes this input, and outputs a frequency to the piezo sensor, causing an alarm. A keypad can then be used to turn off the alarm, and after a delay, the security system will reset itself. Another post will be forthcoming tonight with the schematic and wiring.

Secured Music Box

The design for our project included a reed switch in the form of a magnetic sensor, three different colored LEDs, a buzzer, and a code input. We started with a cardboard box, which we added a door to, and then attached the magnetic sensor to the door so that when the door is closed, current flows to the yellow LED, and when the door is opened the current is broken, which a pin on the A3BU will detect. When that pin is triggered, two pins will go high and send current to a red LED and a buzzer. If a code is then entered, the two pins that were turned on will be sent low, and a new pin will be sent high to make a green LED  turn on instead. When the door is closed, the yellow LED should turn back on, and all other pins should be low.

Motion Sensor Alarm System – The Code


while (1) {
	if (ioport_get_pin_level(MOTION_SENSOR)) {
		pwm_start(&pwm_cfg, 50);
		while (1) {
			if (!ioport_get_pin_level(BUTTON)) {

This is the main loop running on the microcontroller. It continually checks if the level of the pin connected to the motion sensor is high. If it is high, then pulse width modulation on the pin connected to the buzzer starts.

Then we enter another while loop which polls for a button to be pressed. If the button is pressed, pulse width modulation stops (and therefore the buzzer stops buzzing) and we delay for 20 seconds. The motion sensor stays on for a few seconds after it has detected motion. If we didn’t delay here, then we would immediately break out of the inner while loop, pass the if statement, and start pulse modulation again. This would cause a strange effect while the motion sensor is still on. Therefore, we delay for some arbitrary amount of time before we poll for the motion sensor again.

Harry Potter Sorting Hat – Project Idea

We embarked on building the Harry Potter sorting hat as our final project.  In the HP universe, all new students at Hogwarts School of Wizardry & Witchcraft are sorted into one of the four ancient houses based on the personality of the student by a magical sorting hat. The four houses are: Gryffindor, Ravenclaw, Slytherin, and Hufflepuff.

Related image

An IR sensor, color sensor, and piezo buzzers were used along with the Atmel software, an A3BU board, an Arduino Uno board, and Arduino IDE software. This combination of sensors and programming will allow the sorting of houses as per the lore of Harry Potter.

Here are some of the ideas the project utilized:

1)    An IR sensor for knowing if someone is wearing the hat.

2)    A color sensor to take in data from hair color.

3)    Piezo buzzers to play a short tune from the movie’s theme song. (The original plan was for the hat to shout the different house names as seen in the books/movies, but due to the time constraint, this was unfortunately not undertaken).

4)    All three devices (above) were to be integrated into a circuit with a voltage divider.

5)    An Arduino Uno board was to be used for the integrated sensor circuit.

6)    The A3BU would take in the data read from the Arduino and display the specific house onto its LCD screen.


Motion Sensor Alarm System – Schematics and Layout

Below is our original schematic for our Motion Sensor Alarm System.  The original project would integrate a Motion sensor, LED indicator, Micro Controller, RF Receiver, and RF Transmitter.

However, the RF Transmitter was not going to arrive in time of the projects deadline.  Therefore, we decided to remove the RF Receiver and RF Transmitter from our project entirely and built the interrupt of the buzzer into the Micro Controller.  This is reflected in the updated schematic and layout below.


The new Motion Sensor Alarm System works as follows.  The Motion Sensor will detect motion, sending a signal to the LED and Micro Controller.  The LED will alight, indicating that the motion sensor is working.  The Micro Controller receives the signal that the Motion Sensor is active and uses that signal to begin playing the Buzzer.  The Buzzer will continue to sound until the interrupt button SW1 is pushed, this means the Buzzer will continue to sound even if the Motion Sensor does not detect motion anymore.  The interrupt button SW1 will keep the Buzzer from sounding for a 20 second time frame.  During this time frame, the Motion Sensor can continue to turn on or off which will activate and deactivate the LED, but the Buzzer still will not sound until the time frame concludes.  This time frame can be edited in our code to be any amount of time.

Music Keypad- Big Picture

For our final project, we wanted to incorporate some of the skills we’ve learned in previous labs to create a unique and interactive device.  Using pulse width modulation from Lab 4, we incorporated our AVR XMEGA-A3BU XPLAINED with a 4-input number pad, four 10K ohm resistors, a piezo buzzer and jumper wires to create a musical touch pad that plays different songs based on which button is pressed.  After getting a general understanding of the keypad schematic, we connected the common connection to VCC on the J2 header of the A3BU.  The other 4 buttons were connected to 4 of the ADC pins on the J2 header.  We connected the piezo buzzer to the SDA and GND pins on the J1 header.  After researching the frequency limits of our piezo buzzer, we were able to assign certain frequency values to specific pitches and program the A3BU to play 4 different songs: Twinkle Twinkle Little Star (button 1), Mary Had a Little Lab (button 2), Jingle Bells (button 3), and Ode to Joy (button 4).

General A3BU Setup

“Ode to Joy”



Balancing Bot with Gyroscope

Finally got our project moving. We are working to create a self balancing robot. This project is a perfect fit for the class as it lets us use code from previous labs and use technology we understand.

Self balancing features have become more and more necessary as robots begin to become commonplace. We hope that our design will be a good example to the class for what could find its way into robotics in the future.