Archive for the ‘cortex’ tag

Now more than ever, robotics educators are faced with the important question of which kit they should purchase and use. This key question has been made even more intricate in the 2013-2014 school year due to the addition of the new robotics kits, VEX IQ kits. This article will help break down each VEX kit, their capabilities and target audiences, and allow you, the educator, to make an informed decision on which kit is best for your particular classroom.

The VEX IQ systemisthe brand-new robotics system from Innovation First International (IFI for short, makers of the VEX Robotics Design System). The VEX IQ can be used with any of the all-new hardware and sensors, including a unique plastic snap-fit structural system.

The base kits (either Sensor or Controller kits) are provided with over 650 structural components, 4 plug-and-play ‘smart motors’, at least 2 touch sensors (or more, depending on kit), and the VEX IQ microcontroller (more information on all available kits can be found here).

The IQ contains 12 smart ports that can be used to control either analog sensors, digital sensors, or servos/motors; the ports are non-typed and can be used to control any piece of VEX IQ compatible hardware that is plugged into it.

It also includes a micro-USB port for IQ-to-computer communication and a ‘tether’ port for direct connections to an VEX IQ Controller.

Debugging and programming information can be displayed on the backlit LCD information to increase ease-of-use in real time.

Wireless communication between the VEX IQ microcontroller and a VEX IQ controller is provided via a set of 900 MHz radio adapters.

The VEX IQ system will be fully legal in the new VEX IQ Challenge (designed specifically for the VEX IQ system), for students ages 8-14.

Recommended use: Middle School.

One of the mainstays of the educational robotics world is the VEX Cortex platform. Originally released in 2010 by IFI, the Cortex can be used with the VEX Robotics Design System’s hardware and sensors.

Includes over 300 metal structural parts, 4 powerful DC motors, the VEX Cortex microcontroller, and a wide variety of fasteners, gears, and other miscellaneous hardware.

Sensors include touch sensors, an ultrasonic sensor, integrated motor encoders, line following sensors, and a potentiometer; additional sensors are available outside of the base kits.

Wireless communication between a VEX Cortex and a VEXNet Joystick Controller is possible by using the 802.11b/g VEXNet USB Adapter Keys.

The VEX Cortex system can be used in the VEX Robotics Challenge (Middle, High School, and College divisions).

Recommended use: advanced Middle School, High School or College.

We understand that choosing a robotics kit is a tough decision. The number one factor in determining which kit is right for you is the students; depending on the skill level of the students, it may be better to challenge them with a more advanced kit (VEX Cortex) or they may prefer to learn with a beginner kit to get them started (VEX IQ.) No matter which kit you decide to use, though, you can rest easy knowing ROBOTC will fully support all of these platforms.

Do you get hungry? Do you enjoy eating food more than you enjoy making food? If you answered “Yes!” to both of those questions, you’ll be happy to know that the future engineers of America have you covered.

Students from two Project Lead the Way (PLTW) Schools have integrated the sensing and control capabilities of the VEX Cortex Robotics system with the advanced articulation capabilities of the LynxMotion Robotics system to create highly capable (and delicious) assembly lines.

The VEX Robotics technical support team has identified an issue that some competition teams are experiencing in which the Cortex Microcontroller is unable to resume VEXnet link after a Microcontroller reset.

To help eliminate this issue at the VEX Robotics World Championship we are releasing a special version of the VEX Firmware, specifically for World Championship teams (3.21_Worlds). This firmware version modifies the Cortex re-initialization to help the VEXnet link reconnect in the event of a reset (i.e. caused by VEXnet Key “jostling”, power interruption, battery brownout, or static).

We know that competition teams dislike updating firmware so close to an event, so we are publishing this update in the hopes that teams will have a chance to test it “at home” before coming to VEX Worlds. If you’re comfortable with the new version, we strongly urge you to use it at the World Championship to help prevent potential problems related to a Cortex reset.

This firmware only updates a “back end” relinking protocol and it does not affect anything related to robot performance — you don’t need to tweak your autonomous mode, or anything like that.

Visit the VEX Forum thread on this firmware release for more discussions and to post any questions or concerns.

We recommend that all competition teams update to ROBOTC 3.08 and use the 3.21 Worlds firmware. The firmware can be downloaded using the VEXnet Firmware Upgrade Utility, or ROBOTC using the following procedures:

