"Analogue" (or "Analog", if you prefer) Escape Room Puzzle (Patreon)
Content
Hi folks,
Due to popular request, this project is somewhat of a "back to basics", good old-fashioned, self-contained, Arduino-powered escape room puzzle, which doesn't require any fancy components or extra software. However, that's not to say you can't still make a great player experience using it!
This puzzle is all about analog inputs and outputs - smooth, continuous changing values, like sliders and dials, meters and gauges - and how you can use those to make a fun puzzle interaction. To be specific, I'm using 4 sliding linear potentiometers as inputs, and I have 4 ammeter gauges as outputs. The puzzle is simply to make the needle of all the outputs read in the middle of the scale.... sounds simple, yes? But what if there's some extra logic that means that there isn't a simple correlation between the inputs and outputs - rather, there's a set of rules, and what players need to work is work out what those rules are from trial and error (or from clues placed elsewhere in the room - your choice!)
From a tech point of view, this requires understanding the role of the Analog-To-Digital Convertor (ADC) to read analog inputs, and Pulse-Width Modulation (PWM) to write analog outputs. I've tried to go into quite a lot of detail about how these work, and some of the trickier parts about designing circuits that use analog components: such as the importance of good grounding, reliable connections, and sources of potential noise on signal lines. But please ask as always if there's anything I didn't explain!
Timings
00:00:00-00:00:13 Introduction
00:00:14-00:02:17 Puzzle Demonstration
00:02:18-00:04:40 Comparing Analog -vs- Digital signals
00:04:41-00:11:20 Retrieving Analog Input using "Ax" pins and the Arduino Analog-to-Digital Convertor (ADC)
00:11:21-00:18:49 Sending Analog Output using "~x" pins and Pulse Width Modulation (PWM)
00:18:50-00:23:20 Grounding, noise, and isolation of analog components
00:23:21-00:26:53 Wiring Diagram
00:26:54-00:51:40 Arduino Code
00:51:41-00:53:20 Wrap up
Components Used
4x 1mA Ammeter, ~£2 each from https://www.aliexpress.com/item/10000020296910.html
4x Slide Potentiometer, buy 5 for $12 from https://www.banggood.com/custlink/vGGdLOO1zU
Arduino UNO, $10 from https://amzn.to/2ZcuS82
4x LED ($0.01 each, from almost anywhere)
4x220 and 4x 4.7kohm resistors ($0.01 each, from almost anywhere)
5V 1-channel Relay Module, $2 from https://www.aliexpress.com/item/32905958885.html
Conductive Copper Strip, $5 for 3m from https://www.ebay.co.uk/itm/184340220340
I'll be putting up a separate post shortly containing the Patreons-only code listing and wiring diagram for download.