Interruptores de proximidad: hardware

Nota

This section covers proximity switch hardware. For a guide to using proximity switches in software, see Entradas digitales - Software.

Una de las tareas de detección más comunes en un robot es detectar cuando un objeto (ya sea un mecanismo, una pieza de juego o un elemento de campo) se encuentra a una cierta distancia de un punto conocido del robot. Este tipo de detección se logra mediante un «interruptor de proximidad».

Operación del interruptor de proximidad

Los interruptores de proximidad son interruptores: operan un circuito entre un estado «abierto» (en el que no hay conectividad a través del circuito) y uno «cerrado» (en el que hay). Por lo tanto, los interruptores de proximidad generan una señal digital y, en consecuencia, casi siempre están conectados a los puertos digital input del roboRIO.

Los interruptores de proximidad pueden ser ya sea «abiertos normalmente», en el que al activar el interruptor se cierra el circuito, o «cerrados normalmente», en el que al activar el interruptor se abre el circuito. Algunos interruptores ofrecen ambos los AB y los CN circuito conectado al mismo interruptor. En la práctica, la diferencia efectiva entre un AB y los CN interruptor es el comportamiento del sistema en caso en que el cableado del interruptor falle, ya que un fallo en el cableado casi siempre provocará un circuito abierto. Los interruptores AB suelen ser «más seguros», ya que un fallo en el cableado hace que el sistema se comporte como si el interruptor estuviera presionado - como los interruptores se utilizan a menudo para evitar que un mecanismo se dañe a sí mismo, esto mitiga la posibilidad de que se dañe el mecanismo en el caso de un fallo de cableado.

Las entradas digitales en el roboRIO tienen resistencias pull-up que harán que la entrada sea alta (valor 1) cuando el interruptor está abierto, pero cuando el interruptor se cierra, el valor pasa a 0 ya que la entrada ahora está conectada a tierra.

Tipos de interruptores de proximidad

There are several types of proximity switches that are commonly used in FRC®:

Interruptor de Proximidad Mecánica («Interruptor de Límite»)

Un interruptor de límite normalmente abierto conectado a un canal del roboRIO DIO.

Mechanical proximity switches (more commonly known as «limit switches») are probably the most commonly used proximity switch in FRC, due to their simplicity, ease-of-use, and low cost. A limit switch is quite simply a switch attached to a mechanical arm, usually at the limits of travel. The switch is activated when an object pushes against the switch arm, actuating the switch.

Los interruptores de límite varían en tamaño, la geometría de del interruptor-brazo, y en la cantidad de “fuerza” requerida para activar el interruptor. Mientras los interruptores de límite son más baratos, la actuación mecánica es por lo regular menos confiable que las alternativas sin contacto. Sin embargo, también son extremadamente versátiles, tanto que pueden ser activadas por cualquier objeto físico capaz de mover el brazo del interruptor.

See this article for writing the software for Limit Switches.

Interruptor de Proximidad Magnética

A magnetic proximity switch hooked up to a DIO channel of the roboRIO.

Los interruptores de proximidad magnética son activados cuando un imán se acerca a un cierto rango del sensor. En resultado, son interruptores de no contacto - no requieren contacto con el objeto detectado.

There are two major types of magnetic proximity switches - reed switches and hall-effect sensors. In a reed switch, the magnetic field causes a pair of flexible metal contacts (the «reeds») to touch each other, closing the circuit. A hall-effect sensor, on the other hand, detects the induced voltage transversely across a current-carrying conductor. Hall-effect sensors are generally the cheaper and more reliable of the two. Pictured above is the Hall effect sensor from West Coast Products.

Los interruptores de proximidad magnética podrían ser unipolar,» «bipolar,» or «omnipolar.» Un interruptor unipolar se activa y desactiva dependiendo de la presencia del polo magnético otorgado (ya sea norte o sur, dependiendo del interruptor). Un interruptor bipolar se activa desde la proximidad de un solo polo y se desactiva con la proximidad del polo opuesto. Un interruptor omnipolar se activará con la presencia de cualquier polo y se desactiva cuando la presencia del imán desaparece.

Mientras los interruptores de proximidad magnética son más confiables que sus contra partes mecánicas, requieren al usuario para montar un imán en el objeto para ser detectado - así son principalmente usados para detectar la ubicación de un mecanismo.

Interruptores de Proximidad Inductiva

Example industrial inductive proximity switch.

Los interruptores de proximidad inductiva son activados cuando un conductor de cualquier tipo es dentro de un cierto rango del sensor. Como los interruptores de proximidad magnética, son interruptores de no contacto.

Los interruptores de proximidad inductiva son usados por algunos de los mismos propósitos que los switches de proximidad magnética. Su naturaleza más general (activándose en la presencia de cualquier conductor, en vez que solo un imán) puede ser una ayuda o un obstáculo, dependiendo de la naturaleza de la aplicación.

Interruptores de Proximidad Fotoeléctrica

Connecting a photoelectric proximity switch to a DIO port.

Photoelectric proximity switches are another type of no-contact proximity switch in widespread use in FRC. Photoelectric proximity switches contain a light source (usually an IR laser) and a photoelectric sensor that activates the switch when the detected light (which bounces off of the sensor target) exceeds a given threshold. One such sensor is the IR Obstacle Avoidance Module pictured above.

Since photoelectric proximity switches rely on measuring the amount of reflected light, they are often inconsistent in their triggering range between different materials - accordingly, most photoelectric sensors have an adjustable activation point (typically controlled by turning a screw somewhere on the sensor body). On the other hand, photoelectric sensors are also extremely versatile, as they can detect a greater variety of objects than the other types of no-contact switches.

Photoelectric sensors are also often used in a «beam break» configuration, in which the emitter is separate from the sensor. These typically activate when an object is interposed between the emitter and the sensor. Pictured below is a beam break sensor with an IR LED transmitter and IR receiver.

Connecting a beam break receiver and transmitter each to one DIO channel on the roboRIO.

Interruptores de Proximidad de Tiempo de Vuelo

VL53L0X time of flight sensor hooked up to the I2C port.

Time-of-flight Proximity Switches are newer to the market and are not commonly found in FRC. They use a concentrated light source, such as a small laser, and measure the time between the emission of light and when the receiver detects it. Using the speed of light, it can produce a very accurate distance measurement for a very small target area. Range on this type of sensor can range greatly, between 30mm to around 1000mm for the VL53L0X sensor pictured above. There are also longer range versions available. More information about time of flight sensors can be found in this article and more about the circuitry can be found in this article.