User Tools

Site Tools


door_access_controllers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
door_access_controllers [2019-02-24 00:39] – [PCB] timdoor_access_controllers [2023-04-08 10:24] (current) – [PCB ESP32 (draft)] tim
Line 5: Line 5:
 The Hacklab door controllers are based on an ESP8266 wifi microcontroller and a PN532 NFC reader module. One controller is installed for each door, and each controller can operate a single 12V channel for an electric door release or magnetic lock. Inputs can be connected for door open/closed reed switch, exit request and local lock/unlock "snib" function. The Hacklab door controllers are based on an ESP8266 wifi microcontroller and a PN532 NFC reader module. One controller is installed for each door, and each controller can operate a single 12V channel for an electric door release or magnetic lock. Inputs can be connected for door open/closed reed switch, exit request and local lock/unlock "snib" function.
  
-===== PCB =====+===== PCB v2 =====
  
-https://github.com/timhawes/onyx_robot/+https://github.com/timhawes/onyx_robot/tree/or2
  
 ^ Reference ^ Component ^ Farnell ^ ^ Reference ^ Component ^ Farnell ^
Line 33: Line 33:
 Errata: a generic through-hole flyback diode should be fitted between GND and 12V_OUT, on the underside of the screw terminal. Errata: a generic through-hole flyback diode should be fitted between GND and 12V_OUT, on the underside of the screw terminal.
  
