The primary objective of this lab was to use a culmination of all that was learned throughout the semester in a cumulative project showcasing the skills and knowledge that we had developed in a project of our own choice and design. The made the primary goal to coherently and practically apply the principles and techniques we had developed over the course of the semester. After brainstorming and debating about the primary function of our project, the team decided to attempt to utilize an LCD screen and an accelerometer to display and move a small dot about the screen in relation to the origin and the movement of said accelerometer, possibly making a simple game out of it. However, due to the relative difficulty of the application and various time constraints, the LCD screen originally intended for the project was substituted with the screen already on the A3BU microcontroller and the accelerometer was substituted with a small joystick with which the dot is moved about the screen. A small button was also integrated into the design with which we were able to use to “shoot” at static targets in the context of a classic video game style. The various pieces of equipment used at some point throughout the course of the project are as follows: the Atmel A3BU microcontroller, a Parallax joystick, and a basic push-button. Despite the few and minor hiccups that we had during the course of the project, the final result is an effective and functioning rendition of our original idea to make a simple and fun game with the help of the A3BU microcontroller and a few select pieces of third-party hardware.
The intent of our final project was to create a keypad lock using a 12-key membrane keyboard and the XMEGA-A3BU board that would trigger a stepper motor to open a mechanical lock. We ran into a problem early on that forced us to change course slightly. The EasyDriver for the stepper motor we were planning on using for our lock did not arrive in time so we decided to go with an alternate driver. This ended poorly for us as the alternate driver caught fire during initial testing, much like our hopes and dreams.
As an alternative, we printed messages to the LCD while also flashing the onboard LEDs to signal that the provided password was correct or incorrect. We also implemented a menu system through which the user can either set or try a password. Passwords can be 10 digits or less, and are hashed upon entry for added security. If the user attempts to try a password before one has been set, an error message is displayed and the user is returned to the main menu.
For our final project our goal was to do something fun that would be entertaining to anyone who used our project. Thus we came up with the idea of the U-box. Our slightly more useful box does everything your typical useless box would do except it also has a cool LCD user interface thanks to the A3BU micro controller.
For those unfamiliar with what a useless box does we can explain. Basically you flip a switch, and then an arm comes out of the box and flips the switch back. This continues until either you give up or the box runs out of power. To this our group added a user interface that shows the attitude of the U-box. The first few times you flip the switch the box is disturbed. Keep flipping and the box will become angry. Finally the box will become so angry he gives up and you win. After this the “game” starts over again.
To accomplish the task of the U-box we needed to use PWM to control the servo motor and LED, input pins to determine if the switch was flipped, and additional software to tell the LCD display what to display to the user. Below is a link to download the video!
This is Team 5.2 explaining how our graphing calculator works. Our design is an USART based, interrupt driven device that generates mathematical input into a graphical output on the A3BU’s LCD screen.
In simple terms, it’s a calculator. That graphs. (Our team had a lot of trouble coming up with a name. Graphulator, The Graph Master, and Graphtastic Graphing Machine were all considered.)
Various interrupt methods were incorporated into the design through user character input and push buttons on the A3BU board. The input from the PC is parsed using our own developed parsing code, which gathers all possible outputs for a given range of inputs. The software then plots those on the LCD screen. The push buttons include various scaling and scrolling methods that allow the user to interrupt the program in order to horizontally and vertically scroll and/or scale, along with re-centering capabilities.
The hardware design is very similar to that of Lab 3, using a MAX232 chip to bridge communication between the PC and the LCD on the A3BU’s on-board USART. This is done in conjunction with a serial connection via RS-232 signals.
For our final project, we have chosen to create a stoplight using the ATxmega256A3BU microcontroller. This project idea is based off of a similar project done by a team member in Arduino. The circuit includes two stoplights (with a red, yellow, and green LED each), as well as two sets of lights for a crosswalk. The user can initiate the crosswalk sequence by clicking a small button within the circuit. This will interrupt the stoplight cycle and, theoretically, give a pedestrian a walk sign. We found this to be an interesting, and challenging project; however, it is very practical.
Below is a link to a YouTube video showing a complete cycle of the stoplight circuit.
In the beginning we were thinking about doing a binary calculator, but after brooding over that idea for about a week we changed it to the LED cube. At first we wanted to have the LED cube attach to a different project that was developed by one of our team members, Tayce Lassiter, which is apart of her teaching assistant class. However, seeing as how long it was taking to complete the LED cube, and to program it, we decided to just leave the project to just the LED cube.
Needed to see more of our A3BU calculator? Watch this video with annotation below!
Look at your calculator:
Now back to mine:
Now back at yours. Now back to mine.
Sadly, yours isn’t mine. But if it stopped having such a small screen and switched to A3BUs instead it could look like it was mine.
Look down. Back up. Where are you?
You’re in the snake program on the calculator your calculator could look like.
What’s in your hand? Back at me. I have two buttons for scaling purposes on my calculator.
Look again. The graph just zoomed in!
Anything is possible when your calculator uses an A3BU instead of … that tiny screen.
The purpose of this project was to use the problem solving skills and the knowledge that we gained throughout the semester to create some type of interface with our A3BU. We chose to build a device that would turn a motor at different speeds depending on various colors that the device would be sensing.
The project was broken down into 3 different parts. The first part of the project was communicating with the color senor. This was accomplished by communicating via I2C (Inter-Integrated Circuit) to an Arduino Uno. I2C is a protocol intended to allow multiple slave digital integrated circuits to communicate with one or more master chips. Like SPI (Serial Peripheral Interface), it is only intended for short distance communications within a single device. However, it is also like Asynchronous Serial Interfaces (such as RS-232 or UARTs); it only requires two signal wires to exchange information. These two signals are SCL (the clock signal) and SDA (the data signal). SCL is a particular type of signal that oscillates between a high and low state and is used to coordinate the actions of a circuit. SDA is the physical transfer of data (a digital bit stream) from point-to-point. The second part of the project dealt with sending data from the Arduino to the A3BU. We chose to do this through a single line; TXD from the Arunino to RXD on the A3BU. However, in order to accomplish this we needed to create a voltage divider circuit to step down the 5V from the Arduino to 3.3V (the maximum voltage for the A3BU). The third part of this lab dealt with driving a DC motor. After the color sensor detects either a blue, red, yellow, or green card, the data is sent from the color sensor to the Arduino and then to the A3BU via TXD/RXD. We wanted to control the motor’s speed based on which color is detected. This was accomplished by using Pulse Width Modulation (PWM). In the code, when green is sensed by the color sensor, there is an 80% duty cycle of 3.3V applied to the motor circuit, which causes the motor to spin at a high speed. When yellow is sensed there is a 60% duty cycle, which causes the motor to spin at a lower speed. When red is detected, there is a 0% duty cycle, which stops the motor. Blue is used as an initialization.
At the end of the lab we were able to create a device that would turn a fan at different speeds based on what color is detected. By doing this we were able to gain a much better understanding of I2C, how to communicate amongst microcontrollers, and how to create and implement a circuit to drive a motor.
When we first started discussing a final project idea, a lot of wild concepts were thrown around. We discussed the idea of a making a bluetooth connected scoreboard for our heated summer volleyball games. The scoreboard would be made up of several 7-segment displays and have a communication bridge via bluetooth to a fitness wearable device. The wearable device would then act as the remote to the scoreboard to increase or decrease the score wirelessly. We began to wrap our heads around the project and soon realized that unfortunately the project was too far off our budget to pull off.
The second and final idea we took of the whiteboard was to make a music box and visualizer. The idea of this project was to have a knob or tone control to change the tone and pitch of a speaker. This tone would then have a corresponding visual element that was undecided at the start of the project. We wanted a way to house the project so it had an aesthetic appeal along with impressive technical abilities. This is when the group looked to 3D printing a case.
The above image was made in a free 3D modeling software, 123D Design on a Macbook Pro. The square hole on the top was designed to house the speaker and LED array. Its width and length were designed to be 0.1mm smaller than the LED array so that it could be press fit into place. The square whole to the right of the team name was designed to house all of the microcontroller and wiring components. There is a wall separating the two square holes inside the housing with a small channel to allow wires to connect between the openings. The circular opening on the top of the design was to allow a variable resistor to stick out, giving the user control over the tone and visuals. There is also an array of square holes on the face of the design. This was originally intended to be the speaker grill to allow the audio from the speaker to travel outside the housing.
In the following blog posts, it will become clear why the words “originally intended” were used.