Below are some additional projects I did over the semesters.
I successfully designed and implemented a two-stage BJT class-A power amplifier that has enough power swing to drive a speaker. I did it using the 2N2222 transistor, achieving a nominal current gain of β=200 and ensuring the amplifier maintained a power dissipation of up to 600 mW. The design operates at a DC power supply voltage Vcc between +5 VDC and +30 VDC, with a peak-to-peak current swing of 230 mA at a load resistance RL of 16 ohms, without clipping. The amplifier delivers a small signal current gain of Ai=130 with stability maintained over 100≤β≤300 at a deviation of ±15%. It also achieves a small signal input resistance of 1 kΩ while maintaining a power efficiency η of at least 5%, exceeding all minimum requirements. The design successfully incorporates capacitive coupling, adheres to maximum current limits of 250 mA for both stages, and achieves performance goals with stability, efficiency, and precise input resistance.
The left image below is the PSpice schematics of the amplifier. The emmiter of the left BJT is connected to the base of the right BJT, therefore, the total amplification is the product of the two. The right image is the physical circuitry I built in the lab.
The left image below shows the comparision table between lab measurement and the PSpice simulation of DC parameters. The right image shows the oscilloscope's measurement for the amplification. The curves peak at 1.92V before clipping on one side, which is enough for driving the speaker.
For my Comparch course project, I built a C++ base processor simulator. The processor is called E20, which has its own set of instructions and caching rules. The user will write instructions in binary, and the processor will perform operations such as basic arithmetics, read and write in memory, and manage the pc based on those instructions. Below shows the hardware structure of this E20 processor.
Here is one example of binary instruction set. This is then pass to the assembly decoder to feed into the processor.
Below shows the result of running the assembly code using the simulator. The left shows the cache activity, whether it's a miss or hit, and the addresses engaged. The right image shows the value of registers and memory.
The goal of this project is to develop a two-dimensional predator-prey simulation featuring ants as prey and doodlebugs as predators in a 20 × 20 grid-based world . I built the simulation using C++.
Time advances in discrete steps, during which each critter performs specific actions. Ants move randomly to adjacent cells unless blocked, and after surviving three steps, they breed by spawning a new ant in a nearby empty cell. Doodlebugs, on the other hand, will move to adjacent cells with ants to eat them, or move randomly like ants if no prey is adjacent. After eight steps, doodlebugs breed similarly like ants, but they starve and die if they fail to eat an ant within three consecutive steps. All doodlebugs move before ants in each turn. The simulation uses ASCII characters to visualize the grid, representing ants with "o," doodlebugs with "X," and empty spaces with "-."
A base Organism class encapsulates shared data and a virtual move function, extended in derived Ant and Doodlebug classes. The world initializes with different amount of ants and doodlebugs, and each time step progresses when the user presses Enter. Over time, a cyclical pattern in predator-prey populations is expected, though random fluctuations may lead to the extinction of one or both species.
Here is the video demonstration of the program in action: