You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ace_laser_FATT_app is a laser cutter access control system
Summary
This repository contains the code we are currently using to track laser usage for our membership, while this is still in the early stages with more features and better stability planned, it is fully usable and includes the following features:
Gate user access based on credentials associated with their account (using a USB RFID reader and crosschecking against an access list)
Activate and deactivate the Laser for cutting (using a teensy connected to the Laser Cutter)
Periocally get an update for Laser usage (the Laser reports an odometer - in seconds - which we store on the teensy and check for updates)
Track a user session to gather the amount of firing time the member used (this is uploaded to our database from which we generate invoices through a custom Wordpress plugin)
Allow users to select which filter they are using
Track filter usage against firing time and upload to our database for persistence
Warn users when a filter requires changing
This project and its documentation are recommended for parties with intermediate-advanced technical knowledge due to its unfinished state, if you wish to implement it for your own makerspace / hackerspace we incourage you to make sure you are comfortable with Raspberry Pis, Linux, programmable microcontrollers, Python, basic electronics and have the ability to make your own APIs.
We hope to be able to provide better documentation, install procedures and open source our API endpoints and Wordpress plugin in the future along side the stability improvements and additional features.
Ace laser FATT (Fob All The Things) app is a laser cutter access control system that allows Ace Makerspace to charge for laser cutting time and track filter usage. It enables users to log laser usage time, using RFID keys to authenticate which user is actively logged in.
The hardware used is a Raspberry Pi, a touch screen, an RFID reader, and a custom-built electronic laser cutter interface built upon a teensy microcontroller.
Project Photos
Quick Start
for all the commands in one block
for more details about the commands see Installation
Bellow is instructions for preparing the Raspberry Pi, acquiring the app, configuring the app, as well as starting and stopping the app through the systemd service.
1. Update the Pi:
sudo apt-get update
sudo apt-get upgrade
2. Clone this repo:
Clone this repo into a directory named laserGui in the pi user's home directory. This path is referenced in the service that starts the app.
cd~
git clone https://github.com/acemonstertoys/ace_laser_fatt_app
cd ./ace_laser_fatt_app
3. Install dependencies using requirements.txt:
The laser GUI app is a python built on guizero, and as such it has a number of dependencies.
pip install -r requirements.txt
4. Create a prod.env file to define the following enviroment vaiables:
Note: They are not stored in this repo as they are considered sensitive information.
Key
Description
Default Value
ACE_ACCESS_URL
the access list URL
none, required
ACE_EXPORT_TOKEN
used with ACE_ACCESS_URL
none, required
ACEGC_ASSET_ID
the Assest ID of the pi
none, required
ACEGC_ASSET_TOKEN
auth token
none, required
ACEGC_BASE_URL
base URL to Grand Central
none, required
ACEGC_LASER_COST
the cost in cents per minute of laser firing
0.5
LASER_LOGOUT_TIME
number of inactivity minutes which invokes a logout
40
LASER_ODO_POLLING
the time interval used to continously poll the laser for odometer reading, in seconds
15
LASERGUI_SYNC_BUTTON
If present, will show a "Force Sync" button in the GUI
// <LIST> returns the current list of users allowed to use the laser.
[
{
"RFID": <STRING>,"First Name": <STRING>,"Last Initial": <STRING upper case length 1> , "UID": <int>
},
{...}
,
....
]
NOTE: the hardware is intended for experienced electrical engineers only. Your expected to build your own hardware interface with the laser you are using. We are only showing an example of how we've done ours.
Graphical User Interace to the makerspace's laser.
images — images used in the GUI
systemd — Systemd service used to automatically start the GUI
filter.py — represents laser filters
laser.py — Interface to the Teensy controller (link TBD)
laserGui.py — GUI built on guizero which wraps standard Python Tkinter GUI library.
laserSession.py — represents a user's session at the laser.
requirements.txt — python library dependencies
sessionManager.py — manages interactions between the GUI and users and filters
Testing and Local Dev
Set the LASERGUI_ROOT env variable to use a different install location for testing. If
this is not set, the default /home/pi/laserGui/ will be used.
Set the LASERGUI_MOCK to use a mock Laser class that will not try and talk
to the serial port but instead just do nothing. (This is pretty incomplete at the moment, but
it's enough to let the app run)