Doorlock: Difference between revisions

From The Munich Maker Lab's Wiki
Jump to navigation Jump to search
mNo edit summary
 
(16 intermediate revisions by 8 users not shown)
Line 1: Line 1:
Our new space will need an electric door lock. Let's brainstorm
{{Project
|name=Doorlock
|status=stable
|description=Electronic door lock for the new space
|author=[[User:Tarwin|tarwin]], [[User:Tiefpunkt|tiefpunkt]]
|download=https://github.com/munichmakerlab/doorlock
|image=Doorlock01.jpg
}}
Our space has a super smart electronic lock, which we mostly designed ourselves. Woopwoop!


== Locking Mechanism ==
== Theory ==
Options
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
* Electric controllable lock
 
** Motor lock<br>Lock can be locked and unlocked via motor, e.g. [http://www.dorma.com/de/de/sichern/sicherungstechnik/svp_2000_en/index-3260-3610-3685.html Dorma SVP 2000 Series]
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.
** Panic lock with electricly enabled outside lever<br>Lock automatically locks itself when opening/closing the door. One side can be disabled electronicly. E.g. [http://www.dorma.com/de/de/sichern/sicherungstechnik/svp_6000_en/index-3260-3610-3681.html Dorma SVP 6000 series]
 
* Electric lock cylinder<br>similar to what we currently have at Werk1
== Hardware ==
* Addon to a mechanical lock cylinder<br>e.g. KeyMatic locks
=== 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 ===
<code>
                                                            +-----------+
                                                            | RFID      |
                                                  +-(SPI)--+ Reader    |
                                                  |        +-----------+
  +--------------+              +---------------+  |               
  |              |              |              |  |          +-----------+
  | RaspberryPi  +----(UART)----+  Arduino      +--+----------+ Keypad    |
  |              |              |  (frontend)  |  |          +-----------+
  +------+-------+              +---------------+  |               
        |                                        |      +-----------+
    (Relay board)                                +-(I²C)-+ Display  |
        |                                                +-----------+
  +-----+------+
  | Door lock  |                                                 
  +------------+                                                 
</code>
 
== 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:
* http://log.munichmakerlab.de/post/108441721925/taking-apart-our-motorized-door-lock-we-got-a
* http://log.munichmakerlab.de/post/110074434770/we-build-our-own-door-lock-system-but-the
* http://log.munichmakerlab.de/post/117603378425/a-control-panel-for-our-door-lock-up-until-now
 
== 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 ==
== Resources ==
* [[Media:Dorma lock docs.pdf|Dorma lock & electronics documentation]]
** [[Media:Dorma_lock_docs_v2.pdf|Docs for newer version of the electronics we also have as a backup]]
* [https://www.youtube.com/watch?v=y6jDO9zb8gI Talk about doorlock at muCCC]
* [https://www.youtube.com/watch?v=y6jDO9zb8gI Talk about doorlock at muCCC]
* [https://www.youtube.com/watch?v=6tNslSYthFk Video of first prototype]
* [https://sautter.com/blog/ansteuerung-svp-2xxx-motorschloss/ Details on circuit inside the lock and the control stuff]
== 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!


[[Category:Project]][[Category:Infrastructure]][[Category:New Space]]
[[Category:Project]][[Category:Infrastructure]][[Category:New Space]]

Latest revision as of 13:24, 8 August 2021

     
Doorlock

Release status: stable [box doku]

Doorlock01.jpg
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.

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!