Magnetic sensors are one of the most commonly-used inputs in escape room tech puzzles. Whether it's returning a dragon's egg to a nest, placing a missing book back in the correct position on a shelf, or moving a chesspiece to a certain square on a chessboard, a simple magnet embedded in almost any portable prop component can be detected by a microprocessor such as an Arduino to trigger a response - activating a relay, opening a maglock, or firing a smoke machine. Like many other ER sensors, if done well, this simple technology can create "magic" as far as the player is concerned!
There are two common types of magnetic sensors - Hall sensors, and reed switches, but there are many varieties with different properties and characteristics, so which should you choose? In this video, I'll show you some of the important properties of a component datasheet to look out for, and give a practical demonstration of a variety of common readily-available magnetic sensors - the Honeywell SS49E, Allegro A3144, A1324, and A1389 - comparing their output and sensitivity to different magnets.
Based on an analysis of those findings, I'll then show you how to write the Arduino code for an all-purpose magnetic prop controller which automatically calibrates to its environment on startup, has adjustable sensitivity, and fires separate triggers to respond to either a north pole or south pole of a magnet.
Timings
---
00:00 - 01:23 Introduction
01:24 - 04:20 Selecting a magnet
04:21 - 04:45 Selecting a magnetic sensor
04:46 - 05:47 -Reed switches
05:48 - 13:42 -Hall sensors (SS49E, A1324, A1389, A3144)
13:43 - 14:32 Practical sensor comparison
14:33 - 18:49 -Wiring
18:50 - 19:51 -Arduino code
19:52 - 24:15 -Live demo
24:16 - 25:55 -Analysis of findings
25:56 - 29:27 Creating a magnetically-activated ER prop controller
29:28 - 41:11 -Arduino code
41:12 - 43:12 -Live demo
43:13 - 44:08 Wrapup
For more resources on this, or any of my other escape room puzzle projects, please check out my Patreon at https://www.patreon.com/posts/26349661