Projects

Speed Trap

The speed trap measures how fast an object is moving as it passes two sensors and display the speed on a dial-type indicator. It also relays that speed to a remote device.

The speed in cm/sec is shown on the LCD display and also on an indicator dial similar to an analog speedometer used on many cars where a pointer rotates to point to the speed. A block diagram of the speed trap is shown on the right and it has the following features:

  • Two LED light sources, and two phototransistors light detectors for determining the time it takes for an object to go from the first sensor to the second sensor.

  • An LED to indicate that a speed measurement is in progress.

  • An LCD display for showing the measured time to pass the sensors in msec and the speed in cm/sec. The display is also used for setting a speed threshold and displaying the speed received from the remote device.

  • A dial-type speedometer display for indicating the speed.

  • A knob for selecting a speed threshold.

  • A buzzer for playing an alarm tone.

  • A serial interface (RS-232) to another speed trap unit. When the local unit measures a speed it sends it to the remote unit. When a speed is received from the remote unit it is displayed on the LCD.

  • Two LEDs for comparing the speed measured on the local device with a speed received from the remote unit.

The buttons, LEDs, rotary encoder, buzzer and phototransistors, and the various resistors were all be mounted on my breadboard. The video on the left illustrates a demonstration where I slid my ID through the phototransistors, and the LED captured the speed of the card swipe.

Image Processing
  • Designed a 3x3 kernel matrix for edge detection.

  • read the image ”fox.jpg” through imread to stored the data in 3 2D-matrices since there are 3 color channels.

  • Performed 2D convolution for each matrix with the kernel and then restored the processed image data.

Reconstruction of function as Fourier Series

Better reconstruction is expected as N increases. Suppose T = 1, a = 0.4, and N = 30, the plot contains both the original signal and the reconstructed signal.

Low Pass Filter

  • t is a time array from 0 to 10s with sampling interval equal to 0.001s, x(t) = cos(2πf_1t) + cos(2πf_2t), where f1 = 10Hz and f2 = 30Hz. X(f) was computed in MATLAB using fft command.

  • Designed a low-pass filter h(t) with cut-off frequency f_c equal to 20Hz.

  • Applied the low-pass filter to x(t). Let y(t) = x(t) ∗ h(t) where denotes convolution. Applied the inverse Fourier Transform (ifft) to Y (f) = X(f)H(f) for finding the output of the filter.

The Snake Game via FPGA

The successful implementation of the Snake Game on an FPGA board has achieved the objectives, combining entertainment with educational value. This project serves as a testament to the capabilities of Verilog HDL and FPGA in creating interactive and enjoyable applications.

Modules:

  • Implemented functions for snake movement, food generation, and collision detection to ensure a seamless gaming experience through Verilog Coding

  • Designed a display module in Verilog to render the game on the FPGA board.- Utilized VGA interfaces for visual output

  • Implemented an input module to capture user commands for controlling the snake, the right, left and up buttons were assigned to control the snake's position while the center button and switch 1 were used to reset the game and provide the start signal at the beginning of the game respectively.

  • Conducted comprehensive testing to ensure the correct functioning of the game.

  • Implemented debugging mechanisms to address and resolve any identified issues promptly

Electric Guitar via Band Pass Filter

I designed a band pass filter that filters specifically the guitar G chord which is around 196Hz. The circuit functions as a device to filter the frequencies that were converted by the pickup for the guitar. The guitar filter detects the magnetic field when one plucks the strings, it then converts the magnetic field to signals that go into the RC bandpass circuit, the circuit then amplifies the signal and feeds it into the speaker.

We chose the resistors for R1 and R2 to be 1 kilo-ohms and C1 was chosen to have a capacitance of 1 microFarad and C2 was 680 nanoFarad. Next, we added a noninverting amplifier to our circuit amplifying the signal input of the pickup by a scale of 11 by using the feedback resistor of 10k ohms where R1 was chosen to be 1 kilo-ohm.

This project demonstrates the conversion of a signal into a magnetic field, which in turn produced amplified acoustic sound via the speaker. The bandpass filter we designed efficiently selected and outputted the signal within the intended frequency range.