This appendix provides a brief overview of the programming and sensor options available in the VEX Robotics Design System.
The VEX Cortex Microcontroller comes preprogrammed with a default routine which allows users to get their robots up and running as quickly as possible. To utilize the VEX Robotics Design System without Autonomous Programming or robot sensors, there is no extra software required. The system works fine "out of the box" for general robot operation. Minor changes to robot functionality (e.g. joystick scaling, motor reversals) can still be made via the transmitter menus or by placing jumpers in certain ports of the digital I/O. For more advanced programming options, the microcontroller can be fully user programmed using one of the available programming options. More information on these options can be found here: http://www.vexrobotics.com/products/programming
These options allow the user to create fully autonomous robots, customize the use of the VEXnet Joystick, integrate any compatible sensor to the robot to allow for advanced functionality such as closed loop feedback control, and much more!
There are a myriad of sensor options available in the VEX Robotics Design System. For a full list of all sensors available, please visit: http://www.vexrobotics.com/products/accessories/sensors
Below is a summary of some of the sensors available in the VEX Robotics Design System.
VEX Limit Switch
VEX Limit Switches send a signal to the Microcontroller when they are triggered. These switches are great for signaling when a robot arm has reached the top or bottom of its motion, or generally as a “trigger” in a variety of applications. When the limit switch is not being pushed in, the sensor maintains a digital HIGH signal on its sensor port. This High signal is coming from the Microcontroller. When an external force (like a collision or being pressed up against a wall) pushes the switch in, it changes its signal to a digital LOW until the limit switch is released. An unpressed switch is indistinguishable from an open port; it’s like it’s not even there!
VEX Bumper Switch
VEX Bumper Switches have ruggedized bumpers that allow the switch to be triggered by large impacts without sustaining damage. These switches are useful for detecting contact and having the robot respond in some way to the contact, for example, changing direction. This switch behaves exactly like a VEX Limit Switch, the only difference being the shape of the trigger.
VEX Potentiometers can determine both position and direction of rotation of a shaft. This sensor is used to get an analog measurement of angular position. This measurement can help to understand the position of robot arms or other mechanisms. Incorporating the VEX potentiometer kit onto a robot can make it easier to perform autonomous behaviors. A robot equipped with a potentiometer becomes aware of the position angles and motion of different components, thus making it more aware of its actions. A potentiometer is an electrical device used to measure angular position. The user can therefore adjust the degree to which the potentiometer opposes electric current through it, simply by turning a shaft that is attached to the center of the potentiometer. As the resistance of the potentiometer changes, so does the voltage, which then causes the potentiometer to act as a variable voltage divider. This varying voltage can be measured by the Cortex Microcontroller and is directly proportional to the angular position of the shaft connected to the center of the potentiometer. This obtains an analog measurement of an angular position.
VEX Ultrasonic Range Finder
The VEX Ultrasonic Range Finder sensor enables a robot to detect obstacles in its path by utilizing the propagation of high-frequency sound waves. The sensor emits a 40kHz sound wave, which bounces off a reflective surface and returns to the sensor. Then, using the amount of time it takes for the wave to return to the sensor, the distance to the object can be computed. Ultrasonic range finders can be used to determine distances to objects. It can be also used as a tool to determine if any objects are in the robot’s path at all. To increase the sensing range, the sensor can be mounted to a servo or motor to allow it to rotate. The VEX Ultrasonic Range finder has a range of 1.5” to 115”.
VEX Line Trackers
VEX Line Trackers allow robots to be programmed to follow a black line over a white surface. A line tracker mostly consists of an infrared light sensor and an infrared LED. It functions by illuminating a surface with infrared light; the sensor then picks up the reflected infrared radiation and, based on its intensity, determines the reflectivity of the surface in question. Lightly colored surfaces will reflect more light than dark surfaces; therefore, lightly colored surfaces will appear brighter to the sensor. This allows the sensor to detect a dark line on a pale surface, or a pale line on a dark surface. The line tracker enables a robot to autonomously navigate a line-marked path. By drawing a line in front of a robot outfitted with a line tracker, one can dictate the robot’s path by showing it where to go without using any human inputs.
VEX Line Sensor
The VEX Light Sensor uses a photocell that allows a robot to detect and react to light. Robots can be programmed to have a specific reaction if a certain amount of light is detected. The light sensor uses a cadmium sulfosolenide (CdS) photoconductive photocell. The CdS photocell is a photo resistor, meaning that its resistance value changes based on the amount of incident light. Design a simple tracker that follows the beam of a flashlight, or use a light sensor to help a robot avoid shadows. Use colored filters on the light sensors to allow the robot to track various colors.
VEX Optical Shaft Encoders
The VEX Optical Shaft Encoder is used to measure both relative position of and rotational distance traveled by a shaft. It works by shining light onto the edge of a disk outfitted with evenly spaced slits around the circumference. As the disk spins, light passes through the slits and is blocked by the opaque spaces between the slits. The encoder then detects how many slits have had light shine through, and in which direction the disk is spinning. The optical shaft encoder can be used to track distance traveled, direction of motion, or position of any rotary component, such as a gripper arm or a wheel.
VEX Integrated Encoder Modules
The VEX Integrated Encoder Modules product replaces the plastic cap on the back of a 2-Wire Motor 269 or 393 with a quadrature encoder. Install this product and connect it to a Cortex Microcontroller via the I2C port to receive direct feedback from the motor. This encoder provides information on how fast the motor is going, how far it has traveled, and what direction it is moving. These sensors can be used similarly to the VEX Optical Shaft Encoders, while taking up much less space.
VEX Yaw Rate Gyroscopic Sensor
The VEX Yaw Rate Gyroscopic Sensor measures angular rotation of a VEX robot, allowing for the tracking of the orientation or heading of the robot. This single axis sensor can detect rotations of up to 1000 degrees per second. Gyroscopes can be used to ensure that a robot drives in a straight line autonomously and even to provide course corrections for a human driver. When paired with encoders, the robot can be programmed to always know its exact position relative to its starting position.
VEX Analog Accelerometer
The VEX Analog Accelerometer measures accelerations on three axes simultaneously. By measuring the acceleration of the robot, one can calculate the velocity of the robot, and more importantly the distance this robot has travelled. Accelerometers are also great for detecting collisions and determining if the robot is stopped or moving.