Skip to content

meng1994412/Advanced_Mechatronics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced Mechatronics in Mechatronics Systems Prototyping

Project Obejctives

  • Design, solder, and debug a printed circuit board (PCB).
  • Implement advanced digital communication protocals like SPI, I2C, USB, CAN.
  • Design the prototype with SolidWorks.
  • Create physical prototypes with a laser cutter, and a 3D printer.
  • Interface with Android device.

Software/Language Used

Hardware Used

Weekly Milstones

Week 1

  • Build and program a PIC32MX250F128B circuit board. (details here)

Here is the circuit board:

Week 2

  • Design a PIC32MX250F128B library and schematic on EAGLE. (details here)
  • Build a PIC32MX250F128B PCB on EAGLE. (details here)

Here is the schematic:

Here is the PCB:

Week 3

  • Build the MCP4912 DAC circuit and write a library to communicate with it via SPI. (details here)
  • Build the MCP23008 I/O expander circuit and write a library to communicate with it via I2C. (details here)

Here is sine wave and triangle wave generated by SPI communication between MCP4912 and PIC32:

Here is demo of communication between MCP23008 and PIC32:

demo1

Week 4

  • Build communication between PIC32MX250F128B and TFT LCD via SPI. (details here)
  • Solder IMU breakout board onto heahders pins. (Picture)
  • Build communication between PIC32MX250F128B and IMU via I2C. (details here)

Here is a demo of LCD display:

demo1

Here is a demo of IMU reading on LCD screen: demo1

Week 5

  • Rebuild communication between PIC32MX250F128B and IMU via I2C by using Harmony framework. (details here)
  • Build communication between PIC32MX250F128B (including IMU, LCD) and computer (PuTTY) via USB (communication class device (CDC)) by using Harmony framework so that PuTTY can obtain data value from IMU. (details here)

Here is a demo of communication between PIC32 and PuTTY:

demo1

Week 6

  • Add digital signal processing (DSP) filter, including moving average filter (MAF), finite impulse response filter (FIR), and infinite impulse response filter (IIR), on z accleration of IMU to get rid of high frequency noises. (details here)
  • Build communication between PIC32MX250F128B (including IMU, LCD) and computer via USB (human interface device (HID)) by using Harmony framework so that IMU can control the mouse on PC. (details here)

Here is a plot of raw data, and filtered data:

more details about the filter: check here

Here is a demo for IMU controlling the mouse on PC via USB communication (HID):

demo1

Week 7

  • Write a simple app (named HelloWorld) for a Android device (Moto G version 4.4.4), which have a slide that displays a value from 0 to 100, and buttons to increase, decrease, and reset the slide bar value. (details here)
  • Write a camera app (named ColorDetector)for Android device e (Moto G version 4.4.4)that when pointing the camera at a green object, the app should identify the green shape and draw lines on top of it. (details here)

Here is a demo of how HelloWorld app works:

demo1

Here is a demo for how ColorDetector app works (with adjustable sensitivity) on a RAZER mouse box:

demo1

Week 8

  • Solder the PCB with components from breadboard. (details here)
  • Build a USB communication (class CDC) between PIC32 PCB and Android phone by writing a PIC32 program and Android app (named My Application), which PIC32 program will send a number to Android phone 5 times per second, and Android app has a slider to update value, a button to press to send the value of the slider to the PIC, a textview to show what was sent to the PIC, and a textview wrapped in a scrollview to show what was received from the PIC. (details here)

Here is the picture for PCB after soldering with components:

Here is the screen of Android app:

Here is the demo of how communication beteen PIC32 and Android device work:

demo1

Week 9

Here is a picture of wheel design:

Here is a picture of box assembly design:

Week 10

  • Make PI controller for wheel velocity and steering. (details here)

  • Build an image processing app on Android device so that the robot is able to detect the road on the map. (details here).

  • Utilize 3D printer to produce the wheels of the robot.

  • Utilize laser cutting machine to produce the robot box.

  • Assemble the all the parts together.

  • Combine the image processing on Android device and PI controller on PIC32 together.

  • For final project check details here.

Here is a picture of the robot:

Here is a demo for the robot following map:

demo