Project Description

Have you ever thought of adding an RFID tags/card security system or monitoring system in your home and/or office. Well if you got here i bet you already looked up how freaken expensive they are ranging from $200 to $2000. It is too much.

Now, let’s make a system that would cost under $100 and could do even more than just access a door. A internet enabled arduino rfid tag reader. that for $20 more can open doors.

 

Here is the prototype:

Before we Begin (Necessary)

Before we can start scanning cards and sending them to our Telnet/TCP server we need some libraries Get UIPEthernet here; https://github.com/ntruchsess/arduino_uip

get MFRC522 here; https://github.com/miguelbalboa/rfid

Put both of these libraries in Program Files(x86)/Arduino/Libraries/ Restart arduino

Hardware

  1. Arduino Nano (You can always modify your code to fit your device)
  2. MFRC522 with MAIFARE cards
  3. Jumper wires (Male to Male) (Male to Female)
  4. enc28j60 ethernet module/sheild
  5. RGB LED
  6. 3V OR 5V greater than 700 mileamp AC-DC converter

Setup

  1. Attach arduino to breadboard (If nano or micro)
  2. Look up online for the pinout of your board to find the SPI setup(Change values below)
  3. Connect arduino pin 10 (SS) to ethernet module ss or CS
  4. Connect arduino pin 12 (MISO) to rfid MISO and ethernet SO
  5. Connect arduino pin 11 (MOSI) to rfid MOSI and ethernet SI
  6. Connect arduino pin 13 (SCK) to rfid SCK and ethernet SCK
  7. Connect arduino pin 9 to rfid RST pin
  8. Connect arduino pin 8 to rfid SSN
  9. Connect arduino pin 5 to green led, 4 to blue and 3 to red
  10. Connect your AC to DC to the + and – on your breadboard
  11. Ground your arduino to the ac to dc
  12. Connect VCC and GND on both rfid and ethernet to the ac-dc (REMEMBER THESE DEVICES ARE ONLY 3v!!!!! do not supply 5v) If problem use resistors to bring the voltage to 3v
  13. Wire VCC pin on LED to the arduino 3v or ac-dc 3v
  14. Connect ethernet cable to module and make sure it is on the same network as your computer
  15. Plug USB cable from computer to arduino
  16. Connect computer to same network

 

Running the code

  1. Plug AC-DC power to the wall
  2. Make sure your arduino is currently connected to the computer
  3. Make sure both device are on the same network
  4. Flash your modified arduino code or if the one I have works for you then great(Almost no chance you will have to modify it)
  5. Start your Python, C++ script or whatever Telnet/TCP server on your network
  6. Restart your arduino to be safe
  7. Wait until the light turns blue and try scanning a card, if your server got the ID of the card then your ready to go
  8. Remember what the lights means Purple/fading red means booting up
  9. Red means any error such as the card was at a weird angle and/or the server didn’t respond in time
  10. Green means pass so the server responded with a go and you can read your next card
  11. Blue means waiting/loading waiting for a card or response
  12. If your arduino starts to lag out and takes over 30 seconds to show a red light means that the arduino ethernet module couldn’t connect to the server at all. This could be caused by multiple things first your arduino doesn’t have enough power and the arduino ethernet module is struggeling to send a packet or that your computer server isn’t running or that your arduino and computer are not on the same network.
  13. If your arduino keeps lagging out then try these tricks to fix them
  14. Turn off windows firewall
  15. go into advanced firewall settings and allow inbound/outbound port 23
  16. port forward you router to your computer with port 23
  17. If you are wireless connect the arduino straight into the router and your computer to the same one
  18. Buy a more heavy duty AC-DC power adapter
  19. Else maybe you input your ip address or connecting address wrong

 

Schematics : https://halckemy.s3.amazonaws.com/uploads/image_file/file/54198/Wiring%20diagram.png

Code : https://create.arduino.cc/code_files/23722/download

Github : https://github.com/smerkousdavid/InternetRFIDTags

Blog : https://create.arduino.cc/projecthub/smerkousdavid/arduino-ethernet-rfid-card-reader-1ffdee?ref=search&ref_id=ethernet&offset=0