Designing a game with PLCs

I’ve been working with mini PLCs for over ten years now and I’d like to describe how I used them to control a sports training/amusement device I designed a few years ago and is still in production. The mini PLCs are a relatively new class of devices that unlike traditional PLCs everything you need in one tiny rail mounted box instead of a large cabinet that used to be required with traditional PLCs.

I was first introduced to the Moeller Easy line of mini PLCs by our electrical supplier who sent us an invitation for a seminar and workshop. By the end of the workshop I had my head full of ways to use this amazing new product, from energy savings to modernizing old equipment to reducing complexity and product count in new products or even to add new features that would have been unthinkable before.

A PLC is an industrial controller that has at its heart a computer, it interacts with the outside world through a series of electrical contacts and various inputs. They can operate as simply as a switch remotely operates a relay or can perform advanced mathematical functions to allow you to precisely control sophisticated processes and mechanisms. Traditionally these devices were developed for factories and required many different components to function. The power supply, input modules, output modules, display units, communication units, etc were each one device or more. MiniPLCs contain all the modules in a simplified form

English: Zenith Space Commander 600, an early ...

English: Zenith Space Commander 600, an early television remote control. The Space Commander 600 was available for color TV only. This particular design was offered between the years 1965 through 1972. Deutsch: Zenith Space Commander 600, eine frühe Fernsehfernbedienung. Die Space Commander 600 war ausschließlich für Farbfernseher erhältlich. Dieses spezifische Design wurde von 1965 bis 1972 angeboten. (Photo credit: Wikipedia)

in one small box that could fit on the palm of your hand.

The first Easy controls I ordered were used as simple timers to replace a couple of delay relays and some switch logic. I not only cut down on the number of parts and made more room inside of the electrical box but I saved money over the old parts and was able to offer some new features without increasing costs. That was a hit with the boss and I was hooked. Another advantage was I could now draw out my switch logic on the computer and try out new designs without cutting a single wire!  Another good reason is my back hurts when standing on concrete shop floors for hours so this armchair design worked for me.

During the 1970s the company I was working for had custom made a pair of machines that were used as a skills challenge during a nationally televised pro sports program. The machines were very bulky and weighed as much as a large motorcycle and each had a control box filled with timers and relays that synchronized and automated their functions. The system was never made commercially available but many people fondly remembered them as being on TV with their favorite star. I used to see a large photo of the event almost every day at the office so it was always somewhere on my mind but one day the idea of putting the functionality of the old system in a new machine with the tiny control came to me and I decided the time might be right to bring back the old TV star.

Designing starts with an idea but quickly moves to the notebook and sketch pad. For a product like this one which also plays a game while attempting to train a skill some fluency with heuristic theory is also helpful. There is also an aspect of  kinesiology when using the device, athletes will be expected to perform a series of repetitive motions so a study of how it affects human movement should also be considered. The company already had years of experience of training athletes and I based my game off a well proven model so we’re now off to the drawing board.

I start with a list of simple design objectives then proceed to sketch out the functionality with a flow chart. A simple schematic is hand drawn to help plan for complexity and to have a rough guide of the parts count and thus cost. I now present the company with my findings and ask for some kind of commitment and a budget. When this all starts to make sense some prototype assemblies were built and tested, I’m trying to add the new functionality to a standard model machine to keep costs down. The prototype parts are operated and a simulation of the machine is performed with a series of toggle switches operated manually, the test is recorded on video, this is done because video can be easily analyzed and timing information can be measured that will later be programmed back into the PLC.

Now that I know that the mechanical functions can be achieved I start to program my PLC. Basically the game is just a large number of nested relays, one function must be completed before the next can proceed and some functions require complete routines like the machine must reset itself between players, the machine must wait a certain amount of time to allow the player to attempt to complete the task, the machine must incorporate some sense of randomness to keep the players from guessing the sequence and timing, scoring must be acknowledged, etc. This became a rather long list and the final program was almost 200 lines long.

Whenever you design automated machines safety must be considered, machines are powerful and you don’t want a person injured by careless design so a certain amount of forethought and testing are required. I designed my circuits so that in case of failure the machine would default to the safest position, this means that if something like a wire is cut or a relay fails the machine goes off and not continues operating. I also used very large red reset/stop button on the machine and on the remote control and they were wired to directly cut the power and to open any pinch hazards. There are some special PLCs made that are dedicated to safety functions, for a machine of this small size this was not necessary.

Testing is not normally considered part of design but for devices that will be used by the public it is important to allow people not involved with the design operate the equipment, you can’t proof your own work so you never know what this will produce and the earlier you get some “real world” testing the easier it will be to correct these problems.I like to call it “user blindness”, its the ability of designers and engineers to overlook what a normal user would do.

Another nice feature of the Moeller Easy and other mini PLCs is the ability to update the program just by transferring it from a memory chip. After the first few machine were in use for a short while customers were providing valuable feedback and modifications were made to the program. These changes could then be given to the customer by just mailing them an inexpensive chip and having it uploaded with no costly trips back to the factory. People found the slow too slow and the fast not fast enough and this was corrected in software, tested on a factory machine and shipped to the customer.

From concept to delivery, mini PLCs might make sense to you too.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s