You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.5 KiB
Markdown

# Alarm system
## Problemformulering
We want to make an alarm system.
The system must be able to control locks, react to motion sensors, sound an alarm, flash a LED and be unlocked with a key card and a simple web interface for locking and unlocking.
## Løsningmodel
## Udfordringer
## Devices
- [card-reader](#card-reader)
- [display](#display)
- [door-sensor](#door-sensor)
- [motion-sensor](#motion-sensor)
### Card reader
The card reader consists of an ESP8266 Wemos D1 Mini board and a PN-5180-NFC reader.
When a card is read the device sends a MQTT message to the broker.
The controller runnning on the Pi subscribes on the event and unlocks the door and if the alarm is armed disarms it.
The NFC reader reads the serial number of the NFC card or tag and transmits it, the controller checks the serial against a list of known serial numbers.
#### Source code
The source code can be found at https://git.bpfilip.dk/HFJ/alarm-card-reader
#### Hardware connections
| ESP8266 | PN-5180-NFC |
| ------- | ----------- |
| 3.3v | 3.3v |
| 5v | 5v |
| D1 | RST |
| D2 | NSS |
| D7 | MOSI |
| D6 | MISO |
| D5 | SCK |
| D0 | BUSY |
| GND | GND |
### Display
The display module consists
#### Source code
The source code can be found at https://git.bpfilip.dk/HFJ/alarm-card-reader
#### Hardware connections
| ESP8266 | 16x2 LCD Display |
| ------- | ---------------- |
| 3.3v | 3.3v |
| GND | GND |