2.3.2.A ConnectingVEXtoROBOTC PPT

advertisement
Connect VEX and ROBOTC
Electrical Engineer Responsibilities
Automation and Robotics VEX
© 2011 Project Lead The Way, Inc.
Electrical Engineer
Responsibilities:
1. Keep batteries charged.
2. Work with Mechanical Engineer to attach the
battery, motors, and sensors to the model and
the Cortex.
3. Work with the Computer Engineer to complete
Motor and Sensor Setup.
4. Complete the Motor and Sensor Schematic on
Automation Through Programming Summary.
Cortex
The VEX® Cortex microcontroller
coordinates the flow of information
and power on the robot.
All electronic system components
must interface the microcontroller.
The microcontroller is the brain of
every VEX® robot.
Power
Keep batteries charged
• Every robot needs a power source to operate.
• A 7.2V NiCd rechargeable battery will be used.
• Attach a battery strap to your model.
Power
Keep batteries charged
• When your team is ready to test, obtain a
battery from your teacher.
• Attach the battery to the model using the strap.
• Plug into the Cortex.
Power
Keep batteries charged
• At the end of class, use the VEX® charger to
prepare the battery for the next class.
• Only charge batteries using the safe mode.
Motors
Attach Motors to the model and Cortex
• Motors transform electrical energy into
mechanical energy, which creates rotary motion.
Motors
Two methods to connect 2-wire motor to Cortex
• Motor ports 1 and 10
• Motor port 2-9 using Motor Controller 29
Motor Ports
2-Wire 269 Controller 29
2-Wire 393
Motors
• Connect one end of the VEX Motor Controller to
the 2-wire Motor. Carefully align the black and
red wires.
• Use the supplied wire ties to secure both ends.
Include excess wire to prevent the 2-wire Motor
and Motor Controller wires from separating.
Claw
• Notice the motor used to open and close the
claw.
• How many motors are needed for this project?
Sensors
Attach Sensors to the model and Cortex
Bumper Switch
Potentiometer
Limit Switch
Line Tracker
Bumper Switch Sensor
Signal: Digital
Sensor Values: 1 = pressed, 0 = released
Description: The bumper sensor is a physical
switch. It tells the robot whether the bumper
on the front of the sensor is being pushed
in.
Type: SPST switch (“Single Pole, Single
Throw”) configured for Normally Open
behavior
Signal Behavior:
Limit Switch Sensor
Signal: Digital
Sensor Values: 1 = pressed, 0 = released
Description: The limit switch sensor is a
physical switch indicating whether the arm
is pushed.
Type: SPDT microswitch, configured for SPST
Normally Open behavior.
Signal Behavior:
Line Tracker
Signal: Analog
Sensor Values: Range from 0-4095
Description: A line follower uses an
infrared light sensor and an
infrared LED. It illuminates a
surface with infrared light, and then
the sensor senses the reflected
radiation. The intensity determines
the surface reflectivity. Light
colored surfaces reflect more light
than dark surfaces. The sensor
detects a dark line on a pale
surface, or a pale line on a dark
surface.
Line Tracker
A line follower is an analog sensor,
meaning that its output covers a range of
values (in this case, from zero to five volts)
rather than being only high (five volts)
or low (zero volts), as is the case for a
digital sensor.
You can use the line trackers to
help your robot navigate along a
marked path. A typical application
uses three line follower sensors,
such that the middle sensor is
over the line your robot is
following.
Line Tracker
Use the line trackers to find
the boundary between two
high-contrast surfaces.
The optimal range for the
line tracker to read a value
is ¼ in.
In this elevator model, the
line tracker sensor is used
to determine if the elevator
is at the correct floor.
Paper – ¼ in from sensor
Line Tracker
Potentiometer
Signal: Analog
Sensor Values: Range from 0-4095
Description: The Potentiometer is used to measure the
angular position of the axle or shaft passed through
its center. The center of the sensor can rotate roughly
265 degrees and outputs values ranging from 0-4095
to the VEX® Microcontroller.
Mounted Potentiometer
CAUTION!
When mounting the potentiometer on the
robot, be sure that the range of motion of the
rotating shaft does not exceed that of the
sensor. Failure to do so may result in
damage to your robot and the Potentiometer.
ROBOTC - Programming
Work with the Computer Engineer to complete
Motor and Sensor Setup
Configure and name each motor and sensor connected to
the robot.
Motor Setup
Type a name to describe
the motor location.
Remember Ports 1 and
10 can be used for 2 –
wire motors. You can
also use a Motor
Controller 29 to plug into
ports 2-9.
Check Reversed if you
want the motor to turn in
the opposite direction.
Analog Sensor Setup
Type a name to describe
the sensor.
Choose the type of
sensor – the only analog
sensors for Gateway are
Line Follower and
Potentiometer.
Digital Sensor Setup
Type a name to
describe the digital
sensor location or
purpose. Both the
limit and bumper
switches are Touch
Type.
LEDs can be plugged
in to Digital Ports 112. The type is VEX®
LED.
Motor and Sensor Schematic
Complete the Motor and Sensor Schematic on
Automation Through Programming Summary
This information should match
the motor and sensors setup
done in ROBOTC.
Resources
Carnegie Mellon Robotics Academy (2011). VEX Cortex
Video Trainer. Retrieved from
http://www.education.rec.ri.cmu.edu/products/teaching_r
obotc_cortex/index.html
Download