robotics and mechatronics workshop › workshop › presentation.pdf · robotics course material...

39
Pranav A. Bhounsule website: https://pab47.github.io/ email: [email protected] Robotics and mechatronics workshop 3 days workshop for NFU students at UTSA

Upload: others

Post on 04-Jul-2020

14 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Pranav A. Bhounsule website: https://pab47.github.io/ email: [email protected]

Robotics and mechatronics workshop3 days workshop for NFU students at UTSA

Page 2: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Robotics Overviewcourse outcomes

• Learn MATLAB (as a tool to simulation and animation)

• Modeling a manipulator

• Modeling a differential drive car

• Final project (create a video game)

Page 3: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Final robotics project

Page 4: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Robotics course material content(I emailed you a folder)

• robotics_workshop.pdf

• main document with overall plan;

• 4 parts: each part has an exercise to be done after workshop ends

• MATLAB-basics.pdf, MATLAB-scripts.pdf, MATLAB-animations.pdf

• pdf files of MATLAB reference material (Part 1)

• robotics_notes.pdf

• some theory for manipulators and car modeling

• Folder “matlab” that contains all programs needed

• This presentation (will be provided at the end)

Page 5: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Rough scheduleMonday

• 9:30 - 10:30 Part 1: MATLAB intro and basics

• 10:45 - 12:00 Part 1: MATLAB matlab scripts

• 12 - 1 Lunch break

• 1 - 2:15 Part 1: MATLAB animation

• 2:30 - 3:30 Part 2: Manipulator

• 3:45 - 5:00 Part 3: Differential drive car

Page 6: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Rough scheduleTuesday

• 9:30 - 10:30 Part 4: Video game

• 10:45 - 12:00 Part 1: Arduino basics

• 12 - 1 Lunch break

• 1 - 2:15 Part 1: Arduino basics (contd)

• 2:30 - 3:30 Part 2: Servo and sensor

• 3:45 - 5:00 Part 3: Motor

Page 7: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Rough scheduleWednesday

• 9: 30 - 10:30 Part 3: Motors (contd.)

• 10:45 - 12:00 Part 4: Car consruction

• 12 - 1 Lunch break

• 1 - 2:15 Part 4: Car construction

• 2:30 - 3:30 Part 4: Car programming

• 3:45 - 5:00 Part 4: Car programming

Page 8: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 1: MATLAB

Lets work together

1. Basic usage of MATLAB

2. Scripts in MATLAB

3. Making animation (this is fun)

Page 9: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 1Exercise: Animate a face

Page 10: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: ManipulatorCoordinate frames

xc

yc!

!

xcyc

""

!

!

X 1

Y1

X

Y0

C

0

Page 11: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: ManipulatorTwo-link manipulator

!1

!2

l!

O1

l"

O2

!1

P

X0

Y0

X 1

Y1

X2

Y 2

Location of elbow O_2

Location of tip P

Page 12: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: ManipulatorTwo-link manipulator

!1

!2

l!

O1

l"

O2

!1

P

X0

Y0

X 1

Y1

X2

Y 2

Forward kinematics

Given theta_1 and theta_2 find:x_p and y_p

see manipulator_forward.m

Page 13: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: ManipulatorTwo-link manipulator

!1

!2

l!

O1

l"

O2

!1

P

X0

Y0

X 1

Y1

X2

Y 2

Inverse kinematics

Given x_p and y_p find:theta_1 and theta_2

see manipulator_inverse.m

- much harder- many/no solutions

Page 14: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: ManipulatorTwo-link manipulator

!1

!2

l!

O1

l"

O2

!1

P

X0

Y0

X 1

Y1

X2

Y 2

Again Inverse kinematicsGiven x_p(i) and y_p(i) points circumference, find theta_1(i) and theta_2(i)

see manipulator_inverse_circle.m

Get the manipulator to draw a circle

Page 15: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: Inverse kinematics example

Page 16: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: Inverse kinematics example

Page 17: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: ManipulatorExercise: Draw the cardoid (see eqn in notes)

!1

!2

l!

O1

l"

O2

!1

P

X0

Y0