ROBOTC 3.05 contains a number of enhancements that should be very exciting for VEX Cortex users. This is a free update for all ROBOTC for Cortex and PIC users (yes, even if you were using 2.3x)!

The ROBOTC 3.05 installer now includes the VEX Cortex and Prolific USB-to-Serial drivers. You no longer need to remember to download and install these separately.

We’ve heard your feedback! The new “Automatically Update VEX Cortex” option will detect if your Cortex is out-of-date, and automatically download the latest version of the Master CPU and ROBOTC Firmware files if needed. There’s no need to go through the long process of manually downloading each firmware, or put the VEX Cortex in “bootload” mode! The same functionality has been implemented for the VEXnet Joysticks as well.

Also included is a new version of the Master CPU Firmware from VEX Robotics. This version restores the functionality from the 2.x firmware, which allowed programs to run even when VEXnet was turned on (but not used).

New Standard Models! Standard models for the popular Robotics Academy robots and PLTW Training Testbeds have been added, and can be used to automatically configure all of the motors and sensors, hassle free.

One cool new product for the VEX Robotics system are the VEX Mecanum Wheels.

Where traditional wheels only allow your robot to move forward, backward, and turn, mecanum wheels allow your robot to move in all four directions – forward, backward, left and right, while still maintaining the ability to turn. Your robot is able to accomplish this thanks to their unique design. Each wheel (which must be connected to its own, independent motor) contains rollers offset by 45 degrees from the wheel and the robot’s drive train. Instead of the motors introducing force in just the forward-backward directions, each wheel introduces force at 45 degree angles (45, 135, 225, 315). The force vectors of the different wheels can then be combined and/or cancelled out to create motion in the X and Y axis.

Here’s video of the Mecanum wheels in action (the code running on the robot can be found later in the post):

To give the wheels a test run, we built the robot below. Notice that if you’re looking down on the robot, the spokes or rollers of the wheels should point inward to create an X. If you’re looking at the bottom of the robot, they should point out to create a baseball diamond. There are two sets of two wheels - all four are not identical.

[scrollGallery id=4]

When you decide to incorporate your own mecanum drive system, be sure to follow the X/diamond rule or your robot will not behave as expected. Also know that equal weight distribution and consistent build quality are far more important when working with a mecanum drive. Remember that the robot moves based on adding and/or cancelling out the different force vectors produced by the four individual motors – if one or two motors can’t match the others the entire motion of the robot will be thrown off.

A fairly simple program can be written to test the mecanum drive system. This program will use the left joystick on the remote control to move the robot forward-backward and right-left. The X axis on the right joystick will control the rotation of the robot.

The program above, however, isn’t perfect. If the joysticks don’t center perfectly at zero, or if the driver unintentionally moves the joysticks along multiple axis, the movement of the robot will be thrown off. With a few variables and a little bit of logic, we can ignore these erroneous values and provide smoother control of the robot:

The VEX Robotics System includes a growing, powerful set of official sensors. That said, the electronics world is overflowing with other types of cool and useful sensors. The great news is, both the VEX PIC and the VEX Cortex microcontrollers are extremely versatile and can be used with many of these sensors. Both the VEX PIC and VEX Cortex can be used with Analog Sensors that operate between 0 and 5 volts (+/- .5 volts), and have Power, Ground, and Signal lines.

The Sharp IR Rangefinder allows your robot to determine distance from the nearest object, much like the VEX Ultrasonic Rangefinder. Unlike the VEX Ultrasonic Rangefinder, which uses sound waves to measure distance, the Sharp IR Rangefinder uses infrared light. On one side of the sensor an infrared LED shines a beam of light, which is reflected back by the closest object, and detected by the receiver on the other side of the sensor. The sensor then uses a method called triangulation to determine how far away the object was.

The basis for triangulation is that objects at different distances will reflect the infrared beam back to the receiver at different angles. The varying angles produce different voltage levels in the sensor, and in turn sensor values that can be used to calculate distance. See below:

The Sharp IR Rangefinder provides very reliable distance values ranging from 10 to 80 centimeters away. One big advantage with using the IR Rangefinder is that it’s not affected by soft for angled objects that cause the VEX Ultrasonic Rangefinder to fail.

One challenge with using the sensor is that the raw values provided do not directly correlate to useful distance values, and they’re also non-linear. This means that we must perform a calculation on the raw sensor data first. Documentation for the sensor tells us that we can calculate the distance using the following formula:

