Introduction: Open Source Machine Access System

Every makerspace/hackerspace around the world has its own issues to deal with involving use of the machines Insurance policies, waivers, and various forms can only work so well, so this is more tuned to makerspaces that need an extra layer of security, specifically makerspaces located in schools and universities.

“Safety and Training” are the mantras that are continually spouted across school makerspaces, as well they should be. Safety should be the ultimate goal of any school makerspace, and the best way to assure safety is through training. At Tulane University we employ multi-level training procedures for each group of tools as we see fit, but they key question was “in a student-run shop, how do we keep un-trained users from just using the tools anyway?”

Our answer was to develop an RFID tag system that would determine whether a user was properly trained for a machine before granting access to that machine. Specifically, if you hadn’t been properly trained for that machine, you wouldn’t even be able to turn it on. This went a long way toward satisfying both risk-management teams (lawyers) and health-safety officials (administrators).

When I first approached the problem I was surprised that such a system didn’t exist outside of proprietary models. Our university partner offered to provide us with a wildly inefficient, ridiculous system, so I decided to create my own system. It took me quite a while (because I’m not a very good programmer, as you’ll see), but once a had a working model it has been in use and running smoothly for nearly a year now. I’ve just implemented “Version 2.0”, and that is what I’d like to share with everyone else who may be interested.

As an experimental physicist, I have a basic knowledge of a number of different programming languages, but I’m most proficient at LabVIEW. Thus when I tried to write this program in something more “shareable” I ran into a number of roadblocks and eventually retreated to LabVIEW. I know that this is far from the language of choice for most people, so I hope someone out there is interested in turning it into either a JavaScript or Python program so that more people can take part in improving it.

What you will need:

- A Windows computer (LabVIEW programs cannot run on Android or Mac, it can run on a Raspberry Pi but a separate graphical interface will need to be created).

- An Arduino compatible board with 2 serial ports (an Arduino Mega would work, I like the Digilent uc32 https://store.digilentinc.com/uc32-arduino-programmable-pic32-microcontroller-board/)

- A MySQL server (can use a headless Raspberry Pi, or the Windows computer listed above)

- MySQL Workbench software https://www.mysql.com/products/workbench/ (recommended)

- RFID scanner (I like the package from Sparkfun https://www.sparkfun.com/products/13198)

- Assorted connectors.

- 2-wire cable (any gauge, thin speaker wire works well)

- PowerSwitch Tail (one for each machine http://www.powerswitchtail.com/)

- Power-cord locks (optional, but recommended)

- The general LabVIEW 2014 program (source if you wish to edit, if not use the .exe).

- The LabVIEW package allowing .exe. to run.

If you wish to be able to edit the LabVIEW program, in order to work with the Arduino package you must use LabVIEW 2014. See instructions on the LabVIEW MakerHub for getting version 2014.

Step 1: Database Setup

1. Follow instructions for setting up a MySQL server on your machine of choice. For simplicity’s sake I prefer to use the MySQL Workbench installer for creating and editing the database.

2. I created two separate databases for our system, one to control who can access a machine, another to track who has accessed a machine, called “machine.access” and “machine.usage”. The LabVIEW program is set up to work this way, it not only grants access it also tracks who has logged into and out of the machines by timestamp, so that if a problem DOES arise you can easily track who was responsible for that machine at that time.

3. The information you’d like to keep in the database is up to you. I register users with the tags shown in the image above. “id_Number” is a student ID, “id_tag” is the RFID identifier, and “email_Id” is the user name from their school email address (eg. email_Id@academy.edu)

4. Also in your database you’ll need columns for the machines (or groups of machines) that you’d like to control. The simplest means to do this is create columns that are either “0” or “1” for “non-access” and “access”, respectively.

Step 2: Hardware Setup

1. The RFID reader requires a serial connection to the Arduino, and so does the LabVIEW program. I connected the RFID to the second serial connection on a Digilent ChipKIT uc32 through the RX and TX pins 39 and 40, so that the computer can use the main serial connection to run the program..

2. Simple screw-down terminals are helpful for running your wires to the machine, I soldered them to some stripboard and then ran wires from the board to the Arduino. You can use any digital pins on the Arduino you wish, just make sure that you use the correct corresponding pin numbers in the program.

3. On the machine side, you can simply connect the wires to the PowerTail as indicated, then connect the PowerTail in some way between the machine and the power outlet. We created “locks” so that the PowerTail couldn’t be simply disconnected, made with PVC pipe and screws.

Step 3: The Software

1. Download and unzip the folder containing the LabVIEW .vi file and others.

2. The front panel of the .vi has blanks to enter the information for your database (ip address, login, schema, etc.)

3. The block diagram of the .vi has two main loops, the first scans the RFID card and reads the database to provide access. When access is granted to the user, the corresponding buttons will become visible on the front panel and the user can select the machine they wish to use.

4. The second loop sends the HIGH/LOW signals to the Arduino in order to send power to the machines. Once a machine has been selected on the front panel, the Arduino sends a signal to the Powertail to allow power to run to the machine.

First Time Author Contest 2018

Participated in the
First Time Author Contest 2018