Using the vex robotics system
1 / 50

Introduction to Robotics - PowerPoint PPT Presentation

  • Uploaded on

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.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Introduction to Robotics' - imala

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Using the vex robotics system

Using the VEX Robotics system

Introduction to Robotics

What is a robot
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

General description
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.

Our definition
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.

Types of control
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


  • 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


  • 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

Dc motor
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

Vex motor
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

Motor specs
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


  • 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

More servo s
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⁰)

Vex servo
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

Servo specs
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

Bits and bytes
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


  • 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)

  • Vex pic controller
    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.

    Pic controller specs
    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

    Vex cortex controller
    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

    Cortex controller specs
    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


    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

    More gear info
    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

    Gear calculations
    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


    Structural system
    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.

    Additional info
    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


    • 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

    Lets build
    Lets Build!

    • Start with the 2005 VEX Inventors Guide


    • 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!

    Sequence and details
    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


    • A rubric will be used to assess student performance


    • 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


    • 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

    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

    Easyc v4
    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

    Opens IFI/Intelitek Loader window

    Screenshot of easyC V4 startup window

    “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

    Lets program
    Lets Program!

    • These are some of the basics

    • You are now ready to practice

    • Download the programming guide:

      • 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

    Program example
    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

    More practice
    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

    Sensing the environment
    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

    Program loops
    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

    Types of loops
    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


    • 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)

    More programming
    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!