Week 10 Lab

pdf

School

University of California, Los Angeles *

*We aren’t endorsed by this school

Course

MISC

Subject

Mechanical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

16

Report

Uploaded by ProfessorTarsier4030

Section 4 Instructor: Yen-Chi Chang TAs: Kevin Lai, Ting-Hao Liu Mechanical and Aerospace Engineering Department, UCLA Winter 2024 MAE162D MECHANICAL PRODUCT DESIGN-I Week 9+10 LAB
Updated Schedule* 2 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA Week Lab Assignments (Due before following week’s lab) 1 (1/11) Group Activities : Team Mtg. & Brainstorming for Design Design Concept Sketches ( individual HW) 2 (1/18) Group Activities : Converge design ideas and CAD design analysis/discussion Optional HW: DaNi Robot Assembly 3 (1/25) Lab: Motion study HW: Rover Power Calculations 4 (2/1) Group Activities : Proposal Lab: Rover Simulink simulation introduction Design Concept Proposal 5 (2/8) Lab: Arduino Kits Unbox and Assembly, Hierarchy Programming, and Signal Monitoring HW: Segment Power Calculations 6 (2/15) Lab: Arduino Kits Stateflow logic with sensor HW: Preliminary CAD model 7 (2/22) Lab: Arduino Kits Line following navigation Group Activities : CAD design checkups HW: Conceptual Design Report 8 (2/29) Lab: IDE stepper motor control 9 (3/7) Group Activities Design report 10 (3/14) Lab: DC motor control and Arm trajectory planning HW: Preliminary Design Report 11 (3/22) Preliminary Design Report Due *Schedule subject to change
Announcement Purchase instruction from last year posted for your reference Two parallel labs this week (switch in week 1 next quarter) Even # do arm trajectory planning and tracking (Lab 9) Odd # do DC motor control (Lab 10) HW: preliminary design report outline ( Preliminary Design Report Outline.pdf ) posted Due 3/22 (Fri.) 11:59 pm 3 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Lab 9: Arm Trajectory Planning/Tracking Adeept 5-axis robotic arm Download, extract, and save project SDK to a local directory https://www.adeept.com/learn/detail-64.html ( ADA031-Adeept_Robotic_Arm_Kit_for_Arduino-V4.0- 20240223.zip ) The Adeept microcontroller is recognized as Arduino Uno in the IDE You may need to install some libraries to verify and compile any code (under Software Package/libraries) 4 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA
Lab 9: Arm Trajectory Planning/Tracking Adeept 5-axis robotic arm task Compile and upload MainWeek9.ino to the Adeept microcontroller Make sure to disconnect at least two servo motors while uploading to prevent your USB port from overheating We will not use the grasping axis (servo 5) for safety reasons 5 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA 1. Use the potentiometers on the board to create a trajectory for the robot arm 2. The LCD screen displays the current angle command for each axis in degrees 3. The trajectory must have at least 8 points 4. Save the trajectory to an integer array in your .ino file 5. Compile and upload your code to demonstrate tracking
Lab 9: Arm Trajectory Planning/Tracking Final remarks MainWeek9.ino is programmed to send command at a rate of 10 Hz The change in position must be carefully decided to avoid aggressive motion When finish uploading, unplug the USB cable from your PC, and use the power switch on the board to draw power from the batteries Hint Set the driveServo flag to false to adjust the potentiometers and create the trajectory Set the driveServo flag to true to run the full trajectory The potentiometers are all initialized at 𝜃 = 90° 6 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Lab 9: Arm Trajectory Planning/Tracking Submission details (Odd # Group submission due 3/14 11:59 pm) Answer the following questions 1. How repeatable is the position tracking performance? Does the robot follow the same trajectory reliably? How do you quantify it? 2. What did we do to remove the angle command offset associated with the robot’s initial configuration? 3. How would you modify this procedure to create a smoother motion profile for the robot? What changes would you make to the trajectory array? Compile your answers to a pdf and zip it with your .ino file Submit the zip file to BruinLearn as Team#-Lab9.zip 7 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA
Lab 10: DC Motor Closed-Loop Control Tasks Tune the PID gains for position loop (PD) and velocity loop (PI) Achieve the step response requirements Example plots 8 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA
Lab 10: DC Motor Control Procedure Download MainWeek10.zip Use MainWeek10.ino skeleton code Update the parameters in GainsInit() Toggle typeBit for velocity or position control Update kp , ki , and kd values accordingly Record serial output, plot, and evaluate the performance You may use CoolTerm or Putty to record the serial data (50 Hz) Tune the parameters to reach the specified requirements 9 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Lab 10: DC Motor Control Motor Drive L298N 10 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA
Lab 10: DC Motor Control Wiring diagram If your motor does not run, it may be due to the “floating” ground on the motor drive Connect motor drive GND to Arduino GND with an additional jumper wire 11 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA
Lab 10: DC Motor Control Position loop (typeBit = 0) 12 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA 𝐺 ? 𝜅 ?(𝜏? + 1) 𝐶 ? = 𝑘 𝑝 + 𝑘 𝑖 ? + 𝑘 𝑑 ? 𝐶(?) 𝐺(?) r y u (counts) (16-bit int) e _ (counts) 𝑦 ? 𝜅(𝑘 𝑑 ? 2 + 𝑘 𝑝 ? + 𝑘 𝑖 ) 𝜏? 3 + 𝑘 𝑑 ? 2 + 𝑘 𝑝 ? + 𝑘 𝑖 Open-Loop Closed-Loop (small i-gain)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Lab 10: DC Motor Control Velocity loop (typeBit = 1) 13 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA 𝐺 ? 𝜅 (𝜏? + 1) 𝐶 ? = 𝑘 𝑝 + 𝑘 𝑖 ? 𝐶(?) 𝐺(?) r y u (counts/s) (16-bit int) e _ (counts/s) 𝑦 ? 𝜅(𝑘 𝑝 ? + 𝑘 𝑖 ) 𝜏? 2 + 𝑘 𝑝 ? + 𝑘 𝑖 Open-Loop Closed-Loop
Lab 10: DC Motor Control Log data You may use CoolTerm (as instructed in week 5 lab) Or PuTTy (https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) 14 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA Click “Open” to start
Lab 10: DC Motor Control Tracking results Collect the tracking results and plot Make note of the gains Sampling frequency is 50 Hz, i.e., each sample is 0.02 s apart 15 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA Example Matlab scripts: Example data format:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Lab 10: DC Motor Control Submission details (Even # Group submission due 3/14 11:59 pm) One pdf file that includes the following A reference tracking of position control, type the PID values A reference tracking of velocity control, type the PID values Hint: you can directly use the “ importdata ” function in Matlab for text files Hint: make sure the data is in an array format Remove extra rows or columns, this is common in the beginning and the end of the file Submit to BruinLearn with the following filename: Team#-Lab10.pdf 16 Yen-Chi Chang, Kevin Lai, Ting-Hao Liu, MAE162D/E UCLA