Tuesday, October 30, 2012

Oct 30-Final Project

This week we were assigned to begin thinking about our final project and post a proposal. After much thought and discussion, my partner and I decided that we are going to make an interactive drum set. We will feed data from the drums via pressure sensors to our Arduino, and then use Processing to make the display. The idea is that depending on how hard and fast the drummer is hitting the pressure sensors, different colors and strokes will be displayed on the Processing canvas. This will be done by collecting the feedback from the pressure sensors and assigning them RGB values. It will also use some form of judgment in where the user is hitting to determine whether it should be creating a line or a circle. There will also be feedback for the user in the form of sound. This idea would utilize most of the things we have learned this semester and should yield a fun, interactive project.

Monday, October 29, 2012

Oct 27-Processing

Introduction:
This week, we were practicing using Processing. Processing is a Java based programming language that is especially helpful when producing graphs, images, and animations. Our assignment was to create some sort of image that involved an animation or interaction with either the mouse or keyboard. After thinking about what we wanted to create, we decided to go with an all time favorite-the head tilting Corgi. For those of you who may not be familiar with this phenomenon, here's a video:



Procedure:
The first step in creating our Corgi animation was to actually create our Corgi. We started by looking at various pictures of Corgwn to get a good idea of what shapes we would need to use. Next, we began to sketch out the shapes and how we wanted them oriented. Since neither I nor my partner are particularly talented artists, this took a while...

After we had sketched out how we wanted our Corgi to look, we started working within Processing to make our shapes and build our Corgi. We used a combination of rectangles, ellipses, and curves to make the basic structure.

After construction a Corgi that we were satisfied with, we decided it was time to make the animation. Originally we applied a rotation function directly to the head, using the mouseX and mouseY to determine how the head should be tilted. However, this made it to where the Corgi's head would tilt at odd angles and even entirely upside down. We also had issues with other parts of the Corgi rotating.

To solve the first problem, we introduced upper and lower limits to our Corgi's head. This prevents his head from tilting more than 90 degrees or PI/2 in either direction.

To fix the second issue, we wrapped our rotation in a pushMatrix and popMatrix. This isolates the rotation to only the head.

After our head tilt was working properly, we decided to make the enhancement that attaches a bone to the cursor. While functionally it has no purpose, it provides a cute visual enhancement to the program.

Here's a video of our program and our source code:




Conclusion:
This project, while a little silly, was a lot of fun and I really enjoyed being able to use Processing and create an interactive animation.

Wednesday, October 17, 2012

Oct 17-Interactive Technology Observation

For this weeks observation assignment, we were instructed to find some sort of electronic interactive device that people use in every day life. After thinking for a little while about what I use on a regular basis, I decided to observe the creation stations at the Burger Studio in Valhala, our schools convenience/fast food shop.

The Burger Studio was put into Valhala last summer during the renovation. Here's a picture of the "store front."

The individualized stations can be seen on the right. They allow students to order a custom burger choosing from all of the available toppings right from the screen. 
The first step is to touch the screen to start. Then you must choose what type of sandwich you want. Our particular branch offers a selection of different burgers and chicken sandwiches. After that you select if you want cheese and if so, what kind. Then the user is given an extensive list of toppings containing everything from Bacon to Caramelized Onions to Honey Mustard. After choosing all of their toppings, they can select if they want a side, and if so, what kind. The option to include a drink is also available.

 In my observation, I found that while the system is fairly intuitive and has clearly marked buttons to help the user find the option they're looking for, the touch screen can be a bit frustrating as it is not very sensitive. It also seemed to lead to some frustration that the options were in fairly small font and the visible buttons for the options were not quite lined up with the actual sensor. This makes it very easy to select a topping that you did not want and sometimes takes several presses to actually select the topping you'd like. The entire process usually takes somewhere between 30 seconds for users who know exactly what they want and are experienced with the machine and two and a half minutes for users who are not as familiar or are indecisive.

Once the burger is ordered, the machine prints a receipt detailing your order, listing all of the toppings and sides you purchased. It also prints a receipt in the kitchen which is what allows the cooks to make your food.  This system helps to eliminate error in the communication process. Often times at fast food chains, there can be confusion on what the costumer actually ordered and what the server heard. This machine takes out the middle man and allows the costumer to order directly from the person who will be preparing the food and both parties have it in print so it is easy to settle disputes. The machines also allow for quicker ordering and less employees as there does not have to be someone taking each order, they only have to prepare each order.

Overall, I think the product was a good addition to Valhala. It allows students to quickly order delicious food and gives them an opportunity to interface with new technologies.

Oct 11-Transistor and H-Bridge Motor Control

Introduction:
This week in lab, we covered different methods of motor control. First, we experimented with using a transistor for motor control, and then we tried using an H-Bridge. Both of these methods seemed to work fairly well and we completed the lab without many difficulties.

Procedure:
To control the motor via transistor, we set up a basic circuit that contained a potentiometer, a diode, a small motor, and a transistor. The idea was to use a transistor to control the amount of voltage going to the motor via the potentiometer. Here's a video of our results:


