Skip to content

Commit

Permalink
Merge pull request #7 from hakierspejs/feature/checkout-to-ds3231-eeprom
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
cb4b1fd915 authored Jun 6, 2021
2 parents 74e9a70 + df500bf commit 7b80b78
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

### Description
The TOTP-lock is based on Arduino Pro Mini Atmega328 - 5V 16MHz. The parts connected to the microcontroller are:
- [the relay](https://allegro.pl/oferta/modul-1-kanalowy-przekaznik-5v-10a-7953863748), which opens the electric strike ([PIN 12](https://github.com/hakierspejs/hsldz_totp_lock/blob/aedc9e4bd50019f3f2bc459a3ce09191bc713dde/hsldz_totp_lock.ino#L10))
- [the pin pad 4x4](https://allegro.pl/oferta/klawiatura-membranowa-numeryczna-4x4-arduino-9611679849), which allows to input TOTP-codes ([PINs 2-8](https://github.com/hakierspejs/hsldz_totp_lock/blob/aedc9e4bd50019f3f2bc459a3ce09191bc713dde/hsldz_totp_lock.ino#L32))
- the buzzer, to signal about wrong/correct input ([PIN 10](https://github.com/hakierspejs/hsldz_totp_lock/blob/aedc9e4bd50019f3f2bc459a3ce09191bc713dde/hsldz_totp_lock.ino#L9))
- the button to open the door from the inside ([PIN 11](https://github.com/hakierspejs/hsldz_totp_lock/blob/aedc9e4bd50019f3f2bc459a3ce09191bc713dde/hsldz_totp_lock.ino#L11))
- [the relay](https://allegro.pl/oferta/modul-1-kanalowy-przekaznik-5v-10a-7953863748), which opens the electric strike ([PIN 12](https://github.com/hakierspejs/hsldz_totp_lock/blob/main/hsldz_totp_lock/hsldz_totp_lock.ino#L11))
- [the pin pad 4x4](https://allegro.pl/oferta/klawiatura-membranowa-numeryczna-4x4-arduino-9611679849), which allows to input TOTP-codes ([PINs 2-8](https://github.com/hakierspejs/hsldz_totp_lock/blob/main/hsldz_totp_lock/hsldz_totp_lock.ino#L35))
- the buzzer, to signal about wrong/correct input ([PIN 10](https://github.com/hakierspejs/hsldz_totp_lock/blob/main/hsldz_totp_lock/hsldz_totp_lock.ino#L10))
- the button to open the door from the inside ([PIN 13](https://github.com/hakierspejs/hsldz_totp_lock/blob/main/hsldz_totp_lock/hsldz_totp_lock.ino#L12))

The open-button is connected via a [software debouncer](https://github.com/hakierspejs/hsldz_totp_lock/blob/aedc9e4bd50019f3f2bc459a3ce09191bc713dde/hsldz_totp_lock.ino#L113) and hardware low-pass filter with a pull-up resistor:
![image alt](https://i.imgur.com/PGhv3sQ.png)
Expand Down Expand Up @@ -46,6 +46,19 @@ You may want to connect to the board via serial interface, for debugging purpose
make serial-read DEVICE_SERIAL=/dev/ttyACM0
```

### Maintenance
There are two maintenance commands, which allow checking the current UNIX timestamp and disabling the necessary door key. Each of them is available only for the maintenance key (key 0).
To check a current DS3231 timestamp enter:
```
*0000000000[6-digits TOTP code]#
```
As a result, the DS3231 UNIX-timestamp will be played in reverse order [(morse encoding)](https://en.wikipedia.org/wiki/Morse_code).

To disable the door key (for instance key 7):
```
*0001070700[6-digits TOTP code]#
```

### Debugging
* disconnect 12v cable from the TOTP-lock
* disconnect the pin pad Rj-45
Expand Down

0 comments on commit 7b80b78

Please sign in to comment.