Voltage = 1 / ( Distance + 0.42 )

Which, when rearranged gives us:

Distance = (1/Voltage) – 0.42

One additional challenge is that we can’t directly access the voltage returned by the sensor in our program. What we can access is the sensor value, which is proportional to the voltage – we’ll just have to take a conversion factor into account.

Below is a sample program written for the Sharp IR Rangefinder. It contains the function “IRValue()” which will perform the necessary calculation and return the useful distance data, in centimeters. Note that the “sensorPotentiometer” type was used, since there is no “IR Rangefinder” sensor type in ROBOTC, and the Potentiometer type will return the full, unmodified analog data (unlike other sensor types like the Gyro).

Our Sharp IR Rangefinder was previously configured wired for an older microcontroller called the Handy Board. Like the VEX Cortex and PIC, it had wires for Power, Ground, and Signal, so we were able to use simple jumper wires to adapt it for the Cortex.

Front of the robot with Sharp IR Rangefinder:

Top of the robot, with connection from Sharp IR Rangefinder to VEX Cortex Analog Port 5:

And finally, here’s a video of the code from above running on the robot:

For more information on interpreting and using the data provided by the Sharp IR Rangefinder, check out this tutorial.

The new VEX Yaw Rate Gyro is one of the more sophisticated sensors in the VEX Robotics System – but it’s also one of the most useful and powerful. Among other things, the Gyro allows your robot to make very precise, consistent turns.

Other sensors, like the Shaft Encoders, allow you to control your robot’s turns… but indirectly. The Shaft Encoders can measure the rotation of the axles (or shafts) of your robot’s drive train. By monitoring how much the axles spin, you can also monitor and control how much your robot moves forward or turns. (As a side note, some great tutorials on using the Shaft Encoders to do just that can be found in the Movement section of the VEX Cortex Video Trainer.)

The Gyro, on the other hand, actually measures the rotation of your robot. Factors such as wheel slippage and varying surface friction that cause inconsistencies with Shaft Encoder-based turns are far less problematic with the Gyro; your robot will turn until it reaches the target you set – no matter how much the wheels slip or how long it takes!

There are a number of different ways that electronic Gyros work. The VEX Gyro includes a sensing element kept in continuous oscillation which reacts when angular rate is applied, based on the “Coriolis effect”. The Coriolis effect is a deflection of moving objects when they are viewed in a rotating reference frame. In a reference frame with clockwise rotation, the deflection is to the left of the motion of the object; in one with counter-clockwise rotation, the deflection is to the right. This effect is caused by the rotation of the Earth and the inertia of the mass experiencing the effect.

Thus, the Gyro is able to detect whether the robot is turning clockwise or counter-clockwise and provide different sensor values based on how much it’s been rotated. For a more thorough explanation of the Coriolis effect, visit this Wikipedia article. For more technical information on the on the internals of the VEX Gyro, you can check out its datasheet.For this tutorial, we mounted the VEX Gyro on our Swervebot robot model and connected it to Analog port 8 on the Cortex.

ROBOTC includes a number of sample programs for the Gyro. You can open the sample program below by going to File > Open Sample Program > Gyroscope > “Gyro Based Turns – Basic.c”.

A few additional notes about the Gyro and the program:

Typically all sensors are configured in ROBOTC using the Motors and Sensors Setup window. This can still be done with the Gyro, but lines 23-28 do so manually. The Gyro is an extremely sensitive sensor – it’s readings are affected by heat, fluctuations in voltage, and how long the sensor has been in use. These factors cause the sensor to accumulate an error, or drift, over time. By setting Analog Port 8 to “sensorNone” on line 24, all of the drift is wiped out from previous runs. The sensor is then reconfigured as a “sensorGyro” on line 27.

After the Gyro is configured on line 27, it’s very important that your robot is kept completely still for at least 1.1 seconds. During this time, ROBOTC and the Gyro perform a calibration process. The 2-second wait on line 28 is more than enough time for this process to occur.

There is a small amount of variance between each Gyro. ROBOTC has default values used for scaling the readings from the VEX Gyro into useful SensorValues, but you may need to make a slight adjustment for your sensor. The “SensorScale[]” command (commented out on line 31) allows you to do just that. If you find that your robot is turning too far or too little, un-comment line 31 and adjust the “260” value as needed.

