View on GitHub

Project Website & Repo for Brian Li & Marko Ristic’s Backup Camera Aid


This is the project website for Brian and Marko’s ECE 153B Final Project. We have created a Backup Camera Aid using an ultrasonic distance sensor, LCD display, Wii Nunchuck, and the Termite terminal. The project uses the Nunchuck to control the state of our processor, simulating the gear selector on a car. If we are in the right state of reversing the “car,” the LCD will output a visual representation of the distance measured from the ultrasonic sensor, similar to how a car will display warning lights on its monitor when the car is too close to an object when reversing. We will also send a warning signal to the Termite terminal to simulate how a car could send a warning to the dashboard or the monitor.

Block Diagram


Final Parts List and Serial Protocols

Video Demonstration (click the photo)

Video Demonstration

Weekly Updates

Project updates will be posted every week

Week 1

This week we went through and bought all of our parts:

We also made sure that we would be able to interface with our components. The LED’s are controlled using WS2812b protocol, which we will iterface with using SPI. Our Nunchuck will use I2C protocol to interface with our microprocessor. Our microphone sends data using PDM, which we will interface with using SPI protocol.

Week 2

This week we went about structuring our code based off the block diagram of our project. We implemented a lot of the UART and SPI pin and clock initializations, as well as made a barebones main.c file. Additionally, the parts for our lab came in this week, so next week we will go about soldering all our parts together and physically building our project, as well as begining to handle interefacing with our peripherals within our code.

Week 3

This week we implemented interfacing with our microphone using SPI protocol. This was done through the use of a function to receive the 16-bit PDM value from our microphone, which we then converted to a corresponding magnitude (within [0,8]) for our 8x32 LED Board. Additionally, we implemented communication with our Wii Nunchuck using I2C protocol, enabling us to now receive control instructions to change the color and brightness of the LED’s on the board.

Final Update

Unfortunately, we were unable to correctly interface with our 8x32 LED board using SPI protocol. Despite rigorously examining the WS2812B datasheet for the LED, our efforts to correctly interface with the LED board proved unsuccessful. Additionally, Amazon misrouted our cable to connect to our pdm microphone to the wrong Amazon locker (Thanks Bezos!), so we were unable to establish any sort of communication with our PDM Microphone using SPI protocol. This forced us to pivot to a new idea: A Backup Camera Aide, which would work as follows.

Protocols/Peripheral Devices:

We implemented writing to the LCD Display this week, and pulled our ultrasonic code from a previous lab to correctly measure the distance from the sensor. We then added state code which was controlled by the pressing the c-button on the Nunchuk, and implemented a conversion from the distance received by the sensor to a displayable index on our LCD screen.