Top Banner
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function as a custom digital 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
8

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.

Jan 15, 2016

Download

Documents

Holly Pearson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

Touch Sensor

• This lesson will explain how to hook a standard micro switch into the Vex system to function as a custom digital 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. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

Materials Needed

• Basic components– Limit switch– 3-wire cable (12") OR two

single wires– 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. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

The Limit Switch as an Electrical Switch

• The Limit Switch either connects or disconnects two terminals electrically– The switch has 3 terminals,

but only uses two here– COM (sometimes marked

GND or ) establishes the electrical ground voltage

– The NO ("Normally Open") terminal is electrically disconnected from the COM terminal when the switch is open, and connected when the switch is closed

COMNO

Switch

COMNO

Switch

Page 4: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

Limit Switch as a Digital Sensor

• The voltage at the NO terminal can be used as a digital signal to determine whether the switch is closed or not– NO terminal voltage will

default to HIGH (+5V) if the switch is not closed

– Closing the switch changes the NO terminal voltage to LOW (0V = ground)

– HIGH is a digital 1,LOW is a digital 0

LOWHIGH

Switch

LOWLOW

Switch

Page 5: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

Solder Limit Switch Terminals

• Set LOW voltage:Black wire toCOM terminal

• Set output voltage: White wire toNO terminal

• NC terminal andRed wire are unused

Page 6: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

Crimp 3-Wire Connector

• 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– Red cable may be

omitted because it is not used

Page 7: Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

Plug In to Micro Controller

• Plug the crimped connector into the Micro Controller – Analog/Digital port

bank in an Digital Sensor Port

– Port 5 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. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.

Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc.

Load Online Code to Test

• Connect the micro controller to the PC and turn it on

• In easyC:– Build & Download menu– On-Line Window– Download On-Line Code

• Push the switch arm and watch “Digital Input 5” change