Tech Cup

  • A racing competition of line-following robots with an Android phone
  • Design and program a line-following robot building up from just a micro-controller
  • Develop an Android app to track center of line

Project Summary:

1. Build and program a PIC32 circuit
  • First, a PIC32 circuit was built to test the micro-controller (PIC32) as shown below
  • A LED was connected to one of the I/O pins and made to blink at 1 kHz


2. Design a PCB for PIC32 circuit
  • A PCB layout was designed using EAGLE software as shown below and Gerber files were created to be sent for fabrication
  • SeeedStudio was used to manufacture the PCB boards


3. Design and build a robot (3D print and laser-cut)
  • A line-following robot was designed and fabricated as shown below
  • The main wooden base of the robot was designed in SolidWorks and fabricated using laser-cutting
  • The wheels and phone-holder were designed in SolidWorks and 3D printed using Ultimaker 3D printer


4. Develop an Android app using Android Studio
  • An Android app was developed using Android Studio to isolate the track using color segmentation and calculate the center of the track width in real-time
  • TextureView technique was used to stream video/images from Android phone camera onto the screen
  • Moreover, ‘sliders’ were added to the app to allow calibration of RGB values on-the-fly


5. Communicate between Android and PIC using CDC
  • Communication between PIC and Android device was achieved using CDC
  • usb-serial-for-android library by mik3y was adapted to work with my PIC and Android phone

Other mini-projects:

  • A software library was written to communicate between PIC32 and MCP4902 DAC using SPI
  • Test: A 10Hz sine wave on Channel A of oscilloscope and a 5Hz triangle wave on Channel B, (values updating at 1000 times a second)
  • Output of the above two waves is shown below:


  • In this task, an IMU – LSM6DS33 accelerometer and gyroscope chip – is connected to PIC32 and communication between PIC and IMU is achieved over I2C
  • Values from the IMU are read by PIC and output is displayed on a TFT LCD screen
  • An algorithm is developed to display characters onto the LCD screen


c.  3-Sided Box
  • An exercise to get familiar with using the laser-cutter
  • A 3-sided box, with one side flexible, was fabricated as shown below:



0 comments on “Tech CupAdd yours →

Leave a Reply

Your email address will not be published. Required fields are marked *