RFID access control

I have two separate rfid projects on separate arduino, the first project requires 2 minutes of contact between the tag and the reader after which it turns the LED on. the second project is a simple rfid access control, but on this access can only be granted if the conditions on the first tag were met. I am trying to use SPI for this but do not know if it would work, any suggestions on any other way of communication between two arduino boards?

  • You can use SIMPLE GPIO for this. If set GPIO in ARDUINO1 when condition is matched and MONITOR its level on ARDUINO2 to grant access.
    – Vaibhav
    Apr 20 '19 at 10:05
  • is it possible that you have some sort of an example since I am a beginner
    – Ayat.H
    Apr 20 '19 at 10:08
  • why two Arduinos for a so simple task?
    – Juraj
    Apr 20 '19 at 10:16
  • Sure it is possible. Have you tried it? If yes, you can ask a question about it and include the code, so that we can help you. With this question the answer is simply: yes, it is possible. But this will not help you implementing it
    – chrisl
    Apr 21 '19 at 19:12

Its very easy.

  1. Set one PIN of ARDUINO as ouput pin. You will write that PIN HIGH when your conditions are matched in ARDUINO1 then SET LOW after 1 mS.
  2. Connect that PIN of ARDUINO1 to external Interrupt PIN of ARDUINO2.
  3. Write a CODE for ARDUINO2 such that when EXTERNAL INTERRUPT OCCURS it will set variable high indicating that Conditions is Matched in ARDUINO1.
  4. While providing access to on ARDUNO2 check that variable status if it is HIGH grant access and SET it LOW.

This is the basic Structure you can follow using interrrupt.

  • how would it know that is the same card?
    – Juraj
    Apr 20 '19 at 10:17
  • Yeah in that case you can have UART for sending the CARD ID to ARDUINO2 also. But in that case there no need of using two ARDUINO Setup. If you are scanning and matching in ONE SETUP, then why you are SCANNING and Matching it Again in another setup. Else if SETUP1 is used to store the CARD ID In database and SETUP2 is used to provide access to that CARD ID based on that database.
    – Vaibhav
    Apr 20 '19 at 10:25
  • how can I connect 2 rfid modules on one Arduino board
    – Ayat.H
    Apr 20 '19 at 10:53
  • Why you need two RFID Modules?
    – Vaibhav
    Apr 20 '19 at 10:54
  • also once I have them on the same board do i have to do only GPIO connections or GPIO and UART
    – Ayat.H
    Apr 20 '19 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.