ANDROID LINE FOLLOWER MOBILE ROBOT

Android Line Follower Mobile Robot

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

  • if it’s > ERRORBAND or < -ERRORBAND, makes the bot turn right or left using PD control on each wheel
  • if it’s exactly 0 (no CoM), reverses both motors’ directions and moves back slowly so that it can attempt to locate the line again.
  • if it’s between -ERRORBAND and +ERRORBAND, it makes the bot move straight by turning both motors at high speed. Kp = 1.0 and Kd = 0.5 seem to work well for me. The bot was successfully able to complete the circuit.

The PCB schematic shown in the image below was used:

schematic

After soldering all components onto the PCB as well as the H-bridge breakout board:

soldered soldered2

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.

lcd

Using PIC32+IMU as a mouse, via USB HID.

Getting a feel of laser cutting, by making a 3-sided box.

lc

lc2

Project Dependencies

android studio     mplabx     C    

Project Details

Date: Jun 6, 2016

Categories: project

Website: https://github.com/tanay-bits/tanayChoudhary_ME433_2016/tree/master/HW16-TechCup

Other Works

FRICTIONLESS SURFACE MOBILE ROBOT AND LASER-BASED LOCALIZATION

PROTOTYPING NUDGING HEADPHONES

OPTIMAL CONTROL OF KINEMATIC CAR MOTION

ANDROID LINE FOLLOWER MOBILE ROBOT

INTUITIVE ROBOT TELEOPERATION

Around the Web

My Bunker

Cambridge MA,
United States.

Credits

This site is based on the Solid theme
created by blacktie.co