Lab Projects

Many of my electrical and computer engineering courses include hands-on lab work. I’ve learned a lot about lab-bench test setups, programming, FPGA, and circuit design.

PID motor controller and UART

This project used a PIC32 microcontroller, explorer board, metal gearmotor with encoder, and H-bridge motor driver. The I wrote code in C to do the following:

  • Receive a reference angle from a MATLAB script via UART

  • Control the motor to move to the reference angle using three different methods, including integral-proportional mode.

  • Continuously update the LCD screen with the current and reference angles

  • Use UART to send angles to MATLAB and create a plot over 5 seconds.

This project included designing an integral-proportional motor control procedure, UART communication, wiring multiple devices, and programming a microcontroller (interrupts, internal timers, tri-state register assignments, output compare, and an LCD display driver).

Line graph illustrating reference angle and angle versus time, with the reference angle remaining steady and the angle rapidly increasing then stabilizing.

underdamped

Graph showing reference angle and actual angle versus time, with reference angle remaining constant at about 157 degrees and the actual angle increasing rapidly within the first second, then leveling off.

critically damped

Line graph titled 'reference angle and angle vs time' with two lines: one labeled 'reference angle' and the other 'angle.' The x-axis represents time in seconds, ranging from 0 to 5, and the y-axis represents angle in degrees, ranging from 0 to 180. The lines show the angle increasing over time, with the reference angle remaining nearly constant near 180 degrees, while the 'angle' line rises sharply from 0 to 180 degrees within a few seconds.

underdamped

Lab Report
Setup of electronic testing and control circuit with a gift card microcontroller, breadboard, motor, power supplies, and a notebook keyboard on a wooden table.

Digital Logic Labs

The two projects below were selected from a total of 10 labs from my Logic Design class and completed with two other classmates. Each was implemented on the DE0-CV programmable logic board (right).

A handwritten table comparing the truth tables for Present State A, Next State A, and F.F Inputs with binary values in columns A, B, C, D, and their corresponding output values.

Counter with Flip Flops: We created an optimized click counter using the minimum number of devices. We used a truth table (left) and Karnaugh Maps (middle) to design out logic circuit and then implement with D flip-flops (right).

Flip Flop Counter Lab Report
A diagram displaying four matrix equations, each with colored numbers and symbols, illustrating matrix operations with labeled variables and resulting matrices.
Electrical circuit diagram with logic gates, switches, and connections.
Diagram of a state graph with six states labeled S0 to S5 connected by arrows, with transition probabilities written on the arrows.
A table with columns labeled A, B, C, X, and 1, 2, 3. Rows contain binary data with 0s and 1s, some marked with Xs in the last rows.
A handwritten truth table showing the states for a digital logic circuit, with columns labeled for present state, next state, and output, including binary values and state transitions.
Four Karnaugh maps with binary values, grouped with green and black outlines, representing different Boolean expressions.

Mealy Machine: The output equals the input until 000 input is identified. Then, the output equals the inverted input until a 111 input is identified. Then the output equals the input again. We started by creating a state map (top left), state table (top middle), truth table (bottom left), Karnaugh Maps (bottom middle). Then we used D flip flops to design a Mealy Machine (right).

Mealy Machine Lab Report
Digital circuit schematic with logic gates, multiplexers, and connections.