Projects
Levitating ball using a fuzzy control system
For our final project in Dr. Richard E. Haskell's ECE470 class (Microprocessor-based System Design) at Oakland University, Muawea Rawashdeh and I built a system to levitate a ping-pong ball at a desired height with the use of a fuzzy control system running on an HCS12 microcontroller.
A ping-pong ball is trapped within a Plexiglas tube, with a duct fan mounted at the base to provide life for the ball. An ultrasonic sensor mounted within the tube provides a feedback loop for the system, while an infrared sensor mounted at the side, parallel to the tube, provides for user input.
The basic goal is to make the ball hover smoothly at a desired level within the tube, by correctly controlling the speed of the fan mounted at the bottom of the tube, and by correctly interpreting the feedback information provided by the ultrasonic sensor mounted within the tube. The setup is that of a classic feedback loop. The system input (fan speed) is changed, and as a result the output (ball speed and position) is changed. The output is continuously observed to determine how to further adjust the input. Our project uses "fuzzy logic" to determine the proper output.
FPGA-based Mandelbrot Generator
For our final projects in ECE378 (Digital Logic and Microprocessor Design) and ECE495 (Advanced Embedded Systems) at Oakland University, our group designed an FPGA-based Mandelbrot generator. The three-person team consisted of myself, Bryant Jones, and Andrew Ullmann.
To begin, it's necessary to introduce what a Mandelbrot is. A Mandelbrot is a fractal (named for its discoverer, Benoit Mandelbrot) produced by performing the calculation Zn+1 = Zn2 + c recursively upon coordinates in the complex plane. If, after a number of iterations, the absolute value of Zn2 + c is found to be greater than 2, it escapes the Mandelbrot set. If it never reaches this value, then it belongs to the Mandelbrot set. The boundary between the points that belong to and escape from the Mandelbrot set forms an infinitely detailed and self-similar structure known as a fractal. One can zoom infinitely along this border, limited only by (1) number of iterations taken for each point and (2) the precision of the numbers used in the calculation.
I first became introduced to the world of Mandelbrots by my grandpa, who was a math professor (and later, vice-president) at OCC. He gave presentations on Mandelbrots to illustrate the beauty of mathematics, showing how this very simple equation gives rise to such intricate and awe-inspiring detail. He would prepare slides ahead of time for presentations because they'd take days to render on the computers available at the time! The same calculations fly by in seconds on today's computers (or faster, as you'll see on our custom hardware!)
Accelerometer-controlled Tetris clone
For our EGR280 project in the Winter 2009 semester, my group made a clone of the classic game TETRIS.
Our version replicates the functionality and logic of the original game (all coded by observervation), but replaces a traditional keypad input with a three-axis MEMS accelerometer. Turning the accelerometer left, right and down moves the block accordingly. A push button on the controller rotates the block 90º clockwise.
A Dragon12+ microcontroller controls the game logic, music, score, sampling and interpretation of the accelerometers with code written in C. It has several arrays that store the state of the 20x10 Tetris board, communicating this state via RS-232 with a Nexys2 board programmed with Verilog, which displays the board on a standard VGA display.