Sesame

About the project

Access control using Arduino, RFID and electric strike.

Project info

Difficulty: Moderate

Platforms: Arduino

Estimated time: 1 day

License: MIT license (MIT)

Items used in this project

Hardware components

Raspberry Pi Rgb-led-matrix Expansion Module Raspberry Pi Rgb-led-matrix Expansion Module x 1
Grove - Solid State Relay Grove - Solid State Relay x 1
Arduino Leonardo Eth Arduino Leonardo Eth x 1
Electric strike Electric strike https://en.wikipedia.org/wiki/Electric_strike x 1
NXP MFRC522 based RFID module NXP MFRC522 based RFID module x 1

Story

This is my first Arduino project, I had this idea for some time and finally took the time to make it real. I am a web developer that is used to interpreted languages, it was really nice to try something different and learn C / C++.

Coding was really straight forward, thanks to this amazing RFID library: https://github.com/miguelbalboa/rfid

The outcome is what you can see here:

I had to modify the frame of the door to house the electric strike, which was one of the biggest challenges, since I don't really have much experience with woodworking. But everything went well!

Software

The system was based on this great example: AccessControl.ino. It uses the microcontroller's EEPROM to store RFID IDs.

The first time it runs, the user has to scan a master card / tag that it's going to later be used to add or remove cards / tags. Resulting in the following flow:

  1. ╔═══════════╗
  2. ║ CARD READ ║
  3. ╚═════╤═════╝
  4. ╭──────┴──────╮
  5. ✕ ╭───┤ MASTER CARD ├───╮ ✓
  6. │ ╰─────────────╯ │
  7. ╭───┴───╮ ╭───┴───╮
  8. │ KNOWN │ │ FLIP │
  9. ✕ ╭──────┤ CARD? ├──────╮ ✓ │ ADMIN │
  10. │ ╰───────╯ │ │ MODE │
  11. ╭───┴───╮ ╭───┴───╮ ╰───────╯
  12. │ ADMIN │ │ ADMIN │
  13. ✕ ╭─┤ MODE? ├─╮ ✓ ✕ ╭─┤ MODE? ├─╮ ✓
  14. │ ╰───────╯ │ │ ╰───────╯ │
  15. ╭───┴────╮ ╭────┴──╮ ╭───┴────╮ ╭────┴───╮
  16. │ DENY │ │ STORE │ │ ALLOW │ │ REMOVE │
  17. │ ACCESS │ │ CARD │ │ ACCESS │ │ CARD │
  18. ╰────────╯ ╰───────╯ ╰────────╯ ╰────────╯

Schematics, diagrams and documents

Fritzing project

Breadboard image

Code

GitHub

Credits

Photo of gibatronic

gibatronic

Programmer, cyclist and beer lover from Brazil ??

   

Leave your feedback...