# Magnetic Switch (am-5746)

#### Overview <a href="#overview" id="overview"></a>

The Magnetic Switch is a compact Hall effect sensor designed to reliably detect the presence of a magnet in robotics applications. It’s an ideal solution for teams looking for a durable, repeatable “trigger” sensor that isn’t affected by lighting conditions, dust, or most game element variability.  Whether you’re confirming a mechanism position, detecting a latch state, or verifying a part is in place, the Magnetic Switch gives teams a clean and dependable digital-style sensor signal—perfect for match play.​

***

#### When to use this sensor <a href="#when-to-use-this-sensor" id="when-to-use-this-sensor"></a>

* Detecting mechanism end-of-travel (limit switch replacement).
* Confirming position reached (elevator levels, arm angles, turret home, etc.).
* Detecting latch / lock / gate state using a magnet on the moving piece.
* Verifying game piece presence when a magnet can be embedded in a carrier or pusher.
* Creating reliable “home” signals for zeroing and auto routines.

***

#### Typical integrations <a href="#typical-integrations" id="typical-integrations"></a>

* Mount on an elevator to detect the bottom/home position for auto-zeroing.
* Use on an arm pivot to detect a stowed or scoring position.
* Place on a turret to detect a home index for absolute reference.
* Install on a latch mechanism to confirm locked/unlocked state.
* Add to an intake/indexer gate to confirm a door/flap position without contact wear.

***

#### Best-practice tips <a href="#best-practice-tips" id="best-practice-tips"></a>

* Attach a small magnet to the moving part (arm, elevator carriage, latch, etc.).
* Mount the sensor rigidly to the robot frame or mechanism structure.
* Adjust spacing so the magnet passes close enough to trigger consistently, even with vibration.
* Use the sensor state to trigger actions like stopping motion, indexing, or locking a subsystem.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.andymark.com/ftc-electronics/i2c-sensors/magnetic-switch-am-5746.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