As the Gyro is turned, the values it returns are in tenths of degrees, positive and negative. Thus, a SensorValue of 3600 equals 360 degrees, or one full rotation. When the sensor is mounted horizontally, counter-clockwise movements will return values from 0 to -3600; clockwise movements will return values from 0 to 3600. Once the gyro completes one full revolution, the sensor value will “roll-over” to 0 by default (for example: …3597, 3598, 3599, 3600, 0, 1, 2, 3,…). To change the “roll-over” point, un-comment line 33 and change the value of “SensorFullCount” from 3600 to the desired value (7200, 18000, ect)

For a much more thorough explanation of the program, check out the tutorial video we produced, here.

Remote control cars are great for having fun. They can be driven off-road, taken off jumps, and raced among other things. VEX robots are great for learning. They can be used to teach programming, math, problem solving, and other engineering skills. What do you get if you put them together??

Well, I can tell you. You get a rugged 4WD truck that is still tons of fun to drive around outside, but can also be used as a teaching tool.

Follow this link for more photos: http://s1081.photobucket.com/albums/j353/comeste10/VEX%20Rover%20Extras/

I started off with a MINDS-i Lunar Rover kit which is driven by a 7.2V DC motor and steered with a standard hobby servo. I removed the solar panel from the Rover and in its place put a VEX Cortex microcontroller and an LCD screen. On each side, I attached a VEX flashlight from the VEXplorer kit and I mounted an ultrasonic sensor to the front. It just so happens that VEX bolts and nuts fit quite easily into the beams of the MINDS-i rover.

I did all the programming in RobotC. See bottom of the page to view my RobotC code.

In order to control the stock motor and servo with the Cortex, I had to make a few modifications. I soldered the two wires to a 2-pin head which I then connected to the Cortex with a VEX motor controller.

For the servo, I used three single male-to-male jumper cables.

The video demonstrates the rover in autonomous mode where it makes use of the ultrasonic sensor to avoid bumping into walls. Remote control is also demonstrated using the VEXnet controller over Wi-Fi.

This is just a small sampling of the possibilities with this combination type of platform. Don’t let my initial direction limit you. It would be great to see some new combination robots. Get out there and start building!

Thanks to some really cool work by Xander, I2C sensors for the NXT can now be used on the Cortex as well (with a little bit of effort). As we’ve covered in some of our previous posts, ROBOTC and the VEX Cortex unlock a ton of cool robotic applications – controlling pneumatics, controlling high torque and high speed motors through relays, outputting to the LCD screen, ect. Being able to use the repository of I2C sensors available for the NXT on the Cortex unlocks many, many more.

To demonstrate this, we’ve chosen the Mindsensors NXTCam. With the NXTCam, you’re able to connect it to a computer over USB and “teach” it to track up to 8 different colors. Once it’s hooked up to your robot, it returns data related to the colors it’s tracking – size, x and y positions, ect. This make it ideal for tracking a colored object, distinguishing between multiple different colors, and even advanced line tracking (more on that in a future post).

In this video, we’ve trained the NXTCam to track the color red. ROBOTC code uses the data from the camera to center the robot on the red ball and drive up to it until it’s within a certain distance.

Pneumatic Actuators translate the force of compressed air into fast and powerful motion. In the VEX Robotics System, all pneumatic actuators create linear (in-and-out) motion, although rotary actuators do exist. The compressed air that powers the actuators is stored in a reservoir tank; differences in air pressure between the actuators and tank cause the actuators to move in and out.

The flow of air between the tank and the actuators (directly related to the differences in air pressure) is controlled by a small switch, called an electromagnetic solenoid, which connects to the VEX PIC or Cortex using a standard 3-pin wire. It’s a common misconception that, since the solenoid enables motion, its 3-pin wire should plug into one of the MOTOR ports on the microcontroller. Actually, a solenoid is what’s considered a “Digital Output”, and should be plugged into one of the DIGITAL ports on the Cortex, or ANALOG/DIGITAL ports on the PIC.

To configure the solenoid in ROBOTC, go to the Motors and Sensors Setup menu, and select “Digital Out” as the sensor type.

Then, in ROBOTC, when you want to activate the pneumatic actuator controlled by the solenoid, you set its value equal to “1”. To deactivate it, set its value equal to “0”. In the sample code below, the remote control buttons are used to activate and deactivate the pneumatic actuator.