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, TOO MUCH RIGHT!?? Well a friend and I have decided to make a system that would cost under $100 and could do even more than just access a door, so this is what we came up with. A internet enabled arduino rfid tag reader. that for $20 more can open doors. This system was designed to track students at our highschool and we hope the school approves it. Some of the information on this post is similar to another post I did which is here.
Newly upgraded, our new system runs twice as fast as our old one and is wireless.
Before we Begin (Necessary)
Before we can start scanning cards and sending them to our TCP server we need some libraries, Asuming you already installed the Linkit Ones SDK...
Get MFRC522 here.
- Linkit One
- MFRC522 with MAIFARE cards
- Jumper wires (Male to Female)
- Wireless antenna
- RGB LED
- 5V greater than 600 mileamp AC-DC converter or just COM USB
Remember the Linkit one GPIO are only 3v so our Card scanner (3v) will work fin
- Look up online for the pinout of your board to find the SPI setup(Change values below)
- Connect Linkit pin 12 (MISO) to rfid MISO
- Connect Linkit pin 11 (MOSI) to rfid MOSI
- Connect Linkit pin 13 (SCK) to rfid SCK
- Connect Linkit pin 9 to rfid RST pin
- Connect Linkit pin 8 to rfid SSN
- Connect Linkit pin 5 to green led, 4 to blue and 3 to red
- Connect your AC to DC to the + and - on your breadboard or just plug in usb
- Connect RFID to Linkit 3v and Ground
- Wire VCC pin on LED to the Linkit 3v or ac-dc 3v
- Plug USB cable from computer to Linkit(Just to program)
- Connect computer to same network
- Make sure you select the debug port on the Linkit one(Try device manager)
Modify code to fit your needs
- The code is pretty well commented so you can just go in and modify certain parts but one thing for sure is the ehternet module
- What's nice about the Linkit one vs the arduino nano and ethernet shield it handles DHCP for you so we just need to call LWiFi.connect();
- Everything is in Define so you can handle this part yourself easily
Running the code
- Plug AC-DC power to the wall
- Make sure your Linkit is currently connected to the computer
- Make sure both device are on the same network
- Flash your modified Linkit code or if the one I have works for you then great(Almost no chance you will have to modify it)
- Start your Python, C# script or whatever TCP server on your network
- Restart your Linkit to be safe and connect to the Modem port
- 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
- Remember what the lights means Purple/fading red means booting up
- Red means any error such as the card was at a weird angle and/or the server didn't respond in time
- Green means pass so the server responded with a go and you can read your next card
- Blue means waiting/loading waiting for a card or response remember purple is Serial/bootup and blue is waiting for card
- If your Linkit 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 Linkit doesn't have enough power and/or computer are not on the same network.
If your Linkit keeps lagging out then try these tricks to fix them
Turn off windows firewall
- go into advanced firewall settings and allow inbound/outbound port 8080
- port forward you router to your computer with port 8080
- If you are wireless connect the Linkit straight into the router and your computer to the same one
- Buy a more heavy duty AC-DC power adapter
Else maybe you input your ip address or connecting address wrong
Either than that contact me at firstname.lastname@example.org if there are any problems
- YOU'RE GOOD TO GO!!!
- SCHEMATICS ARE BELOW!!!!
Remember to be careful with the electrical devices because the Linkit one is not cheap and I'm not responsible if you burn yours because you don't know what your doing.