Documentation

Design Details

Code

The source code for the final project can be found in the team’s Github repository

MCU Design & New Functionality

The MCU has four critical functions. It configures the OV7670 over the SCCB interface, sends a signal to drive XCLK on the OV7670, read bit-masked frames from the FPGA over SPI, and control the position of the robot along the line based on the data from the frames. The new functionality on the MCU was the SCCB peripheral to communicate with the camera, this is similar to I2C protcol, and something that is beyond what we learned in the labs.

FPGA Design & New Functionality

The FPGA has several critical functions, notably to: read & process pixel data from the OV7670, bitmask the high-dimensional image into binary image, store this over SPRAM, and communicate that data to the MCU over SPI. In order to send pixel data to the MCU, a double SPRAM buffer was implemented. The new functionality on the FPGA was the SPRAM buffer and SPI communication, and this is something that is beyond what we implemented in the labs.

New Hardware

The main piece of new non-trivial hardware being integrated is the OV7670 camera module, and the SPRAM functionality of the FPGA.

Schematic

The final system schematic representing all the connections between the different peripherals in the system can be seen below.

Schematic

RTL Block Diagram

The block diagram describing our RTL, which can be seen below.

Block Diagram

Bill of Materials

Item Part Number Quantity Price Source
Camera Module OV7670 2 $9 Amazon
Motor Driver L298N 1 $6 Amazon
MCU and FPGA STM32L432KC and ICE40up5k 2 NA Provided
Buck Converter LM2596S 1 NA Stockroom
Robot Chassis Kit N/A 1 $10 Stockroom
LiPo Battery (12V) LM2596S 1 NA Stockroom
Resistors 4.7k Ohm 4 NA Stockroom