Doorlock

From The Munich Maker Lab's Wiki
Jump to navigation Jump to search
     
Doorlock

Release status: stable [box doku]

Description Electronic door lock for the new space
Author(s)  tarwin, tiefpunkt
Download  https://github.com/munichmakerlab/doorlock

Our space has a super smart electronic lock, which we mostly designed ourselves. Woopwoop!

Theory

We needed a lock that allows us to hand out as many "keys" as we like, but without making it super complicated to use. A lot of hackerspaces used SSH keys as "keys" to their space. For us, that's not user friendly enough, as we expect quite a few non-technical folks to have access to the space

After discussions, we settled for a two-factor system, using RFID cards and PINs. Additional means to authenticate may be introduced at another point in time.

Doorlock Improvement Initiative 2025

TODO:

Frontend

TODO:

  • Improve cabeling
  • Improve touch mechanism

Notes 2025: There started already a intiative 2023 to create a custom PCB, but these initative seemed to have died.

Latest commit:

https://github.com/munichmakerlab/doorlock/pull/6

Status of the PCB: https://munichmakerlab.slack.com/archives/C78KSC5EG/p1699443705049589

Last information: 20231029 Plenum

  • New door lock exterior ('frontend') PCBs - Q3k (talk)
    • Full replacement for fragile outside electronics - new design based on RP2040, custom small PCB, extended temperature 2.3" OLED display, RS422 comms. Only needs external NFC reader, which we already have.
    • Board renders:
      • https://object.ceph-eu.hswaw.net/q3k-personal/23fb95bd427511aa7490f2872b45b09ab7fcf8662180f8060b15b5f27943b7b4.png
      • https://object.ceph-eu.hswaw.net/q3k-personal/d7af21c515fb173effaf15a7f4d11d77e80d0e21eb2bf77a4562f3fba3e336d1.png
    • Schematic: https://object.ceph-eu.hswaw.net/q3k-personal/84fd3de14195c3ec0b4b09f0e206c73ea6717e154097ed332e825e57e613b449.pdf
    • Assembled board costs (without OLED):
      • At JLCPCB - do we have coupons?
      • Fully populated: 164EUR + VAT + Shipping for 5pcs (239.21EUR incl. DDP S&H)
        • 195EUR + VAT + Shipping for 10 pcs (so 6EUR + VAT/extra PCB)
      • Cheaper option: omit all components on one side, omit through hole & extended components, order them separately and hand solder them: 77EUR + VAT + Shipping + Components
      • Leftover boards can be used as generic RP2040 devboards, or repurposed for other projects.
  • OLED display
    • OLED display (EA OLEDM128-6GGA) costs: 50EUR + VAT for 1 at Mouser
      • We probably don't need more than one. Second one could be useful as a backup.
    • Total cost: 300EUR (fully populated option)
    • Descision: Do the single side version and unanimously approved 200€ for everyting together

Backend

TODO:

  • get back to lock mechanism directly in the door of the left rolling gate
  • keep the mechanism with the rolling gate as backup

Notes 2025: There should be already the new door lock be available, but it's not clear what is the current status.

Software to program the mechanical lock: TMS Soft (by dormakaba)

Latest status:

20220908 Plenum

  • Adapter cable arrived and will be installed later today
  • When the entrace is moved from the workshop gate to the normal door, hopefully within the next few weeks, you will be informed

20231012 Plenum

  • Door Lock: The Door opener has bin acting up again every day the last three days. The error pattern is that it says "Its Open" but the garage door does not open. You can try messaging me (Aaron) in slack if you are locked out, I am often not far away. We could try fixing this, or get the actual door lock in the entrance working instead (the latter being our original plan). Over the next days I will ask around stakeholders™ and see if I can collect and improve existing documentation so it becomes clearer what we could do. There is quite a good documentation already: Wiki article Doorlock. The github repos with the code are also linked there.

Version 3 (future)

work in progress


20.11.2025: A two-wire cable from the doorlock control box to the roll-up gate control box in the workshop was installed.

Version 2 (current)

Frontend

RFID reader, pinpad, and LCD display, connected to an Arduino.

Backend

The backend is not connected to the door anymore, because the old door lock mechanism broke. Instead the left rolling gate is controlled via the frontend/backend. This solution works ok, but has some issues especially with the connection from backend to the door controller over wifi.

Schema

Draw.io File

Version 1 (old space)

Hardware

Frontend

RFID reader, pinpad, and LCD display, connected to an Arduino.

Prototype used an Arduino Uno, which is a little short on pins. A buzzer would be nice, and we currently can't control the backlight of the LCD.

Current version is still based on an Arduino Nano, a LCD display, and the RFID reader, all in a nice 3D printed case.

Locking Mechanism

We got a motor lock on eBay, together with its electronics, and we'll use that. It's a Dorma SVP 2000 series lock.

The electronics have a set of contacts that can be used to get the status of the lock, as well as to lock and unlock it. We currently just use the pins to (un)lock it.

Backend

A Raspberry Pi, which is connected to the frontend over a serial connection (via a USB thingie), and has the motor lock electronics connected via its GPIOs and a relay. No status checks are being done yet.


Schema

                                                           +-----------+
                                                           | RFID      | 
                                                  +-(SPI)--+ Reader    | 
                                                  |        +-----------+ 
 +--------------+              +---------------+  |                
 |              |              |               |  |          +-----------+ 
 | RaspberryPi  +----(UART)----+  Arduino      +--+----------+ Keypad    | 
 |              |              |   (frontend)  |  |          +-----------+ 
 +------+-------+              +---------------+  |                
        |                                         |       +-----------+ 
    (Relay board)                                 +-(I²C)-+ Display   | 
        |                                                 +-----------+ 
  +-----+------+
  | Door lock  |                                                   
  +------------+     
                                             


Software

Hosted on Github: https://github.com/munichmakerlab/doorlock, contains both the frontend firmware as well as the software for the backend.

The backend runs on the RPi, and uses a SQLite database to store RFID and PIN information. The "manage_db.py" script can be used to maintain that database.

Pictures

On our tumblr:

HW

  • RFID: Mifare 13.56Mhz RC522 RFID Card Reader Module
  • Dorma SVP 2272 (probably, might also be 2271)
    • Entfernung: 72mm
    • Dornmaß: 65mm

ToDo

  • Make the backend more maintainable
  • Allow for better integration with other applications, such as potentially the laser cutter and a cashless payment system.

Resources

FAQ

  • How do I unlock the door? Hold your RFID card on the right side of the box, wait for the prompt, enter the PIN and press the green button.
  • How do I lock the door from outside? press 0 and the unlabeled button next to it on the right, wait for the confirmation message. Check that the door is properly locked!