Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will...

9
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will explain how to hook a standard dial potentiometer into the Vex system to function as a custom analog sensor. Vex offers a limited selection of sensors that are optimized to work with the system. Don’t let this limit your creativity. Off-the-shelf sensors and electrical components can be adapted to work with the Vex system. Adapting off-the-shelf components is different in every case; you should take all the necessary precautions and be sure to understand the electrical behavior and requirements of each device before attempting to use it.
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    1

Transcript of Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will...

Page 1: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will explain how to hook a standard dial potentiometer into.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

CAN I MAKE MY OWN SENSOR 2

This lesson will explain how to hook a standard dial potentiometer into the Vex system to function as a custom analog sensor.

Vex offers a limited selection of sensors that are optimized to work with the system.

Don’t let this limit your creativity.

Off-the-shelf sensors and electrical components can be adapted to work with the Vex system.

Adapting off-the-shelf components is different in every case; you should take all the necessary precautions and be sure to understand the electrical behavior and requirements of each device before attempting to use it.

Page 2: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will explain how to hook a standard dial potentiometer into.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

CAN I MAKE MY OWN SENSOR 2

Basic components• Potentiometer• 3-wire cable (12")• Wire stripper

Soldering• Soldering pen• Solder• Vice

Crimping• Male Molex pins (3)• Molex connector (1)• Crimping tool

Page 3: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will explain how to hook a standard dial potentiometer into.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

CAN I MAKE MY OWN SENSOR 2

The potentiometer is a resistor with an adjustable resistance (via dial)

• The potentiometer has 3 terminals

• The two outside terminals define the maximum and minimum voltages that the potentiometer can read

• The voltage of the middle terminal will have a voltage that is determined by the position of the knob on top.

Minimum Voltage

Maximum Voltage

Voltage set by knob

Page 4: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will explain how to hook a standard dial potentiometer into.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

CAN I MAKE MY OWN SENSOR 2

The variable voltage on the middle terminal can act as the sensor output for the potentiometer "dial sensor"

• A low voltage will register a high numeric reading in ROBOTC in the Vex micro controller

• A high voltage will register a low numeric reading in ROBOTC

0V

+5V

Output voltage

Page 5: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will explain how to hook a standard dial potentiometer into.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

CAN I MAKE MY OWN SENSOR 2

Set min voltage:Black wire toFirst terminal

Set output voltage: White wire toMiddle terminal

Set max voltage:Red wire toThird terminal

Note: Picture is shown from rear so wire order appears reversed

Page 6: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will explain how to hook a standard dial potentiometer into.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

CAN I MAKE MY OWN SENSOR 2

This end of the cable will be plugged into the Micro Controller

Create a standard 3-pin Molex connector

Wire order must be Black-Red-White

Page 7: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will explain how to hook a standard dial potentiometer into.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

CAN I MAKE MY OWN SENSOR 2

Plug the crimped connector into the Micro Controller

• Analog/Digital port bank in an Analog Sensor Port

• Port 1 is set this way by default

• Black wire must go on the same side as black wire on regular Vex connectors

Page 8: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will explain how to hook a standard dial potentiometer into.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

CAN I MAKE MY OWN SENSOR 2

RE-DOWNLOAD FIRMWARE (IF NECESSARY)You may have to re-download the RobotC firmware if you have ever downloaded any programs or other firmware to the microcontroller. (If nothing has been downloaded to the microcontroller after downloading the ROBOTC firmware, you may skip this step.)

• Connect the programming module to both the PC and the microcontroller• Make sure the microcontroller is turned on• Open ROBOTC.• Select Robot/Download Firmware• Select VEX VM 0724.hex/Open (or later version of ROBOTC firmware).

Page 9: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. CAN I MAKE MY OWN SENSOR 2 This lesson will explain how to hook a standard dial potentiometer into.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

CAN I MAKE MY OWN SENSOR 2

Click Robot/Debugger.

A Devices window should appear. Under Sensors, next to in1/Raw Value, there should be a number between

0-1023.

Test the sensor.

• Observe the value for in 1

• Turn the dial on the potentiometer and

observe how the sensor value on

in1 changes