Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle...

27
Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next class: Closer look at programming and build & program robot with bumper (use of touch sensor)

Transcript of Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle...

Page 1: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Robotics

Actuators. Motors. Sensors. NXT-G logic.

Lab: MeasurementsHomework: Task moodle assignment! Mechanics readings. Prepare summary.

Postings. Next class: Closer look at programming and build & program robot with bumper (use of

touch sensor)

Page 2: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Recap

• Build: attention to detail.• Review construction: parts used for attaching,

stability.• Refine & experiment

– Challenge to do the exact job– My process: took 4-5 iterations. Added sound block.

Changed from rotations to degrees. • 360 degrees in a rotation (of the motor), not the wheel.

– NOTE: more power means faster, not more distance if you are specifying rotations or degrees

Page 3: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Inserted to be sure when turning move over

9 rotations too many

Gentle curve

Page 4: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Steering

• Steering can accept an input value: -100 to 100.

• When we get to variables, can set a variable with a number and use data wires to set exact steering

Page 5: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.
Page 6: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Joints

• Robots have joints (think of joints of the body) that connect links

• A robot joint [generally] provides 1 degree of freedom (d.o.f.)– [Note: a Carnegie Mellon robot travels around

on a ball: work of Ralph Hollis. More later or report in posting]

• Rotational versus linear motions

Page 7: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

IBM Box frame robot: 3 linear motors

3 rotational1 (jaw) linear gripper

Page 8: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Preview

• Kinematics– Each joint is set to specific position, where is

endpoint?• move my shoulder, move my elbow, move my wrist, raise my

finger, where is tip of finger?

• Inverse Kinematics– What to set each joint in order to have the endpoint at

a given point (orientation)• how much do I move each joint in order to have the tip of my

finger touch my nose?

Page 9: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Actuators

• One type of actuator is a motor: motors make the robot [a joint of the robot] move

• Many types of motors– Stepper motor allows for precise positioning– DC or AC Servo motor allows for feedback … for

precise positioning• “is it there yet?”

– Hydraulic or pneumatic pistons

• May or may not involve gears/gearingExtra credit: report on advantages/disadvantages

of specific type of motor, other types of actuator.

Page 10: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Sensors

• Machine (electro-mechanical) device that detects something about external world– Generates a signal back to the program

• Refer to – Programmable, sensory robots as robots that

• can be programmed• Programming can involve/use sensory input

Page 11: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Sensors

• Contact, touch, switch

• Proximity

• Light– Light level– Vision systems: BIG topic

• Sound– Sound signal (range)– Speech systems: BIG topic

Page 12: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Sensors (& joints)

• Locality of sensing

• Where is ‘the robot’ when the ultrasonic sensor (proximity) says <20 cm??

• In positioning and movement, need to provide clearance for ALL the robot + any payload.

Page 13: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Calibration

• Process to set (define) relationship between strength (size) of thing being measured and the measurement scale

• REQUIRED for most sensors

• May be required EACH TIME sensor is used (in specific environment)

• This will be the case for the light sensor

Page 14: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Strain gauge• Category of touch, but…• Detects some amount of force (strain, push

back)– Physical force deforms material that produces change

in resistance (electrical quantity). This electrical quantity is what is measured.

• Common in industrial robotics• The Lego touch sensor is NOT a strain gauge. It

is off or on– States are off, pressed, [just] released– Bump = pressed and released

• Good tutorial on www.societyofrobots.com

Page 15: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Logic

• Event driven programming in high[er] level language such as Flash ActionScript: specify event and handler and the system does everything else.– mixupbut.addEventListener(MouseEvent.CLICK, mixup);– var mytimer:Timer: new Timer(1000)

mytimer.addEventListener(TimerEvent.TIMER, moveball);

• In other places, need to specify testing explicitly. In NXT-G, need to put in wait blocks and other blocks, perhaps use switch blocks and loop blocks.

• NOTE: Flash & other languages generate the code that does the checking and re-checking…

Page 16: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

NXT-G wait until

• Next class will do move until bump sensor. Here Wait until certain NXT button pressed

• unlimited motors movewait until button pressedbrake motors block

Page 17: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Preview: NXT-G logic

• Logic block: takes 1 or 2 inputs and performs– AND, OR, XOR, NOT

• What do you do with result? – Input to looping block– Input to switch block– Input to …

Page 18: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

NXT-G

• Arithmetic blocks

• Comparison blocks

• Variables

• Input from sensors AND motors and calculations and (Bluetooth) messages

Page 19: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

NXT-G Looping

• Loop block: block can contain other blocks

• Looping forever, sensor, count, logic, time– System inserts the appropriate block

Page 20: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Preview: NXT-G switch

• Switch block can have sensor or value to control

• Think of this as IF/ELSE

Page 21: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Preview: NXT-G

• Parallel threads

• Set up two (or more) sequences of blocks.

• NXT-G generates coding.

• This may produce essentially the same as periodic checks along one thread.

Page 22: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

General comment

• Program may set up to check for sequence/set of events over and over– Duty cycle– Event loop

• Can give the program too much to do.

• Think of sentry doing guard duty, adding checkpoints.

Page 23: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Mechanics 101Very, very loose definitions

Torque used for defining the power of the motor. Torque = force * distance. Motor can apply that force at that distance.

Velocity is speed in a direction—a vector as opposed to a scalar quantity. Acceleration refers to changes in velocity. Robots need acceleration to start and to overcome gravity and friction. For wheels, velocity = circumference * rpm. Revolutions Per Minute depend on torque from motor AND friction from wheels against specific surface

Gears/gearing is to put the torque where you want it.

Work load of robot is the robot itself plus the payload (what it needs to carry)

Page 24: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Considerations for robots

• Want motor that is powerful enough to do the job – Do the job most of the time

• Not too powerful, because powerful generally means expensive and heavy

• Robot may need to carry itself + tooling + parts– Payload refers that to that which pays for the

job.

Page 25: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Lab: challenges

• Measurements: measure & record distance traveled and time taken– 180 degrees, 1 rotation, 5 rotations at power levels

25, 50, 75. – 1 second, 5 seconds [time taken should be close to

inputs]

Prepare neat tables to show.

• Navigate field with obstacles (fixed = static)– Go around obstacle (chair or stool). You decide route.

Time it. Prepare report to show.

Page 26: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

Suggestion

• You can use the wait until block with the NXT buttons. This gives you time to make the measurements

Page 27: Robotics Actuators. Motors. Sensors. NXT-G logic. Lab: Measurements Homework: Task moodle assignment! Mechanics readings. Prepare summary. Postings. Next.

HomeworkRead statics, dynamics and gear sections ofhttp://www.societyofrobots.com/mechanics_dynamics.shtmlOrRead about gears, torque, motors in Perdue book

(in Library)OrFind 'spec' data (torque, rpm, etc.) on Lego

Mindstorms motorWrite summary, including definition of terms,

to turn in next class!