(Topic ID: 268376)

The fully-automated social-distancing arcade

By pookycade

1 year ago


Topic Heartbeat

Topic Stats

  • 12 posts
  • 2 Pinsiders participating
  • Latest reply 7 months ago by pookycade
  • Topic is favorited by 3 Pinsiders

You

Linked Games

No games have been linked to this topic.

    Topic Gallery

    View topic image gallery

    E480AD67-209D-4A3E-94FF-77DCEE1951E7 (resized).jpeg
    14856001-E640-4609-8BD9-914C38423E78 (resized).jpeg
    435C9271-30F4-46DF-A09B-718BE89FBCF4 (resized).jpeg
    0856D63A-B172-41EF-8235-B37F1504D444 (resized).jpeg
    0D3CBC34-0F39-4B4A-9A06-3544A9B44887 (resized).jpeg
    AC9E5D0A-9958-4BCF-94CF-E03E31208B71 (resized).jpeg
    88337DEA-2455-4005-8860-1EDF7EEFBB50 (resized).jpeg
    09F52A93-3289-4550-8712-9C99AFCDE272 (resized).png
    E5EC603E-1FB3-4C01-A24F-48C45FE41759 (resized).jpeg
    F920B233-BA41-48EC-8CC5-C28B0A884D1C (resized).jpeg

    #1 1 year ago

    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.

    OR

    6. Engineer the most ridiculously complex way of maintaining social distancing.

    Parameters:
    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:

    1. IOT:

    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

    https://templates.blakadder.com/gosund_WP2.html

    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

    #2 1 year ago

    This is cool. Will be watching and providing feedback if I can. If you need any brackets or mounts so they can be 3D printed let me know, I can provide some CAD design services.

    #3 1 year ago

    Now for the poor man's (me) version of this, which will be our gen 1 prior to the very elaborate gen 2.

    No wireless needed at all, no complex schemes for control, in fact cost per machine for this installation is less than $5

    For each row of games you need ONE of the following:

    M5StickC ESP32 Mini IoT Development Board $11
    TCA9548A I2C IIC Multiplexer Breakout Board 8 Channel Expansion Board for Arduino $1
    4 wire cabling bulk 100 ft $20 (probably need less than 100 feet per bank of games, guessing more like 25 ft)

    For each game you need one of each (we will call this the GAME MODULE):

    VL53L0X Time-of-Flight Flight Distance Measurement Sensor Breakout VL53L0X ToF Laser Range Finder for Arduino $2
    PCF8574 PCF8574T IO Expansion Board I/O Expander I2C $1
    OLED module $1
    Alarm buzzer $0.50

    The OLED displays whether game is open to play or not (PLAY / DON'T PLAY message)
    The Alarm buzzer runs off of the PCF8574 and if turned on emits a somewhat annoying alarm buzz when a person is told not to play and insists on playing
    The VL53 tells us if the person is in front of the game of not.

    These can all go in a less than 50 cent project box to stick on each machine (the GAME MODULE).

    Up to 8 of these GAME MODULES can go to one development board (so one ESP32 covers 8 machines in a row)

    You install the 8 GAME MODULES, one GAME MODULE each game - just a stick pad will do it.

    The VL53 sensor in each GAME MODULE knows when someone is in front of a game and displays DON'T PLAY on the OLED of the GAME MODULEs for each game next to the game being played.

    If someone insists on playing a game displaying DON'T PLAY anyway, it does a 10 second countdown on the display and then the alarm goes off. Alarm stays on until they walk away and back off.

    I will post the code this weekend and write up more instructions for you to follow. If anyone is interested in this again, I am happy to construct and send out. Just let me know.

    #4 1 year ago

    Brief update. I decided to go a bit more fancy on these. Added for $3 extra:

    1) RFID - did this so we can allow someone to swipe an RFID tag they will given for games on either side of the one they are playing so family can play next to them without setting off alarms.

    2) Optoisolator - did this so that if desired the controller can be wired directly to the coin credit buttons (up to 4) to coin up a game (those easy coin up buttons I have been using - which is just a switch - were $10 each which was highway robbery anyway), and also monitor/block the player 1 and player 2 start buttons if so desired.

    When finished with first prototype in a week I will post all instructions and all so others can build these. I have expanded beyond the concept of a social distancing device and included the tracking ability with RFID and direct ability to coin up a machine. This is used in most redemption arcades, and those units are damn expensive. This will let anyone have this capability for $10 per machine without breaking the bank.

    1 week later
    #5 1 year ago

    Well here it is gen 1 in all its glory. Really what this is is just a newer and cheaper tech version of the operators swipe card system you find at many redemption arcades. It has the following features:

    13Mhz RFID reader - the swipe card without the swipe needed.

    OLED display -cheap, bright, does the job

    ESP 8266 Node MCU - the brain of the thing and pretty much any home automation anything.

    Laser proximity sensor - it knows when you are playing

    Switch connects - 5 of them to allow automated triggering of coin switch or prevent activation of player start button. All electrically isolated from my box.

    Piezo speaker - good for swipe tones and alarms if you don’t social distance.

    Size wise that is a clear box that holds playing cards.

    The way the whole thing runs is it uses Home Assistant running on a raspberry Pi. All games are also using smart plugs that also connect to Home Assistant. Used standard Tuya smart plugs and then modded the firmware (Transmota) so they don’t connect over internet back to China (which all smart plugs have to do right now to even work —-> bad).

    All the smart plugs and my game controllers talk to one another using MQTT. They all connect to a single dedicated wireless router.

    Total cost per machine for each completed box is $7.50. Smart plugs are $5 each. Pretty cheap solution for having full control over everything.

    Controllers know who their neighbors are. If one game is playing the surrounding ones lock out. However, since families may want to play together, waving the same RFID card in front of the adjacent games will override the lockout.

    For 1 week of work pretty happy how it has turned out. Key things left to do are make 100 of these and to do so I will fav a PCB that can take these pieces and make all the required connections between each component. It’s not awful to hand wire, but it will get tedious.

    E5EC603E-1FB3-4C01-A24F-48C45FE41759 (resized).jpegF920B233-BA41-48EC-8CC5-C28B0A884D1C (resized).jpeg
    #6 1 year ago

    Wow, i would agree not bad for a weeks' work.

    #7 1 year ago

    Pcb designed and ordered. Oddly I chose to use Fritzing for layout which is a terrible choice for PCB design. However since it’s centered around Arduino all the stock parts I used to Lego block this together were already dimensioned and modeled. Anyway should be here end of the week, will validate and then make 100 more.

    If anyone is else is interested in having one of these I can share details or actually make it for you.

    09F52A93-3289-4550-8712-9C99AFCDE272 (resized).png
    1 week later
    #8 1 year ago

    Onward with my vanity thread, here is the fully fabricated and working device. It was chosen see thru so that I didn’t have to make a cutout for the display or the laser distance detection (purple piece above display). RFID reader is blue thing in middle. ESP8266 tucked underneath. On top are standard power connectors that go to the coin mech to trigger game credit. This one has 4 as I am putting it on my TMNT.

    I kinda like it’s raw tech, led type appearance.

    It runs a modified version of Tasmota, which did all the hard work for me.

    Still a bit more work on the software that runs this but it’s coming together nicely. And yes it will as planned block starting play on surrounding machines unless the family uses the same RFID token to start the game.

    Will post a video in next day or two of the whole social distanceizer running. Idea to design to implementation -> 6 weeks

    88337DEA-2455-4005-8860-1EDF7EEFBB50 (resized).jpeg
    5 months later
    #9 11 months ago

    Ok, this card swipe project has been ongoing, if only in the background. Here is the latest and greatest now integrated with Tasmota and Home Assistant. It is almost ready to be deployed at my arcade. Right now have 200 smart plugs distributed over 2 routers each running on separate Home Assistant installations on Intel i5 NUCs. Works surprisingly well

    This is my vanity thread and my vanity project, so its really FYI. Happy to share with others if you find it in anyway helpsful. I am just glad to have seen it thru from beginning to where it is. Don't have nearly enough time to work on this these days, but I put in a few hours over the last week and got a fair amount done to get it deployable. Now just have to convince my son to do some board soldering to get these constructed

    From the YouTube description:

    This is an early rendition of a card swipe system (think Dave and Busters but on a budget) with social distancing capabilities. It uses an ESP8266 and Tasmota with Home Assistant integration. Parts are straightforward: 1) ESP8266 Node MCU 2) VL53L0x ranging sensor to determine is someone is trying to play the game 3) PCF8574 port system with optocouplers to trigger Coin switches on games and also read input from game buttons if needed 4) PN532 RFID NFC reader 5) OLED SSD1306 6) Passive Buzzer 7) Bi-color LED. The system uses Tasmota RULES to monitor MQTT of surrounding machines and whether they are being played or not. If an adjacent machines is being played and someone tries to card swipe, it will lock them out. Once the adjacent machine is unoccupied it will allow game play on the machine this cardswipe is connected to. Can be used in free play or store credits on the RFID card. Home assistant monitors activity on each card swipe, and also keeps a record of total games played on each machine per day and all time. Its clearly hobbyist grade, but it does the job, and best yet it only costs $15 a box. What is nice is that it is extensible given all the scripting capabilities inside Tasmota and also Home Assistant. So it can be as elaborate or unelaborate as desired.

    #10 11 months ago

    And I give you a fully working social distancing card swipe system. Finally. Not having free time sucks, but at least I got it done and can now finally add the last piece of COVID mitigation at the arcade

    My original conception was to actually turn off the game if you violated the rules, but that was just too draconian. I think this more gentle system that stops you from using the card swipe to start a game if a machine next to it is being played is "good enough"

    As I mentioned before I will freely share code and board design and parts lists and all if you want to implement yourself. I make no guarantees of course.

    About $12 per card swipe, which I think its pretty damn reasonable, and the RFID cards are pennies each.

    This system is set up for freeplay, but one can place credits on each card and then have each game deduct them as games are being played.

    3 months later
    #11 7 months ago

    Ok 3 month update. System is done finally. We broke it into two parts, one external for people detection, display, attract and card scanning, the other internal for grabbing power, monitoring button pushes and triggering coin mechs. That’s a little more secure too. No drilling into machines required to mount it securely. It’s all controlled via a custom Tasmota install We will have a central web server that all data gets sent to. Pretty cool system and maintains a cheap install cost.

    0856D63A-B172-41EF-8235-B37F1504D444 (resized).jpeg0D3CBC34-0F39-4B4A-9A06-3544A9B44887 (resized).jpeg435C9271-30F4-46DF-A09B-718BE89FBCF4 (resized).jpegAC9E5D0A-9958-4BCF-94CF-E03E31208B71 (resized).jpeg
    #12 7 months ago

    We will also be supplementing it with these: 1) mountable camera with live stream also Tasmota based and 2) controllable smart plug so one can remotely turn on and off to control for screen burn or reset the game if it crashes. This lets one in the arcade stream games being played real time, and remotely it lets you see if the game is still operational or not. It’s been designed as low cost as we can possibly make it. I really like the modular approach with central command and control. You will instantly know if your game is working, if it’s being played consistently, and any other metric you might like.

    14856001-E640-4609-8BD9-914C38423E78 (resized).jpegE480AD67-209D-4A3E-94FF-77DCEE1951E7 (resized).jpeg

    Hey there! Got a moment?

    Great to see you're enjoying Pinside! Did you know Pinside is able to run thanks to donations from our visitors? Please donate to Pinside, support the site and get anext to your username to show for it! Donate to Pinside