- October 11, 2024
- Case Study
Summary
Escape the ordinary…with automation!
Escape rooms are immersive adventure games where players are “locked” in a themed room and must solve a series of puzzles and challenges to “escape” within a set time limit (Figure 1). At first glance, it may not seem that an escape room would have much in common with industrial and manufacturing processes for the automotive, food and beverage, and entertainment industries. However, one industrial automation systems integrator (SI) has leveraged their normal business expertise to form a unique collaboration with an entertainment company that develops and deploys escapes rooms. As technical effects become more prevalent, the entertainment company needed assistance from an SI with advanced automation knowledge.
Inside the room, players work as a team to uncover hidden clues, solve various puzzles and riddles, and sometimes complete physical tasks. Often, there are a variety of technical elements involved, including sensors that trigger automated responses, interactive lighting and sound effects, countdown timers and camera monitoring systems (Figure 2). With numerous inputs and outputs (I/O) to manage, an industrial programmable logic controller (PLC) is the ideal tool to keep gameplay running smoothly.
Game-changing technology
Andrew Schulman began his career as a mechanic and equipment repair technician, supporting a variety of consumer, commercial and industrial customers. Building on his mechanical and electrical experience, he branched out and began learning about PLCs, which automated much of the equipment he worked on. While mostly self-taught, some formal training and use of other available learning media helped him gain enough expertise to found Schulman Engineering, an SI in Southern California. He has found the experience to be game-changing in more ways than one.
Schulman has worked in many industries, sometimes for end users and other times for other SIs. The ability to troubleshoot and program electrical and PLC systems opened up many traditional opportunities, but one of his most unique clients develops and operates escape rooms.
This client already had a functioning escape room with a PLC managing various tasks, including controlling a multi-channel audio board to play sound effects at precise moments. However, they lacked the ability to support the PLC on their own. They wanted to replicate and enhance this setup for a new escape room they were building.
Schulman was enlisted to write the logic for the PLC, and to support his client so they could understand the system and manage it independently. Although access to versions of code from previous games was available, this project required a careful look at the system architecture because there were some suboptimal programming practices. Ultimately, Schulman delivered a solution in the form of a flexible program structure that not only addressed the immediate needs of the new game, but also facilitated future expansion and game development.
Similar to the way that the games themselves test players’ problem-solving skills and creativity, programming the games can present interesting challenges for developers. This particular game had a variety of inputs to manage, including floor pad sensors, lighting controls, sound effects and movable clock hands with position sensors connected to the PLC. Although many industrial standards don’t apply, the gameplay environment shares many similarities with industrial applications and requires flexible and robust hardware. Due to the interactive and sometimes unpredictable nature of play, the program is subjected to frequent resets and extended bypass periods, which can be initiated automatically by program inputs or input manually by the game operator.
Cracking the code
Schulman was already familiar with the easy-to-use family of AutomationDirect PLCs. In this case, the Productivity1000 PLC, a stackable micro programmable controller, was the ideal choice to oversee the game logic because it is packed with powerful features including a wide-range of discrete, analog and specialty I/O support (up to 752 nodes), extensive communication options (USB, Ethernet, RS-232 and RS-485), and easy device integration—all provided in a compact and affordable package.
During gameplay, effects and automated clues are triggered by actions and inputs throughout the escape room and logic within the controller. The PLC manages more than two hundred unique I/O points (Figure 3), using a combination of serial communication and digital I/O distributed in various locations throughout the game. The digital I/O utilizes best practices and industry standards for field-based industrial devices operating at 12 VDC.
Developing the code for the PLC was straightforward with the free Productivity Suite programming software, which provides many convenient features and instructions. However, the available source code relied heavily on extensive use of latching bits throughout the PLC program as a way to ensure actions occurred in the correct order. While this approach is valid, it requires careful attention throughout the program to ensure that the latches are properly maintained and cleared, and are not inadvertently left in the wrong state.
As game logic, or industrial automation for that matter, increases in complexity and technical effects, latching logic can become cumbersome to manage, especially when new enhancements are added. To address this challenge, Schulman implemented drum sequencer instructions to easily program the complex, multi-step logic used throughout the game. Utilizing the software-based drum sequencer instruction available in the Productivity Suite greatly simplified the program, made it much easier to debug and maintain, and ensured the code could be easily adapted for future games.
Because game operators are not likely to have experience with industrial or automation systems, it was essential to have an intuitive interface. The AutomationDirect C-more headless human-machine interface (HMI) proved to be a great fit, integrating seamlessly with the Productivity PLC. A traditional HMI would have an integrated display for mounting in a control panel. However, the headless HMI has no on-board display, but it does have an HDMI connection and USB port to drive a remote monitor or touchscreen. The headless HMI also supports remote connectivity using a web browser or app on a PC or mobile device.
For this escape room project, operators use a desktop style touchscreen display connected to the HMI, and they also have the ability to connect remotely. The game operators can monitor game progress and initiate certain bypasses using the HMI.
Sound logic
A critical aspect of the immersive experience is sound effects. Sound is used in a variety of different ways to enhance gameplay. Background sounds amplify the theme, and in some cases sound is used to deliver clues.
Specialized electronic audio boards are used to play sound files. Most commercially available boards are typically limited to a single audio port, or jack. However, to manage the many sound effects used throughout the game, the client had developed a custom sound box comprised of printed circuit boards (PCBs) fitted with numerous stereo and mono audio ports. This custom sound box configuration with multiple audio ports allows various sound effects to be played—concurrently if needed—in different rooms and locations throughout the game based on specific triggers from the PLC. The sound effects used during the game are saved as mono WAV files and stored onboard the PCB via an SD card.
The sound box (Figure 4) receives commands from the PLC using serial communication. Serial communication is an efficient way to manage the many sound effects, reducing the number of wires and I/O that would otherwise be required by discrete signals. As the gameplay progresses, the PLC determines which sounds to play. A message is sent from the PLC to the sound board using the built-in RS-232 communication protocol to trigger a specific audio file. Sounds can be played a single-time or looped, depending on the desired effect and the status of the inputs at various points during the game.
Behind the scenes
Due to the lack of on-site support should a technical need arise, as well as the desire to franchise the game to multiple locations, and AutomationDirect StrideLinx VPN router was also included in the system architecture. The VPN router allows remote access via a secure wired, wireless, or cellular connection through a cloud-based server network, and it is specifically compatible with industrial devices such as PLCs and HMIs. With the VPN router, connected devices can be accessed through a secure VPN connection as if you were directly connected on-site.
The VPN router was instrumental during the implementation phase of the project. Remarkably, the entire programming and commissioning process was completed remotely. Utilizing remote VPN access and the C-more mobile app, Schulman did not have to travel to the escape room. This approach resulted in substantial time and cost savings for both the SI and entertainment company.
With a solid commitment to providing intuitive, quality products and exceptional technical support, AutomationDirect was an ideal partner for this unconventional application. Similarly, Schulman’s client was impressed by the resulting system performance, and the training and support provided so they could develop their in-house ability to maintain the system. The products and teamwork proved to be a winning choice for this customer to play the long game.
All photos courtesy of Schulman Engineering
Did you enjoy this great article?
Check out our free e-newsletters to read more great articles..
Subscribe