Saturday, August 23, 2008

Brahms Sonata No. 1


Here is a video of Rosie and I practicing Brahms Sonata #1 in G Major that I shot the day before our performance at Faith Presbyterian Church. I have been working with her for the past year and a half. Enjoy!

Friday, August 22, 2008

End of Summer Quarter

Hello, friends and family!

It's been several months since I last posted. This summer has been pretty laden with school work. This quarter I took two classes, E E 271 Digital Circuits and Systems, and IND E Probability and Statistics for Engineers. This is the second time I'm taking a Statistics class; the first I took at Pierce Unfortunately, the credits didn't transfer for the course. The courses were pretty much the same material, except for that the one I just took uses a little bit more advanced mathematics...

For the past two weeks, I have been spending long hours and late nights working on a final project for my engineering class. The project is to design and build a game using digital logic. We were given a list of 9 different project ideas (or you could create your own). Here is the description for the particular game we chose:

This game involves dealing with some disgruntled chemistry and aero students who have teamed up and have taken over Bagley Hall. The are dropping balloons filled with synthetic and noxious scents…raspberry, strawberry, eau de skunk, greasy hamburger, cold pizza, Budweiser, oops InBev, …oh retched…, on the people passing below. Your mission is to stop this olfactory attack as quickly as possible.

This game is played on a 4 by 4 grid. Balloons are randomly loaded at the top of the grid and fall to the bottom. You can move a paddle left or right to block the balloons and thus prevent them from bombarding the folks below. If 3 balloons hit, the scent police haul you off to work in a paper company for the summer.


My instructor, Dr. Peckol, obviously has a really dry sense of humor. Anyway, my lab partner and I decided to build the project on an 8 by 8 grid, since there were compact dual color 8 by 8 LED (light-emitting diode) Matrices available at the UW parts store. The biggest challenge of the project was figuring out how to get the LED Matrix to work. Here is a schematic of the LED Matrix taken from the data sheet:

Since most of my readers aren't familiar with electronics, all of the triangle/line things are diodes, meaning that current can only flow in the direction of the arrow. When you apply a positive voltage to any column, and ground any row, current is allowed to flow through the diode at the intersection between the selected row and column. The problem is, how do you get two lights on at the same time that aren't in the same row or column? If you applied voltage to two of the rows and grounded two of the columns, you will have four LEDs shining, not two.

The trick to using an LED matrix is only having one column on at any time, and cycling through the columns at high frequency. The human eye can only notice a flicker of up to 50 Hz, and due to one of the properties of the human eye known as persistence of vision., an LED needs to be on for only nanoseconds in a 50 Hz cycle in order to appear as though it is continuously on. In our project, we have up to three objects on the screen during the course of the game, although the column and row display drivers cycle through displaying only one object on the screen at any given instance. We built a 555 Timer circuit outputting a pulse of 6.9 kHz, which is used to cycle through the objects on the screen.

Here is a block diagram of our game design:

The larger components of the circuit, including the Control, Sequencer, Row Driver and Column Drivers, were written in structural Verilog (programming language), then written onto generic array logic (GAL) chips. The random bit generator is a 3-bit linear feedback shift register, which is a common method for generating pseudo-random numbers. Here is a photo of the final circuit:

Well, I won't go too much deeper into all that boring electronics and stuff... I could go on for 26 pages (that's how long our lab report ended up being). Here it is in action!



There is one glitch in the final version I discovered last minute that I think is an easy fix... Once in a while, a balloon skips a row. I think this is because the clock signal to the Sequencer module has a race condition.

Anyway, that was my project. Digital Circuits is really a fun class. I get a month-long Summer break, so I think I'll do some hiking trips and some other fun things. Next quarter, I'm taking E E 331 Devices and Circuits I, E E 361 Applied, and Electromagnetics, and AMATH 301 A, Beginning Scientific Computing. It's not going to be an easy quarter! :(