-==== Lessons Learned ====+===== PCB v4 ===== 
 + 
 +https://github.com/timhawes/onyx_robot/tree/or4 
 + 
 +  * Removed custom 12V-3.3V converter circuit 
 +  * Replaced with standard 12V-5V converter and 5V-3.3V LDO 
 +  * I2C devices running on 5V instead of 3.3V 
 +  * Removed LED series resistor (appropriate resistors must be used at installation time) 
 +  * Replace relay diode with M7 
 +  * Added flyback diode to 12V relay output 
 +  * Removed ESD protection diodes 
 +  * Removed 3.3V connection from FTDI connector 
 +  * Solder jumpers for no-volt relay output 
 + 
 +^ Reference ^ Component ^ 
 +| C1 | 0805 10uF 25V | 
 +| C2 | 0805 10uF 10V | 
 +| C3 | 0805 10uF 6.3V | 
 +| C4 | 0603 0.1uF 6.3V | 
 +| D1 | S1M+ | 
 +| D2 | S1M+ | 
 +| JP1 | PCB male header 2.54mm pitch 3-way | 
 +| JP2 | PCB male header 2.54mm pitch 2-way | 
 +| P1, P2, P3 | PCB screw terminals 5.08mm pitch 2-way (9 total) | 
 +| P4 | PCB male header 2.54mm pitch 6-way | 
 +| Q1, Q2 | MOSFET-N SOT-23 (e.g. On Semi FDV303N) | 
 +| R6 | 0603 10K | 
 +| R7 | 0603 31K6 | 
 +| R8 | 0603 2K2 | 
 +| R9 | 0603 10K | 
 +| R10 | 0603 10K | 
 +| R11 | 0603 10K | 
 +| R12 | 0603 4K7 | 
 +| R13 | 0603 4K7 | 
 +| R14 | 0603 10K | 
 +| SW1 | EVQPT5 tactile switch | 
 +| U1 | Recom R-78E5.0-1.0 | 
 +| U2 | Songle SRD-12VDC-SL-C | 
 +| U3 | ESP-12E or ESP-12F | 
 +| U4 | SPX3819M5-L-3-3/TR | 
 + 
 +===== PCB ESP32 (draft) ===== 
 + 
 +This is draft design for migrating to ESP32. 
 + 
 +Goals: 
 +  * ESP32 series 
 +  * compatibility with existing wiring 
 +  * fit into the existing plastic enclosures 
 +  * nice to haves: 
 +    * fit existing enclosures better 
 +    * make wiring easier 
 + 
 +{{:20230407_doorman_esp32.pdf?direct&200|schematic}} 
 + 
 +{{:20230407_doorman_esp32.png?direct&200|}} \\ 
 +(placement and routing isn't finished) 
 + 
 +What's changed: 
 +  * PCB is bigger, designed to screw into the enclosure as the manufacturer intended 
 +  * Uses the ESP32-S3-WROOM-1 module 
 +    * available with large flash/ram 
 +    * supports circuitpython 
 +    * supports native USB 
 +  * USB-C connector (plus optional UART pinout for low-level debugging) 
 +  * Pluggable 3.5mm terminal blocks for easier wiring (can be replaced with fixed blocks to reduce costs) 
 +  * MOSFET instead of relay (smaller, cheaper, probably more reliable) 
 +  * Dropped the PN532 reset pin in favour of a switchable power output (one less wire to manage) 
 +  * Reader connector has spare pins for existing LED and buzzer, but future readers can be I2C only for even less wiring 
 +  * Onboard RGB LED (will use with a light-pipe to eliminate the wiring for the current LED) 
 +  * Onboard buzzer 
 +  * Exit/Snib/Door inputs replaced with 4 general purpose I/O 
 +  * One I/O also has a power pin (e.g. to run the touch door handle) 
 +  * Optional Stemma QT (I2C) connector
  
-Future PCB revisions are likely to be based on a Wemos D1 Mini module to reduce component count and allow easier debugging. The onboard DC-DC converter will be replaced with an off-the-shelf "LDO replacement" DC-DC converter module. 
 ===== Controller Unit ===== ===== Controller Unit =====
  
Line 45: Line 117:
   * [[http://cpc.farnell.com/kingbright/rtf5010/led-clip-prominent-5mm-pk25/dp/SC08862|5mm LED bezel]]   * [[http://cpc.farnell.com/kingbright/rtf5010/led-clip-prominent-5mm-pk25/dp/SC08862|5mm LED bezel]]
   * [[http://cpc.farnell.com/unbranded/r13-502ma-05-b/switch-black-push-button-spst/dp/SW03314|push-button switch]]   * [[http://cpc.farnell.com/unbranded/r13-502ma-05-b/switch-black-push-button-spst/dp/SW03314|push-button switch]]
-  * Laser-cut mounting plate: {{:nfc-controller-mount-20150925.dwg|DWG}} {{:nfc-controller-mount-20150925.dxf|DXF}}+  * Laser-cut mounting plate: {{:nfc-controller-mount-20200730.dxf|DXF}}
  
 {{:nfc-controller-20151031-231947.jpg?200|}} {{:nfc-controller-20151031-231947.jpg?200|}}
Line 67: Line 139:
  
 ===== Reader Unit ===== ===== Reader Unit =====
 +
 +==== Version 1 ====
  
 CAD files: {{:nfc-reader-20160626.dwg|DWG}} {{:nfc-reader-20160626.dxf|DXF}} CAD files: {{:nfc-reader-20160626.dwg|DWG}} {{:nfc-reader-20160626.dxf|DXF}}
Line 79: Line 153:
  
   * 3mm blue LED   * 3mm blue LED
-  * 120R resistor (this is low, but an additional resistor is used on the controller PCB)+  * 120R resistor (or higher)
   * [[http://uk.farnell.com/multicomp/mcabt-456-rc/audio-element-piezo-9-5khz-12mm/dp/2433032|12mm piezo disc]]   * [[http://uk.farnell.com/multicomp/mcabt-456-rc/audio-element-piezo-9-5khz-12mm/dp/2433032|12mm piezo disc]]
   * [[http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=90_93&products_id=2242|PN532 module]]   * [[http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=90_93&products_id=2242|PN532 module]]
-  * Cat 5 or other cable with at least 7 cores+  * Alarm cable with at least 7 cores (Cat5 can be used but is not recommended)
  
 The reader enclosure is formed from three layers of 3mm black acrylic. The layers should be joined with cyanoacrylate adhesive. The reader enclosure is formed from three layers of 3mm black acrylic. The layers should be joined with cyanoacrylate adhesive.
Line 90: Line 164:
 Bend and cut the LED leads to the correct shape and length. Solder the LED and cable before gluing the module into the enclosure. Bend and cut the LED leads to the correct shape and length. Solder the LED and cable before gluing the module into the enclosure.
  
-Cat 5 cable colours:+Cable colours in Hacklab installations:
  
-| blue | GND +^ Pin ^ G1/G2/G8 ^ G11 (and photos) ^ Alarm Wire ^ 
-| green | VCC | +| GND | blue | blue | black 
-brown RST +| VCC | green orange red 
-| orange | SDA +| SDA | orange | green | yellow 
-| white-green | SCL +| SCL | white-green | white-green | blue 
-white-brown | LED +ve | +RST | brown | brown | green | 
-| white-blue Piezo +| LED +ve | white-brown | white-brown orange 
-| white-orange not used |+| Piezo | white-blue white-blue | white |
  
-Note that on the G11 door and **in the photos**orange=VCC and green=SDA.+The LED should be connected between LED and GND, with a 120R series resistor. To avoid damaging the LEDuse hot-melt glue to secure it in place (not cyanoacrylate).
  
-The LED should be connected between white-brown and GND (blue), with a 120R series resistor. To avoid damaging the LED, use hot-melt glue to secure it in place (not cyanoacrylate). +The piezo should be connected between PIEZO and VCC (green). The piezo may be secured with cyanoacrylate or hot-melt glue, but try to give the disc some freedom of movement or the sound output may be reduced.
- +
-The piezo should be connected between white-blue and VCC (green). The piezo may be secured with cyanoacrylate or hot-melt glue, but try to give the disc some freedom of movement or the sound output may be reduced.+
  
 Test the reader and controller together before securing the reader to the wall with double-sided adhesive foam tape. Test the reader and controller together before securing the reader to the wall with double-sided adhesive foam tape.
 +
 +==== Version 2 ====
 +
 +The goal of this version is to make the assembly process easier and more reliable.
 +
 +It consists of a laser-cut acrylic plate that fits over a standard 1-gang UK electrical box. A PCB is glued to the inside of the plate, and this PCB integrates the PN532 module, buzzer, LED and wiring connections.
 +
 +CAD files: {{:back-box-1g-20190703.dxf|DXF}}\\
 +PCB files: https://github.com/timhawes/onyx_reader
  
 ===== Software ===== ===== Software =====
  
-Two versions of firmware and server back-end are currently in operation.+[[https://github.com/timhawes/doorman-firmware|Firmware]] Arduino C++ built with PlatformIO \\ 
 +[[https://github.com/timhawes/doorman-backend|Backend]] - Python 3 asyncio
  
-Common features:+Features:
  
   * Ability to read any 13.54MHz ISO-14443 Type A token including MIFARE Classic/UltraLight and NFC tags.   * Ability to read any 13.54MHz ISO-14443 Type A token including MIFARE Classic/UltraLight and NFC tags.
Line 123: Line 205:
   * Remote enable/disable/renewal/timeout of snib state to allow presence detection to trigger timeout of snib state.   * Remote enable/disable/renewal/timeout of snib state to allow presence detection to trigger timeout of snib state.
   * Input DC voltage measurement, using low voltage as an indication of battery backup during a power outage. Snib feature can be disabled during power outage to extend battery life (for fail-secure locks).   * Input DC voltage measurement, using low voltage as an indication of battery backup during a power outage. Snib feature can be disabled during power outage to extend battery life (for fail-secure locks).
- +  * TLS-enabled TCP networking with OTA updates.
-Legacy/Stable: The older version uses UDP networking and requires a dedicated wifi network for security. All of the Hacklab doors use this version at the time of writing. +
- +
-New: A new firmware and back-end use TLS-enabled TCP networking, so do not require a special wifi network. The modern codebase is better-written, more flexible and features OTA upgrades.+
  
door_access_controllers.1550968765.txt.gz · Last modified: 2019-02-24 00:39 by tim

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki