Jumper wire setup because we did not use ADC pins for sensorsMakeshift connector for uploading because our PCB one detachedFinal upload configurationFull view of final mouse PCB
Micromouse is a yearly competition project hosted by my school’s IEEE branch. The premise is to design a PCB, put wheels on it, and get it to navigate a randomized maze.
Over the course of a year, I worked on both the PCB and the firmware. I designed the board in KiCad to bring together the microcontroller, IR sensors, and motor control. I also implemented PID control in STM32CubeIDE to reduce drift during navigation, along with shortest-path search through mapped maze cells so the robot could plan its route.
This project culminated in something called overnight work session, where -- as the name implies -- you pretty much just suffer for an entire day fleshing out your mouse and either make the race or quit. The PCB, being the first for our entire team, had a bunch of mistakes on it that we ended up having to patch out. We had wired the reset button incorrectly, which prevented firmware uploads through the board’s programming connector, and assigned analog inputs to STM32 pins without ADC support. So, we had to solder on fly-wires to circumvent the faulty traces -- a process that actually kept us up all night. But, by 4 p.m. on race day, we were finally able to get our firmware uploaded and our mouse running.
02. FPGA Image Processing Accelerator
FPGA Hough line-detection output.
I learned Verilog over the summer by working through HDLBits. For this project, the idea was to take an image and have an FPGA find its edges and straight lines. I’m also getting further into digital design through another IEEE student branch project and the labs and coursework in Digital Design Laboratory and Logic Design of Digital Systems.
I started with a pipelined Sobel edge detector, using block RAM line buffers to hold neighboring image rows as pixels move through the design. The next part was finding lines in those edges. For that, I implemented a fixed-point Hough transform with lookup tables, saturated voting, and peak suppression to pick out distinct lines. The colored lines drawn over the image above are the output.
Originally, my plan was to just restrict the detection to 4 lines and just work with them to fill in a shape using an edge equation. However, I've found that the 4 most "prominent" lines are reaaally inconsistent, so this isn't too viable for filling in a given shape in the video feed.
My idea right now is to keep more lines and group their intersections into vertex "bins". Clusters of intersections could give me possible corner locations to work with. I’d then try to pick out four that form a quadrilateral and follow the edges in the image. Once the corners are stable, I can use edge equations to fill in the shape. I’m still working out how to make that corner selection consistent.
03. PIC16 Wolf–Sheep Simulation & Hardware RNG
Simulation & hardware photos
Wolf-sheep simulationBreadboard prototype
For this project, I programmed a wolf–sheep simulation in embedded C on a PIC16 microcontroller. The idea was to use random values to drive what happens in the simulation and show the result on an LCD.
I also explored generating randomness using the PIC’s hardware. I configured a ring oscillator using its configurable logic cells, then used a timer to count the oscillator’s output asynchronously. From there, I sampled the least-significant bit of the count to explore its use as a source of hardware entropy.
To get the simulation onto the screen, I wrote a bit-banged SPI driver using GPIO pins. This meant controlling the clock and data signals in software to send commands and pixel data to the LCD.