1 / 50

Introduction to Robotics

Using the VEX Robotics system. Introduction to Robotics. What is a Robot?. A machine capable of carrying out a complex series of actions automatically, esp. one programmable by a computer. A robot is a mechanical contraption which can perform tasks on its own, or with guidance.

imala
Download Presentation

Introduction to Robotics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using the VEX Robotics system Introduction to Robotics

  2. What is a Robot? • A machine capable of carrying out a complex series of actions automatically, esp. one programmable by a computer. • A robot is a mechanical contraption which can perform tasks on its own, or with guidance. • In practice a robot is usually an electromechanical machine which is shown what to do by computer and electronic programming

  3. General Description There is no consensus on which machines qualify as robots but there is general agreement among experts, and the public, that robots tend to do some or all of the following: • move around • operate a mechanical limb • sense and manipulate their environment • and exhibit intelligent behavior • especially behavior which mimics humans or other animals.

  4. Our Definition For us, a robot will have 3 features: • a mechanical device that can move around and manipulate its environment • uses a microcontroller • requires a computer program to operate The robots we build may not be technically considered true robots, primarily because they will generally be controlled by us.

  5. Types Of Control • Remote Control • Wireless using some type of joystick • Uses radio frequencies to communicate • Autonomous • Performs without human guidance • A computer program tells it what to do • Has sensors to respond to its environment • Tethered • Remote but wired control

  6. Power • Our primary power source will be a battery • Portable • Heavy • Steady DC voltage • Needs to be recharged or replaced • May need multiple batteries with different voltages • One for propulsion (motors), one for the controller (joystick), one for the microcontroller

  7. Movement • Wheels and pulleys use DC motors • A DC motor continuously rotates (360⁰) • Speed is controlled by the amount of DC voltage • Direction is controlled by polarity of DC voltage • Arms and grippers can use servo’s • A servo goes to a position and holds there • Typically minus 90 degrees to plus ninety degrees • Position is controlled by an electronic signal

  8. DC Motor • Voltage amount given by pulse width modulation • Longer “on” time means higher voltage • Higher voltage equals higher speed • Direction of rotation controlled by polarity

  9. VEX Motor • 2 wire motor connects directly to the Cortex ports 1 and 10 • 2-Wire Motor 269, #276-2181, $12.99 • Requires a motor controller to connect to any 3 wire port • Motor Controller 29, #276-2193, $9.99 • 3 wire ports produce a servo type RC signal output • Ports 1-8 on the VEX PIC • Ports 2-9 on the VEX Cortex

  10. Motor Specs • Free Speed: 100 rpm • Stall Torque: 8.6 in-lbs • Stall Current: 2.6A • Free Current: 0.18A • All motor specifications are at 7.2 volts • Custom designed to connect to the VEX structural system • Square drive shaft • 2 screw connections • Note that screw connections are 6-32, not the more common 8-32

  11. Servo • A servo is a motor connected to a built-in electronic control unit • The control unit coverts the input signal to a position • The input signal is a form of pulse width modulation

  12. More Servo’s • Pulses are always 20 ms apart • 50 pulses per second • Pulse width varies between 1 and 2 ms • 18-19 ms of “dead time” • A DC motor getting this signal would spin very slowly, if at all • The pulse width determines the servo position • 1 ms = full ccw (usually - 90⁰) • 1.5 ms = middle (or null) position • 2 ms = full cw (usually + 90⁰)

  13. VEX Servo • 3 wire servo connection • Orange wire is +5 VDC power • ALWAYS the middle wire • Black wire is ground (0 VDC) • White wire is PWM signal • #276-2162, $19.99 • Connects directly to ports 1-8 on the VEX PIC or ports 2-9 on the VEX Cortex

  14. Servo Specs • Rotation: 100 degrees • Stall Torque: 6.5 in-lbs • Voltage: 4.4 - 9.1 Volts • Motor life will be reduced operating outside this range • Current Draw: 20mA to 1.5 A per Servo • 2 screw connections • Square drive shaft • Requires a clutch • so gears don’t strip

  15. Bits and Bytes • Computers only talk in binary numbers, which are digital signals (on or off) • Motors and servo’s use analog signals • A microcontroller can create the analog signal, but it must use a digital to analog converter • An 8 bit binary number is usually used to determine or generate the analog pulse

  16. Binary • The decimal values for the 8 bit binary number have a range from 0 – 255 • Decimal 0 = 00000000 • Decimal 255 = 11111111 • Decimal 128 = 10000000 • This is the full range of speed control for both motors and servo’s • 0 = full ccw (servo) or full speed reverse (motor) • 255 = full cw (servo) or full speed forward (motor) • 128 = null (servo) or off (motor)

  17. VEX PIC Controller • The “brains” of the robot • #276-2170, $149.99 • All electronic system components must connect to the controller • The Microcontroller contains the robot's program • Processes all signals • From human operators • From onboard sensor systems • Manages all power on the robot • Directly controls the motors.

  18. PIC Controller Specs • Wireless communication • 75 MHz receiver and transmitter • (8) Motor and/or servo ports • 3 wire connections • Provides higher current than I/O ports • (16) multipurpose input/output ports for sensors • (6) Interrupt I/O • (1) Serial Port • For use with the VEX Programming Kit • Programmable with easyC V2, ROBOTC, or MPLAB

  19. VEX Cortex Controller • More powerful than the PIC • Advanced STMicroelectronics ARM Cortex-M3 microprocessor • #276-2194, $249.99 • Programmable with EasyC V4 • VEXnet wireless technology • Ethernet communications protocol 802.11 b/g • USB Adapter Keys

  20. Cortex Controller Specs • Built-in VEXnet Technology • Wireless driving, wireless debugging, and wireless program downloading • (8) standard 3-wire Motor or Servo ports • (2) high current 2-wire Motor ports • (8) high-res Analog Inputs, (12) fast Digital I/Os • All can be used as interrupts • Support for two 75 MHz transmitters and receivers • Rx1 and Rx2 Ports • I2C Smart Sensor Port • Will connect to multiple new smart sensors in the future

  21. Gears Gears are used for several things: • To increase the speed of rotation • To increase the torque, or the rotating force applied to a load Gears trade one for the other • If you use gears to increase speed, torque will decrease • If you use gears to increase torque, speed will decrease

  22. More Gear Info • Gears use teeth to transmit torque • Teeth must be the same size, even on different size gears • The number of teeth varies for different size gears • A smaller gear has fewer teeth • A larger gear has more teeth • A big gear driving a small gear increases speed • A small gear driving a big gear increases torque

  23. Gear calculations • The ratio of the number of gear teeth equals the ratio of the torque { Assume gear one (g1) driving gear two (g2) } = • The ratio of gear teeth equals the inverse ratio of the speed =

  24. Structural System • The structural subsystem of the robot is responsible for physical support. • Holds everything in place • The durable “skeleton” of the robot to which all the other subsystems are attached. • The Structure and Motion sub-systems are tightly integrated to form the chassis of the robot.

  25. Additional Info • 2 types of screw • 6-32 and 8-32 • Keps nuts • Square drive shaft • Bearing flat • Spacers and friction reducers • Metal sized by number of holes 5 X 15 1 X 25

  26. Tools • Allen wrench (also called an L-wrench) • 2 sizes: ” and ” • Open ended wrench • Screwdrivers • Flat head and Phillips • Needle nose pliers and diagonal cutters • Crescent wrench • Vice • Dremel tool to cut and smooth metal

  27. Lets Build! • Start with the 2005 VEX Inventors Guide • http://content.vexrobotics.com/docs/inventors-guide/main/vex-inventers-guide-9-27-06.pdf • Download this to a computer or flash drive • Build the Squarebot following the instructions starting on page 2-6 • pg. 19 (of 246) in the pdf • As you build, make sure you read carefully: there may be some test questions!

  28. Sequence and Details • Go completely through section 2 of the VEX Inventors guide • 2-6 through 2-37 • 3-1 through 3-14 and 3-21 (suggested) • 4-8 • 7-1 through 7-8 • If using the PIC, section 6 • Adding sensors, section 5

  29. Grading • A rubric will be used to assess student performance

  30. Programming • To program the robot you need both software and hardware • The software is the computer program we use to write the program that goes into the VEX • The hardware has two pieces: • The VEX controller itself • The cable that connects the computer to the controller so you can download the program you writeinto the microcontroller

  31. Programming • The VEX Cortex is programmed with easyC V4 • easyC uses graphics based drag and drop programming • Includes a full C text editor for advanced programming • Download to the robot wirelessly over VEXnet or directly using USB

  32. VEX PIC • The VEX PIC is an older, less powerful microcontroller than the Cortex • Uses a Microchip microcontroller • PIC is an acronym that stands for Programmable Interface Controller • It could also mean Peripheral Interface Controller • Programmed with easyC V2 • Not compatible with easyC V4

  33. EasyC V4 • The programs you write are a form of user code called project files • A robot only does what the program tells it to do • Select “new project” to create a brand new program • Select “open project” to open an existing project • VEX includes a couple of programs built in to EasyC • The default code and the test code • These programs will set up or restore your robot to an “out of box” condition

  34. Opens IFI/Intelitek Loader window Screenshot of easyC V4 startup window

  35. Click here to set COM port

  36. “C” Code Window Shows code in text format Function Block Window Drag and drop these into the programming window Block Programming Window Shows your code in a graphic block diagram format

  37. Lets Program! • These are some of the basics • You are now ready to practice • Download the programming guide: http://content.vexrobotics.com/docs/inventors-guide/programming-guide.pdf • Copy to hard drive or flash drive • This guide is for the PIC. At this time, there is no equivalent guide for the Cortex • Programming is very similar

  38. Program Example • Programming practice starts on page 8-20 • If the software is already installed • To check the COM port see pages 8-11 and 8-12 • To download test code see pages 8-13 through 8-19 • The first user program starts on page 8-23 • Complete programs one and two • Your first objective: make the robot drive straight for 5 seconds

  39. More Practice • Before moving on to program 3, add a second objective: Drive completely around a table and stop at exactly the same place you began • You have to make the robot turn 4 times and go straight 4 times • Students do not need sensors for these objectives • Add sensors per section 5 in the inventors guide for programs 3 and above

  40. Sensing the Environment • Program 3 adds bumper sensors • Your robot is still autonomous • It only does what the program tells it to do • Your robot needs to move away from the obstacle • The use of sensors requires the use of program loops • The simplest sensor has only 2 conditions • A simple loop can respond to 2 conditions easily

  41. Program Loops • A program that runs the same section of code over and over • Necessary when waiting for an input while performing other tasks • Generating video while waiting for user input • Driving around until bumping into an object • Performing a particular task only when a specific condition is present • Most programs involve one or more loops

  42. Types of Loops • Infinite loops • Usually the main program loop • Can also be the result of programming error • Example: while • Counting loops • Performs a specified number of times • Example: for • Conditional loops • Performs a specific action as a result of a specific input • Example: if, else

  43. Variables • A variable must be defined before you can use it • During initialization, before the main program loop • Anytime you have a condition to evaluate you have data • Data requires a name and a memory location • Defining a variable does both of those things • Data size is both how big the number can be and the amount of memory used to store it • Char = 8 bits (0-255), int = 16 bits (0-65,535)

  44. More Programming • Complete programs 3 through 6 in the programming guide • Pages 8-32 through 8-49 • Demonstrate your working robot to the teacher after completion of each program • Track your progress in your lab notebook • Congratulations, you are now an official roboticist!

More Related