Introduction to VEX
Robotics
Using the VEX Robotics System
Archbishop McCarthy High School
Robotics Team 2013-2014
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
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 and microcontroller and
one for the controller (joystick)
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
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
• 2 wire motor connects directly to the Cortex ports 1 and 10 • 2-Wire Motor 269
• Requires a motor controller to connect to any 3 wire port • Motor Controller 29
• 3 wire ports produce a servo type RC signal output • Ports 2-9 on the VEX Cortex
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
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
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
• 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
• Connects directly to ports 2-9 on the VEX Cortex
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
VEX Cortex Controller
• More powerful than the PIC
• Advanced STMicroelectronics ARM
Cortex-M3 microprocessor
• Programmable with EasyC V4
• VEXnet wireless technology
• Ethernet communications protocol
802.11 b/g
• USB Adapter Keys
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
VEXnet Joystick
•Joystick communicates with Cortex controller via
wireless 802-11g
•Two X/Y joysticks plus 12 programmable buttons
•Ports on the back are:
- Partner – phone cord to another Joystick shares control (buddy system)
- Program – programming cable from PC USB port
- Competition port
•On/Off power switch
Back-side view
Top view
802.11 Adapter
Cortex M3 VEXnet Controller
10 motor/servo ports
12 Digital I/O ports
8 Analog ports Two UART (data) ports
One 12C (sensor) port
Backup power port
(9V battery) Rx 2 Rx1 7.2 V battery port
On/Off Switch
802.11 Adapter
• 2 built-in speed
controllers
• 2 external speed
controllers
Cortex Controller Wiring Plan
Black, - Gnd
Red, +
White, Control/Signal
Two Wire
Black –
Red +
Black, - Gnd
Red, +5
White, control/signal
- Gnd
+ 5 V
Rx (clock for 12C
Tx (Data for 12C
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
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
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
• 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
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
write into the microcontroller
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
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
Screenshot of
easyC V4 startup
window
Opens IFI/Intelitek
Loader window
Function Block Window Drag and drop these into the
programming window
Block Programming
Window Shows your code in a graphic block
diagram format
“C” Code Window Shows code in text
format
Mapping Your Robot • This is the full
range of speed control for both motors and servo’s
• 127 = full ccw (servo) or full speed reverse (motor)
• -127 = full cw (servo) or full speed forward (motor)
• 0 = null (servo) or off (motor)