I briefly mentioned this in another topic, but I think it is deserving of its of topic. First, let me start off by saying upfront that what I am going to propose here is 100% total overkills for the task at hand. But I am an electrical engineer, and we often like to find overly complex technical solutions to simple problems. So here goes.
Problem: Our governor is asking for businesses that eventually open back up to show they are doing something about social distancing. Boy thats tough in an arcade. The solutions are as follows:
1. Just tell people to stay 6 feet apart - honestly this probably works just fine for the most part.
2. Put signs on every other game that says - DON'T PLAY, and then cycle signs between hours, days, something.
3. Turn off half the machines so you are sure people are distancing.
4. Get a whiffle ball bat and beat on people when they aren't 6 feet apart.
5. Give up and move out half the machines - to where in my instance would be the gigantic question.
6. Engineer the most ridiculously complex way of maintaining social distancing.
1. Has to be cheap per machine. A $100 per machine solution is a non-starter. I set $20 max per machine.
2. Should upgrade our current "throw circuit breakers all on" when we open up the arcade, which is ridiculous but it is what it is.
3. Should be "Cool", as in when in a party and having a conversation and you tell them what you did, their response should be "cool" OR a ubiquitous eye roll.
Solution - high level:
I want to have a small sensor on each machine that detects when a person is standing in front of it. When nothing is being played, all displays on these sensors show green check marks indicating machine is open. Once someone occupies a machine, the others surrounding it (basically on either side) should have their sensor light up with a red X. Now if someone starts trying to play a red X machine then it will give an audible warning to please not do so. If someone persists, the machine will be automatically turned off, only to be turned back on after the machine next to it is no longer being played.
Solution -low level
1. IOT (Internet of Things) - 1 per machine
2. Smart Plug
3. Backend controlling it all.
Implementation - low level:
For IOT I selected the M5StickC https://m5stack.com/products/stick-c Its based on an ESP32 microprocessor which pretty much is the guts behind all the smartplug or smart anything for that matter. $10 I went with this because it has a screen, it has a case, it easily interfaces with the TOF sensor, and it has WIFI built in.
I added to it a Time of Flight (TOF) sensor https://learn.adafruit.com/adafruit-vl53l0x-micro-lidar-distance-sensor-breakout/overview $2 (on AliExpress). In a nutshell this is the same thing use for FaceID on Iphones, but really its a laser based distance sensor and it good out to about 2 meters. I am using this to detect when someone is standing in front of a machine playing.
Speaker for M5StickC Its an unnecessary splurge, but heck $2.50 is fine https://m5stack.com/products/m5stickc-speaker-hat
USB-C cable - on Ebay about $1 - want it permanently powered on.
USB 4 port charger - to plug four of these into a single port on our power switches $2.50
2. Smart Plug:
Using generic smart plugs on Ebay $5 each Not really counting this in cost as we have needed a better way to control our machines individually and this beats paying an electrician. Its just a bonus. amazon.com link »
So I learned a thing or two about smart plugs that are kinda nasty. Almost all are proprietary and rely on an internet connection to a cloud server to work. Don't like that. But you can break them by rewriting the firmware. We will use Tasmota for the purpose of freeing them. Its a bit gnarly in jail breaking them, but doable. After that they can run on a local server you setup - no more internet
3. Backend controlling it all:
We will have a 2.4Ghz TP-Link TL-WR940N running the network - it will not be connected to the internet, just local. I may run the sensors in a mesh network rather than all individually connected to the same access point.
We will run an instance of Home Assistant https://www.home-assistant.io/
Home Assistant will run on a Raspberry Pi. The basic way it works (like any smart appliance application but without a cloud server), is that you set up all the devices (smart plugs, sensors) and configure them inside of home assistant. And then you set up a messaging system MQTT. The sensors message about when someone is in front of a machine, and also whether its ticked off that someone shouldn't be there, and the surrounding sensors read those messages and change their playable state if needed from green check mark to red X. They change it back to green check mark when a game next to them opens back up. And if they get ticked off they broadcast a ticked off message and the smart plug associated with that sensor shuts the game down.
That's it in a nut shell.
A nice side benefit is that we are going to finally have use statistics we never had before on each machine. And we will finally have the ability to bring up banks of games without just throwing circuit breakers. And if a game needs to go off, we don't have to find the damn switch which is oftentimes in a very inconvenient place.
Follow me as I get this up and running (or not). It will be an interesting journey.
After I come up with the basic implementation, I am happy to pass on the entire setup to someone else should they decide to implement. I know its alot of technical mumbo-jumbo if you aren't into this stuff, but the goal would be to make an entirely preconfigured system, plug and play, if someone else wants to do it so that I save all the hard steps. You really just want a bunch of numbered sensors and numbered smart plug and them already setup in home automation ready to go. That's actually doable I think and I want to help