I am relatively new to arduino and i want to build a box that has a lock on it that unlocks from within when an RFID tag is placed near it. This box would not be very large and the lock wouldn't be super heavy duty (think something sort of like a lock you keep on a diary).
I have never worked with RFID before but i assume it is the correct thing to use for this (i dont know much about near field communication, and bluetooth requires a lot more coding i think that for what is necessary).
I don't exactly know how to get started though, what would i have to buy to get the arduino to work with RFIDs? And how do i get the arduino to interface with a lock? Where is a good place to buy parts for RFID stuff and instructions/tutorials on assembly?
One question i have is, when my project is finished, do i have to give up an arduino to keep the project? I hear there is a way to burn the program onto a chip and somehow connect its outputs so that instead of using up an arduino ever time you finish a project and want to keep it you just have to buy a chip (or a chip and some other components) and solder those together and burn the device. Is there any articles i can read on how to do this? And how would i connect the RFID stuff to this chip?
The Arduino is really just a breakout board for an Atmel AVR microcontroller, that includes a few things to make it simpler to use. A USB to serial TTL chip, voltage regulator, clock crystal, reset button.
Several use the '328, you can buy them with the Arduino bootloader already installed and connect a USB to serial TTL temporarily to program it.
polymorph:
The Arduino is really just a breakout board for an Atmel AVR microcontroller, that includes a few things to make it simpler to use. A USB to serial TTL chip, voltage regulator, clock crystal, reset button.
Several use the '328, you can buy them with the Arduino bootloader already installed and connect a USB to serial TTL temporarily to program it.
Have you searched for "rfid arduino"? There are a lot of projects out there. Some better than others.
after some research i have answered a lot of my questions, except one still lingers. Just as you can make a standalone or "breadboard" arduino to control the project once i am finished with it for good, how do i connect an RFID reader/writer without using up the shield? Just as the arduino is basically a breakout board for the Atmel AVR isn't the RFID arduino shield just a breakout for an RFID reader/writer? Do they also make chips that can be connected to standalone arduinos so i dont have to use up the shield?
Another question that i have is whether or not its possible to detect two separate RFID tags at the same time? Lets say i wanted to make a box that only opens if two different tags are present near the lock on the box at the same time, is that possible? Or will i run into an issue where the arduino identifies one and then when trying to read the other it accidentally reads the first one again?
Sure, the EM-18 or the ID-12 module, but they aren't cheap. Or there is even a circuit for an RFID reader you can build yourself using a couple of sections of a quad LM324 Op Amp and a few more parts. You'll have to do some work building it and wind a coil, but should be pretty cheap. The LM358 is a dual Op Amp version of the LM324. Let me look that up, it is here on the Arduino.cc site:
No, it can't read two at once. You'd have to have the tags separated by at least a short distance, and kind of sweep them past the reader. Otherwise, either the closest will only be read, or neither will be read as they interfere with each other. Passive tags don't have any anti-collision in them.
polymorph:
Sure, the EM-18 or the ID-12 module, but they aren't cheap. Or there is even a circuit for an RFID reader you can build yourself using a couple of sections of a quad LM324 Op Amp and a few more parts. You'll have to do some work building it and wind a coil, but should be pretty cheap. The LM358 is a dual Op Amp version of the LM324. Let me look that up, it is here on the Arduino.cc site:
No, it can't read two at once. You'd have to have the tags separated by at least a short distance, and kind of sweep them past the reader. Otherwise, either the closest will only be read, or neither will be read as they interfere with each other. Passive tags don't have any anti-collision in them.
I am a little confused because that page you links walks through creating your own RFID reader/writer, but then how do i know it will be compatible with the code i have written for my Mifare rc5222 shield?
The chip alone is available from Digikey for over $6 each, not dropping appreciably until you get into the thousands. Cheaper just to source the board above.
The chip alone is available from Digikey for over $6 each, not dropping appreciably until you get into the thousands. Cheaper just to source the board above.
Now i just need to find decent libraries for this board and learn how to program it... Apparently the documentation for this particular board is sub par.
Now i just need to find decent libraries for this board and learn how to program it... Apparently the documentation for this particular board is sub par.
I'm confused. Earlier you said:
.... the code i have written for my Mifare rc5222 shield?
Now i just need to find decent libraries for this board and learn how to program it... Apparently the documentation for this particular board is sub par.
I'm confused. Earlier you said:
.... the code i have written for my Mifare rc5222 shield?
I must have missed something.
I meant to say, hypothetically, if i write code that works on my mifare rc522 and then im done with the project and need to transfer it to a permanent space using a standalone arduino and a non-shield RFID reader/writer, how do i know my code will still work if i don't use the same reader/writer?
I answered my own question through some more research, and the answer is that it simply won't work ( i believe) as each RFID reader/writer chip uses a different protocol for sending/receiving data i believe. Correct me if i am incorrect.
Well... if you use a Mifare RC522 chip/board such as those I linked, it is the same thing. The shields are very often just breakout boards with convenient connections to an Arduino. A schematic should be available.
Now if you change from 13.56MHz RFID to some other frequency/protocol, then it will likely require some changes to your code. But shield or not, the chips are what matter.
i have a rc522 rfid reader / writer but nothing comes up on serial monitor i think its the spi as its coming up in red text (include line) any ideas anyone?