Skip to content

bitraf/toollock

Repository files navigation

TheLock

Electronic lock connected via wireless (Wi-Fi) and MQTT using MsgFlo. The lock is intended to enforce 'checking out' and 'checking in' portable tools in a shared workshop environment.

It makes it possible to:

  • Know whether a tool is currently in its station
  • Checking for neccesary safety course before allowing usage
  • Holding people responsible when equipment is not get returned or broken

First funtional prototype

Each lock has a key with a matching key pattern. The key is physically attached to the tool using a wire. An optical sensor detects that the right key is used. IR leds normally light through, only a matching key will fully block light.

Key & lock geometry

The key and lock can be CNC-milled, lasercut or 3d-printed.

Status

Proof of concept

  • July 2017: Functional prototype was built during 2-day hackathon
  • First production version planned for October 2017

Bill of Materials

Google Doc

  • Microcontroller - ESP8266 or similar. We used a Wemos D1 board.
  • actuator - we used a solenoid that is rated for 12V (it actually actuates at about 7V, but slowly), it draws about 0.3 - 0.7 A. Alternatives: 1 2
  • mosfet - we used a IPP055N03L
  • resistor - a 10k ohm resistor for pulldown on the control signal
  • power supply - a 12V DC power supply for the actuator / solenoid
  • IR led 0805, 120deg. Kingbright kp-2012f3c
  • IR phototransistor 0805, 120 deg. Kingbright kp-2012p3c

https://wiki.wemos.cc/products:d1:d1_mini https://github.com/esp8266/esp8266-wiki/wiki/Pin-definition

Setup firmware

  • Install Arduino libraries PubsubClient and Msgflo
  • Setup wifi connection: Add a file Config.h defining parameters WIFI_SSID and WIFI_PASSWORD
  • Configure MQTT details in the sketch

TODO

v1.0: First fabricated version

  • Electronics: Switch to a standard transmissive detector, PCB mounted.
  • Mechanics: Update to vertical PCB orientation, check connections
  • Produce initial 4 locks
  • Mechanics: Add a casing/box for 4-8 locks. Securely wall/table mountable.

License

MIT

Made by

einsmein, tingox and jonnor

State machine

State machine diagram

Electronics

Developed in KiCAD. Schemantic used for first protototype

Mechanics

Developed in FreeCAD. Lock model

SIG: gnd+in PWR: 12v+gnd OUT: 12v+out

IN GND 12v 12v OUT