Armaan Sengupta

Projects / Automated Measurement System

Automated Measurement System

Dec 2023

Led the firmware for a station that measures parts to 0.3 mm, including a custom 2-wire protocol to the VEX brain.

Owned all firmware: both motors, encoder-to-dimension mapping, the GUI, and a custom 2-wire clocked protocol so an ESP32 could talk to a VEX brain that only exposes digital reads.

OpenCV finds part orientation, angles stream over WebSockets, and the part turns to its critical dimension. Out-of-spec parts are logged to a server.

What it does

A station for quality assurance on an automation line that checks part tolerances right after manufacturing with no human involved. A part goes on a rotary platform; computer vision turns it to the orientation of its critical dimension; a clamp on a rotary encoder closes on it and stops on firm contact using force sensing, and the encoder rotation becomes a length. Out-of-spec parts have their image and failing dimension logged to a remote server, with a notice on the machine's display.

What I did

I was the lead firmware engineer: C++ on the ESP32 and the main controller for all motor control, dimension derivation and the GUI. I also worked with a teammate on the OpenCV orientation detection in Python, which sends the angle to the ESP32 over WebSockets.

A custom 2-wire protocol

The VEX V5 brain runs proprietary firmware with no UART, I²C or SPI, only the ability to read a pin as high or low. So the ESP32 receives the angle wirelessly from the PC and sends it to the brain over two wires using a protocol we designed, loosely inspired by I²C, with a clock line and a data line. The brain decodes the binary angle into encoder ticks and turns the part to the right orientation.

See it on the interactive siteDemo ↗Project report (PDF) ↗Technical report (Google Drive) ↗