Next was using the H-bridge for motor control. This circuit required using a larger power supply than our Arduino since we needed more than 5 volts, so we used a desktop DC power supply. For this portion, we set up a circuit following the diagrams provided in the lab. They required using a complicated setup with several resistors and a diode. However, this circuit did not work. Here's an image of that circuit:
We were instructed to rebuild the circuit more simply, plugging the motor directly into the rows of the h-bridge and to remove the diode. After doing that, everything worked successfully. You could hear the h-bridge ticking on and off and you could watch the motor turn on and off with it. We went ahead and made some modifications, first adding an LED. We decided to go with the LEDs that do not require a resistor just to simplify the look of the circuit and keep everything orderly. This circuit arrangment allowed the motor to turn on while the LED was off, and then switch to have the motor off and the LED on.

And then we removed the motor completely and just used two LEDs.




Conclusion:
While short and simply, this lab provided good practical knowledge for learning how to use a power source that provides more voltage than our Arduino and really helped cement our understanding of how to use motors.

Monday, October 8, 2012

Oct 8-Shift Registers

Introduction:

In today's lab, we were learning how to use shift registers. Shift registers are implemented when there are not enough pins available on your micro-controller to plug in all of your devices.

Procedure:

This lab entailed creating a circuit that initially contained 8 LEDs and one shift register. We quickly wired that up and ran the provided code. Next we moved on to the next step-configuring 16 LEDs using two shift registers. Once again, the wiring was pretty simple. We did run into an issue initially (not all of our LEDs would turn on), but it was fixed quickly when we realized the pins had gotten plugged in to 9, 11, and 13 instead of pins 8, 11, and 12. After we put them into the proper pins, we did not have any issues.


We once again ran the provided code successfully. Here are some videos of the results:




Conclusion:

This was a very practical/useful lab to learn how to make the circuits utilizing shift registers. I'm sure the knowledge gained through this lab will be very helpful in the future.

Oct 4-Kitchen Object

Introduction:
This weeks project was to work on a kitchen object. We were supposed to observe and think about how people function everyday while cooking and come up with a device that would make their lives easier. After thinking about what would be handy to have around the kitchen when I'm cooking, my partner and I decided to make a some sort of vocal thermometer. I noticed that I would put a pot of water on to boil and leave the room to go work on homework or play games. Forty-five minutes later I would come back to put the pasta in and realize that my water had boiled away. We decided it would be really handy to have a thermometer that would make noise when your liquid reached the temperature that you were seeking. And so the Temperature Notification System (or, TNS) was born.

Procedure:
The first steps we took in construction was all of the soldering and wiring. This project required the use of 2 LEDs, a piezo buzzer, a thermometer, and a potentiometer. The simplest part of the TNS was to plug everything up in one nice neat circuit. Here's a picture:

The next step we decided was to create the foam board structure. This is what would hold each of our pieces in place as well as providing an easy to understand interface so that a use could intuitively use our device. Here is our initial foam structure with each piece plugged in. Below is a side view. We wanted to leave the sides open so that the user can see the "guts."



After hooking up all of the circuits and making the foam board structure, it was time to get programming. We needed to be able to set the target temperature by using the potentiometer and an LED. The potentiometer would change the resistance, telling the Arduino what RGB values should be used for the LED.

Next was setting up the actual LED. This was simply a RGB representation of the temperature that the thermometer was reading.

Lastly was the piezo buzzer. We simply wrote a basic code that would sense if the Target and Actual RGB values matched, and if they were within a range of 4, it would set off the buzzer.

We also hand designed another interface that had labels, the title of the device, and control labels.

Here's a picture and a video of our finished product:





Conclusion:

Overall this project went smoothly. We didn't really encounter any errors and managed to get everything to run properly. The feedback from the open house where we presented it was all positive. It was great to get to make and show off a practical device.

Monday, October 1, 2012

Oct 2-Analog Output

Introduction:
This week lab, we were dealing with Analog Output. First we used a basic motor, then we used a servo motor, and lastly we used a piezo buzzer.

Procedure:
With the basic motor, we hooked up a basic circuit with the motor plugged into analog pin 0 on our Arduino. We also incorporated a potentiometer. Since our Arduino does not have true analog output, only pulse-width modulation (also called PWM), rather than having a way to only power the motor at half speed, we had to use periods. Our periods were designed to turn the motor off and on so quickly that it seemed like the motor was running at half speed. Next we implemented the potentiometer. By allowing the potentiometer to control the duty cycles, the turn of the knob makes the motor seem like its running faster or slower by decreasing or increasing the amount of time that it is turned off. Here's a video of our results:

Next we were supposed to experiment using a servo motor. Servo motors are motors with gears and consequently are often much stronger than a basic motor like we used for the last exercise. Their arm can rotate up to 180 degrees. The first use of the servo motor was to get it to rotate using pulses that are sent through the analog pin. Here's a video of our servo motor rotating to the full 180 degrees and then back to 0.

The next element to incorporate was a potentiometer. The code for this set up was designed to allow the potentiometer to change the direction of the motor based on the resistance from the potentiometer. Here are our results from that portion:

Lastly was implementation of the piezo buzzer. Piezo buzzers work through playing quick pulses of sound at different frequencies to create a melody. Our video didn't turn out very well since my partner was playing dj, but here is a brief sample of what it sounds like:






Conclusion:
I was once again pleasantly surprised by how well our lab went. We really didn't encounter any errors with our circuits or with our codes. I'm looking forward to finishing up our analog kitchen project and working more with analog output in the future.