X 1

Y1

X2

Y 2

Page 18: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 3: Mobile robotDifferential drive car

X 1Y1

b

X0

Y0

b

(xc yc ),!!

(xc yc),""

(a) position at start (b) position at some point of time

r

!

!

l!

r

Page 19: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 3: Mobile robotDifferential drive car

X 1Y1

b

X0

Y0

b

(xc yc ),!!

(xc yc),""

(a) position at start (b) position at some point of time

r

!

!

l!

r

kinematics of x_c and y_c

Page 20: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 3: Mobile robotDifferential drive car

X 1Y1

b

X0

Y0

b

(xc yc ),!!

(xc yc),""

(a) position at start (b) position at some point of time

r

!

!

l!

r

kinematics of rotation theta

Page 21: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 3: Mobile robotDifferential drive car

X 1Y1

b

X0

Y0

b

(xc yc ),!!

(xc yc),""

(a) position at start (b) position at some point of time

r

!

!

l!

r

All equations

Simplified

controlled variables

Page 22: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 3: Mobile robotIntegration

controlled variables

see diff_drive_main.msee euler_integration.m

Page 23: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 3: Mobile robotExercise: Can you control the robot to write your initials?

Page 24: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 4: Projectsee car_game.m

Main loop

Page 25: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Rough scheduleTuesday

• 9: 30 - 10:30 Part 4: Video game

• 10:45 - 12:00 Part 1: Arduino basics

• 12 - 1 Lunch break

• 1 - 2:15 Part 1: Arduino basics (contd)

• 2:30 - 3:30 Part 2: Servo and sensor

• 3:45 - 5:00 Part 3: Motor

Page 26: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Mechatronics Overviewcourse outcomes

• Learn Arduino (as a tool to create a mechatronics system)

• Basic electronics: resistor, breadboard, push-button, light-emitting diode.

• Basics C programming: variables, functions, loops, conditionals

• Using Analog in/out and digital in/out

• Sensors: Ultrasonic sensor

• Actuators: DC motors and servos

• Final project (create a different drive car)

Page 27: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Final mechatronics project

Page 28: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Mechatronics course material content(I emailed you a folder)

• mechatronics_workshop.pdf

• main document with overall plan;

• 4 parts: each part has an exercise to be done after workshop ends

• Arduino basics, servo-sensor, motor, car-project pdf files

• Folder “arduino” that contains all programs needed

• This presentation (will be provided at the end)

Page 29: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Mechatronics system

Sensor

Actuators

Microcontroller

Software

Ultrasonic

DC and servo motor

Arduino UNO

Arduino IDE

Page 30: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 1: Arduino basics

Check 1. Arduino-basics.pdf

Page 31: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: Servo and sensorUltrasonic sensor

https://randomnerdtutorials.com/complete-guide-for-ultrasonic-sensor-hc-sr04/

Page 32: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: Servo and sensorServo motor: DC motor + potentiometer (position sensor)

https://lastminuteengineers.com/servo-motor-arduino-tutorial/

more details see DC motor notes

Page 33: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 2: Servo and sensor

Check 2.Arduino-servo-sensor

Page 34: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 3: DC motor

DC motorH-bridge or motor controller

Page 35: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 3: DC motorDirection control

Motor spin direction controller by closing appropriate switches

Page 36: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 3: DC motorSpeed control

Motor speed controlled by time the switches are closed

V_in

0.2 V_in

0.4 V_in

0.8 V_in

V_in

Page 37: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 3: DC motor

Check 3.Arduino-motor

Page 38: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Rough scheduleWednesday

• 9:30 - 10:30 Part 3: Motors (contd.)

• 10:45 - 12:00 Part 4: Car construction

• 12 - 1 Lunch break

• 1 - 2:15 Part 4: Car construction

• 2:30 - 3:30 Part 4: Car programming

• 3:45 - 5:00 Part 4: Car programming

Page 39: Robotics and mechatronics workshop › workshop › presentation.pdf · Robotics course material content (I emailed you a folder) • robotics_workshop.pdf • main document with

Part 4: Car construction and programming

Check 4.Arduino-car-project