Controller board for next gen hacklock door / lock / access control system.
Specifications
10-24V is expected at PWR1/PWR2, with 12V typical.
Whichever input voltage is higher will be used to power the device.
Two ADC pins can be used to monitor the voltage at PWR1/PWR2:
Function | GPIO |
---|---|
PWR1 monitoring | GPIO1/ADC1 |
PWR2 monitoring | GPIO2/ADC2 |
The voltage at PWR1/PWR2 is divided by 28 before it reaches the ESP32 ADC, so 24V on PWR1 == 857mV on the ADC.
One of three outputs can be enabled: 3v3, 5v, RS232. This is done by setting two pins per UART: 5V enable and RS232 enable. Truth table:
5V enable | RS232 enable | Selected connector |
---|---|---|
0 | 0 | 3v3 |
1 | 0 | 5v |
1 | 1 | RS232 |
0 | 1 | undef |
Pinout for UART1:
Function | GPIO |
---|---|
UART1 TX (from hacklock) | 17 |
UART1 RX (to hacklock) | 18 |
UART1 5V enable | 6 |
UART1 RS232 enable | 8 |
Pinout for UART2:
Function | GPIO |
---|---|
UART2 TX (from hacklock) | 3 |
UART2 RX (to hacklock) | 4 |
UART2 5V enable | 7 |
UART2 RS232 enable | 9 |
The RS232 connectors are wired as a DCE, which is a happy accident. No hardware flow control is available.
Digital I/O is at power supply levels, optimized for a ~12V rail. Digital I/O connectors also carry GND and Vsupply on them so that it's easy to use these I/O connectors to read switch state or drive other 'industrial' equipment.
Output pins can sink/source up to 500mA (via ULN2003A).
Input pins need to be driven to at least 10V to register a signal as a logical high.
Function | GPIO |
---|---|
O12 (output) | 12 |
O13 (output) | 13 |
I10 (input) | 10 |
I11 (input) | 11 |
Two relay outputs are available, using OMRON G5V-1 relays. These relays allow for controlling up to a 1A load at 24V.
Function | GPIO |
---|---|
Relay 21 | 21 |
Relay 14 | 14 |
Running I2C off-board is not recommended, but is provided as a backup solution in case you wish to expand the capabilities of the board.
Function | GPIO |
---|---|
SCL | 38 |
SDA | 47 |
The bus runs at 3v3 and has 1.8k pullups included.
Two RGB LEDs (WS2812B) are included and connected to GPIO48. However, they're untested.
You can power the device from USB-C, but digital I/O will not run well. Everything else should work. You can connect via USB when the device is powered on via PWR1/PWR2.
Hold SW1 while powering on the device, or hold SW1 while resetting the device with SW2. The device will switch into BootROM serial mode and can be programmed using esptool.py.
J15 is an 'FTDI cable' connector a la sparkfun/adafruit. Pin 1 is GND and is facing away from the ESP32. This exposes the UART0 console from the ESP32 in case you want to have a second debugging/logging channel in adition to the USB serial/jtag console.
Revision | Date | Count | Fab | Serials | Notes |
---|---|---|---|---|---|
rev. A | 2022/06/21 | 5pcs | JLCPCB | Q001-Q005 | HW fixes applied (see revision detail below) |
First revision, has the following hardware bugs: