LOGAN WHITED

TECH Truck Intranet

Introduction

At the Perot Museum of Nature and Science there is an internal website called the Perot Museum Intranet. This website is used by employees and staff to keep track of current events, submit IT tickets, and perform other inter-departmental tasks. After exploring this helpful tool I decided to create one specifically for the TECH truck team and their unique needs. The website that resulted from this endeavor is able to keep track of inventory, display predictive weather and traffic data for upcoming programs, and allow control of the 3D printer.

Inventory System

Background

Before the inventory system was put in place it was relatively difficult to figure out what items we had in storage and where they were located on the shelves. If I or any of the other team members needed anything we had to first check the office. Then, if it wasn't there, walk to the loading dock where the storage room was located. If the item was still not found, we had to go out to the parking lot to search the trucks. This long arduous process often wasted time and resources. To remedy this problem, I took inspiration from the system implemented by the Resource Room. The Resource Room is a closet full of supplies and materials often used by the team of educators at the Perot. Every shelf of the room is labeled with a letter and every item on the shelfs has a number. If you need to find an item, there is a list posted on the wall with every item in alphabetical order followed by its bin number. I wanted a similar system to this for the TECH Truck Inventory so, when it came time to do our annual "winter cleaning", I went through every box and made a spreadsheet of everything the truck had. Then I created a web based application that would allow anyone from the team to access the inventory list. This web based application is comprised of three parts; the Tech Truck storage room Inventory, the truck inventory, and the Resource Room inventory. The details of these components are outlined below.

Storage Room/ Resource Room Inventory

The Storage Room Page displays the inventory of all the boxes that the TECH truck program keeps in storage at the museum. This allows the user to quickly search for a box in the system, and find what shelf that box is on in storage. Additionally, this system also allows the user to search the contents of all the boxes to find a specific part or component. This allows the user to check the inventory for parts for a project before wasting money by ordering more supplies. The application also allows the user to make edits by adding and removing items. Hopefully this will allow the team to keep the list up to date through a collective effort. All of this functionality is also available through a separate page dedicated to the Resource Room. For both of these pages the actual inventory list is saved as a CSV file. I chose this format because it is easy to parse through with almost any programming language and it is easily edited with excel. When the page is loaded some JavaScript embedded into the site calls upon a PHP script to retrieve the file. Then the JavaScript converts the CSV input into a 2D array. This array is then used to create the table shown on screen. When the user types in a search query, or sorts the table contents, the 2D array gets reconfigured and redisplayed as a table. When the user removes or adds a row to the table the JavaScript sends a GET request to another PHP script which will either add or remove that element to the CSV file and return the revised CSV to be displayed.

Truck Inventory

The truck inventory list operates in much the same way as the storage room and resource room inventories. It allows the user to search and sort items and add and remove rows to the table. The only real difference is that the truck inventory allows the user to click a button on every row of the table that delineates whether the item is loaded on the truck or not. This allows the team to know when the truck contains all the usual, necessary supplies, and when something is removed for some reason. When the user presses one of the buttons a GET request is made to a PHP script. This script then removes that row from the inventory file, changes the LOADED/UNLOADED value of the row, and adds it back to the file. Then it returns the revised CSV to be displayed. When the JavaScript displays the table it looks for the keyword, "LOADED" or "UNLOADED" and replaces that cell of the table with a button. The color and value of this button depends on whether the item is loaded or not.

Upcoming Event Schedule

The main purpose of this feature of the intranet is to notify the team of upcoming programs, the weather conditions on that day, and the travel time to that program. This information is displayed in a table on the front page of the site so that whenever a staff member visits the page they can get up-to-date information about that week's events. Under the hood there is a python script running in the background on the server. This python script is responsible for reading the schedule from an excel spreadsheet. It then uses the dates pulled from that spreadsheet and the yahoo weather API to find forecasted weather data for each day. Then it uses the Bing maps API to find predicted travel times and traffic information based on the date, time, and location of the event. The python script compiles all the data into a CSV format and saves it to a file. Then, when you load the webpage, some JavaScript pulls the CSV file, turns it into a table, and displays it on the screen. This technique allows me to only pull from the APIs a few times a day rather than every time the webpage is loaded. Otherwise we would probably exceed the API usage limits.

3D Printer Control

Background

Before implementing the 3D printer control system, the work flow for getting something printed went something like this. First you had to slice the file using the proprietary, and kind of finicky, slicer software from Makerbot. Then, you uploaded the sliced file to an SD card, put the card in the printer, and hit print. The issue with this method is that it results in 3D print files spread across many SD cards all over the place. Also, because this forces you to use the Makerbot software, we never had the amount of control and features that we wanted. To resolve this, I turned to the software solution that I implemented for my personal 3D printer; Octoprint.

Octoprint

Octoprint is an open source software package designed to allow people to control their 3D printer wirelessly over their local network. All 3D printed files get stored on the Octoprint server so they can be easily accessed at any time. The software also allows the user to home the x, y, and z axis of the printer, move the print head in all directions, and monitor the temperature of the extruder and the heated bed. However, in my opinion, the best feature of Octoprint for the TECH Truck team is that it allows us to use different slicer software for prints. This is thanks to the existence of an Octoprint plugin that translates the gcode file that most slicers use, to the proprietary modified gcode that the Makerbot uses. installation of Octoprint is extremely simple for those who are familiar with the Raspberry Pi. All I needed to do was download the octopi image for Raspberry Pi, load it on an SD card, put it in the pi, and plug the pi into the printer. The Raspberry Pi connects to the network at the museum and acts as a server for the Octoprint interface. When someone wants to print something they just need to type the IP address of the Raspberry Pi into a web browser, upload a gcode file and hit print.