The REV Robotics Magnetic Limit Switch (REV-31-1462) is a three-sided digital hall effect switch. The three internal hall effect elements (one on top, two on the sides) are connected in parallel so if any one of them is triggered the sensor will report as triggered.
Hall effect sensors detect the presence of a magnetic fields. The REV Magnetic Limit Switch is an omnipolar momentary switch; it will trigger when there is sufficient field strength of either magnetic pole detected.
The REV Magnetic Limit Switch comes with two mountable magnets. Because this sensor does not require a contact interface, the magnet can also be soft mounted almost anywhere with just tape or glue.
The strength of the magnetic field determines the maximum distance the magnet can be from the sensor and still be detected. Alternate (stronger or weaker) magnets can easily be used to change the trigger range of this sensor.
When designing a system using the REV Magnetic Limit Switch it is important to consider in the impact of hysteresis. When the magnetic field approaches the Magnetic Limit Switch, after the field strength increases enough that it crosses the rising trigger point (Bop) the sensor triggers. As the magnet is then moved away from the sensor, the magnetic field strength falls but the sensor remains in the triggered state until the field falls below the falling trigger level (BRP). The difference between these two points is the hysteresis.
For a simple system like stopping an arm at the end of range of motion, the hysteresis might not play much of a role, but for creating one or more stop points on a linear elevator, this may factor into the software design.
The Magnetic Limit Switch can be configured as "REV Touch Sensor" or as "Digital Device" as shown in the image below.
The code blocks below gives a basic example of how to use the Magnetic Limit Switch to limit the motion range of a motor using if/else logic. If the magnet is within range of the sensor then the motor stops. Otherwise the motor is allowed to move. When triggered by proximity to a magnet, the sensor is considered pressed.
onsidered pressed.
The code assumes the sensor has been named "Limit" and the motor has been named "Motor" in configuration.
In this example, the Touch Sensor is configured on port 2. It is touched on briefly in the that the Magnetic Limit Switch is capable of sending a signal to the Control Hub through the n+1 and n communication channels. The channel the sensor communicates through is decided by which port it is configured on. In this case, the Magnetic Limit Switch communicates through the n channel.
Parameter
Value and Units
Sensor Type
Digital, Active-low
Signal
n & n+1
Magnetic Polarity
Omnipolar (both north & south)
â€
Using the included magnet.
Part Number
Description
Qty
REV Magnetic Limit Switch
1
-
Magnet with mounting tabs
2
JST PH 4-pin Sensor Cable - 30cm
1
Parameter
Min
Typ
Max
Units
3.3
-
5.0
V
Top Trigger Distance â€
-
10
-
mm
Side Trigger Distance â€
-
5
-
mm
Hysteresis
-
5
-
mm
Included Magnet Strength
-
4300
-
G
Operating Voltage Range ( )