Final project for ME 433: Advanced Mechatronics, spring 2016.
In this project I designed, fabricated, and programmed a mobile robot made of laser cut and 3D printed parts, which follows a Mario Kart circuit – for Northwestern’s Tech Cup 2016. I also created an app using Android Studio, with sliders and live camera preview to adjust RGB thresholds on-the-go for detecting colored line, and programmed a PIC32MX250128B MCU to receive the line position via USB CDC and perform PD control on wheel motors.
The Android app thresholds across RGB over 3 bands of 30 rows each from the top, middle, and bottom of the camera’s view. The selected pixels have Red content more than the top slider’s value, and Green and Blue content less than the middle and lower sliders’ values respectively.
The column Center of Mass (CoM) of all selected pixels is calculated, and its offset from the middle (320, since resolution is 640x480) is sent to the PIC. If no pixel is thresholded, the value sent is 0.
The PIC receives the offset (~ error from desired heading) via USB CDC and
The PCB schematic shown in the image below was used:
After soldering all components onto the PCB as well as the H-bridge breakout board:
Some of the other assignments during the course involved:
Interfacing a TFT LCD to read IMU data. They talk to the PIC via SPI and I2C protocols respectively.
Using PIC32+IMU as a mouse, via USB HID.
Getting a feel of laser cutting, by making a 3-sided box.
Date: Jun 6, 2016
Categories: project
Website: https://github.com/tanay-bits/tanayChoudhary_ME433_2016/tree/master/HW16-TechCup