Hi! I'm new to this and will be making this in the hopefully near future! If you could please make a video on the card itself and how to set your own ID code and make it yourself that would be amazing!
Code and 3d print files no longer available? I've started to tinker around with projects like these and would love to play with this, please help 🙏 🙂 scratch that I should've read the description better you sir are a Saint.
I like your design. Have you considered adding a keypad to this? A concept in security is 'something you have - the RFID tag, and something you know - a passcode'
Thanks PyroRob69. Yes, a keypad would be a nice addition. You'd have to get rid of the LEDs then though as there aren't enough IO pins for both. There are only 6 spare and you'd need 8 for the keypad.
@@MichaelKlements Unless the LCD was using I2C. Also, with the LCD, you could use single char's to do the same thing as your LED's do. You can place any char you want, in any place you want on that display.
Yes, an I2C LCD display would be a nice addition as well. You could then add the card/tag owners name to be displayed when a valid card/tag is read as well.
@@MichaelKlements I have found two I2C devices that would allow you to use a standard keypad with. One already has a keypad library written for it, but the other would require you to use bit banging and the Wire library. On the upside, the one that requires the Wire library can handle 16 pins instead of just 8, therefore you could control both the keypad and the RFID scanner with one I2C adapter.
Here is the one for 16 pins, and it uses the standard MCP23017 chip - www.amazon.com/Waveshare-MCP23017-Expansion-Interface-Expands/dp/B07P2H1NZG/ The other that someone has already written a library for is www.amazon.com/gp/product/B01ICN5JB6/
I'm new to this. i have watched some instructional videos including yours. this one was perfect. from what i have picked up, I'm a little stumped here now. how would one go about adding a push button to this circuit to cycle the servo motor separate from the RFID reader control?
You'd just need to add a pushbutton onto one of the Arduinos digital inputs and add a condition to the main loop in the code to move the servo if the pushbutton is on or off. The Arduino can choose to override the RFID input.
@@MichaelKlements could you also put a delay and re-lock the device after a set amount of time? I am looking at using this to keep my dog out but allow the cat to go through a door.
When I open the Serial monitor and place the card near the scanner, nothing comes up as if the card isn't there. I'm using the cards that came with my RFID scanner and everything is hooked up correctly. Not sure why it isn't working.
Hi, great video! But i have an issue with reading the card. I checked the wiring so many times, I bought six of those RC522's, and none of them work. When I connect the Arduino to the RC522 and open the Serial Monitor, I get the message: "Firmware Version: 0x92 = v2.0" When I unplug the RC522 and run the serial monitor, I get the message: "Firmware Version: 0x0 = (unknown) WARNING: Communication failure, is the MFRC522 properly connected?" So this means the connection between the Arduino and the RC522 works, but still, with 6 different RC522's, I get absolutely nothing out of it. Maybe the code is not relevant anymore? I don't know what to do, I've already struggled for three days with this problem...
Hi, where did you get the metal arm to attach to the servo? Or did you make it yourself? If so, do you have any resources that you could point me towards for making one? Thanks, video was super helpful!
Hi again! I just bought a similar Rfid module, should the pins be soldered? It seems firm in the video, I tried to do this project and it did not work in my 1st try.
Great video brother! I wanna program a turnstile gate, any idea where i can find more info or help or...? Am really lost and idk what to do or where i should start looking
hi, i just build this and plugged everything in correctly i assume, because all the lights on everything are on but when i try to upload the code i get this message "RFID_Door_Lock:6:10: fatal error: RFID.h: No such file or directory #include ^~~~~~~~ compilation terminated. exit status 1" and I wanted to know how to fix it? i looked at your build through page and i cant seem to figure out what I need to do to fix it... could you help me figure it out?
Can u help me please I’m getting an error code for the rfid part iv done everything I’m supposed I just can’t figure out why it won’t work I plug it all in the rfid chip thing lights up an nothing happends then I try to upload an it saying failed any help or suggestions would be amazing
It depends on whether you want it to be secure on the inside as well. Most places would just have a push button on the inside to open the lock again. This lock stays open until you scan the tag again and then locks. So you lock and unlock it from the outside.
@@MichaelKlements Thank you! is it always safe to use 9V battery and connect it to the barrel jack of the arduino? I sometimes worry that some components might burn. Sorry I am new to this.
@@MichaelKlements And how would I know if it is not safe. I always worry that some parts such as led or rfid scanner would broke if I do a wrong power supply voltage.
As long as it's a 7-12V battery it'll be fine to connect to your Arduino's barrel jack. The Arduino regulates the voltage to 3.3V and 5V, just make sure that your sensor is connected to the correct supply voltage. Most (almost all) sensors that are made for tinkering with electronics are 5V compatible, there are however a few that run on 3.3V but will say so in the datasheet.
@@MichaelKlements Update: I tried connecting to to a 9V through the arduino jack but weird stuff keeps happening. When I scan the rfid with access, the led lights keeps on flashing and servo motor keeps on moving. But all seems well if it is connected to the computer.
I don't think the RFID sensor can detect anything other than an RFID tag, so anything that is an RFID tag that isn't registered flashes red but anything else will just go undetected.
@@MichaelKlements Quite right, it would need a different setup with a presence sensor or something. I thought it could also help debug the setup, as I see that some people who tried it got zero LED or feedback, but then, there is no limit on improving this kind of setup, people who add a presence sensor would then want to add a camera to snap the unchipped intruder, then a buzzer to scare them away, etc. 😁
dude i have this same problem where in the code, it says that on the " //Wait for a tag to be placed near the reader: section, exit status 1 'class RFID' has no member named 'findCard'; did you mean 'isCard'? and if i change it to isCard, it still gives me errors, bro please update the code or give a fix cos its soooo annoying.
Are the leds necessary and is there a premade lock design like the one used that could just be loaded onto the build plate? Also what kind of filament would be recommended? This is for a school project so if anybody has answers that would be great if you could share them 🫶 thank you
Hello Michael , I would like to use this for one of my private lockers. The thing is that I want just the RFID board to be visible and on the outside of the door. How can i make sure that once the battery runs out it will not lock itself and that's it? Can i do it somehow?
I presume that it would be locked most of the time? Meaning that the battery would most likely run out while it is locked? You could either program in a voltage monitor which automatically unlocks and won’t re-lock if the battery gets low. Or a better option would be to put a tiny switch or push button on the outside as well which connects a backup battery when turned on. This backup battery only needs to be big enough to power up and unlock the door once. Some smart door locks which require power to actuate have small terminals for a 9V battery on the outside under a cover plate which can be accessed if the battery dies while locked.
Hello! I got an error when trying to verify it. It says "RFID.h: No such file or directory". I haven't attached my arduino yet to the pc. What can I do to fix this?
Hi, thanks for making this video. I have a question, the tag doesn't seem to work, and I'm pretty sure the wires are correct because I checked a lot. Also there is a light on the RFID sensor so I think that's connected good too. And the code doesn't give any errors. The LED's don't do anything, but I don't know if that is just because the tag isn't working. Maybe I am really stupid and there is something obvious I was supposed to change in the code or in the wires to adjust it for a reason I don't know. I'm still pretty new to arduino so I still really hope there is an obvious solution. Hope you have time to help.
Hi Linde, You shouldn't need to change anything in the code if you've wired it as per the diagram and you're using the same component. The LEDs should come on sequentially like in the video when you power it up, if this isn't happening then you've either got wiring problems to the LEDs or the SPI communication to the RFID sensor is failing - most likely because it's not connected correctly. Also try opening up the Serial monitor, does it display "Place card/tag near reader...", indicating that it's run through the setup function?
@@MichaelKlements Hi, I think the hardware is now correct, because when I open the SerialNumberRead he does recognise my tag and I can read the serial number. But then when I open the serial monitor in the final code, and I scan my tag it doesn't seem to recognise it at all. I am still a beginner so if there is an obvious thing I was suppossed to do that you didn't say I had to change in the code, I probably haven't done it. The only thing I now have changed are the serial numbers to grant acces to and I have added the library. Any idea why he does recognise the tag in the SerialNumberRead but not in the final RFID code? I also don't get a green LED light and nothing moves or happenes when I scan the tag.
@@phoenixtrimpe961 It still didn't work, I don't know what is wrong, I kind of gave up, I will look at it again next week, if I find something I'll let you know
I'm wondering if I can use this to diy a pet door so it will lock when my cat goes near it? How close does the tag need to be to the sensor for it to read? And is there a way to make it so the lock stays open but when the tag is within a specific distance it will stay locked until the tag leaves the sensor range? Of course, making the locked position the default would also work if I put the tag on the dog, but that still leaves the question of how close it has to be to the sensor?
Hi Elizabeth, You could certainly do what you’ve described with an RFID tag, but these particular ones need to be quite close to be read. Probably closer than what a pet would be able to get it unless you could figure out how to hang it so that it came within about 2-3cm from the read when the cat tries to go through the door. Different tags work on different frequencies and offer longer or shorter reading distances. The ones on credit cards for example need to be really close while ones used in vehicle tags can be read from around 5-10m away.
@@MichaelKlements awesome! I was starting to lose hope after doing some more research (I don't have any kind of experiencewith this kind of thing, but I do research for a living so I'm pretty determined to figure it out lol), but I'll look into the other types you mentioned! Thanks!
Mejn you make good tutorials and its beatiful that you put the zip files and the code in the description can you make a video with the wemos d1 the homeautomation? I would like it to try it myself but im a beginner
I’ve never tried making anything with the Wemos D1, but I’ll look into it. On board WiFi would definitely make for some interesting home automation projects.
There are a number of different RFID frequencies and protocols and they're not all compatible with one and other. You could probably find a sensor which would enable you to read NFC tags from your phone, but its quite unlikely that you'd be able to do that with this sensor.
i downloaded your code but when i try and run it, it says, "(library file) RFID/RFID.h:22:10: fatal error: 'SoftwareSerial.h' file not found #include ".
Each card has a unique ID. There is a way to reflash their ID numbers, but it is quite complicated. It’s preferred to be able to identify which of the cards unlocked the system.
Hi sir, I have done all of the wiring properly but in the serial monitor it only shows 'Place card/tag near reader...' when I'm literally placing my card on the sensor. Is the problem on the card or the hardware that I am using?
@@MichaelKlements yes i am using the card and tag that came with the reader, i have even tried using other card hoping that it would work but it still doesn't read the card
To who ever is using an arduino uno r3 and is experiencing problems with the card reader. Plug the rst pin which is on the sensor to the 5th pin on the arduino
Each RFID tag has it's own unique ID number. You'll scan the tag on your RFID reader with the Serial monitor open and it'll display the tag number for you. You can then add the tag to your list of allowable tags to grant access to the new tag.
Is there any different between arduino uno? And also if I used different arduino can the code be use? The arduino in your link has sold out, I’m not sure if i found the same one.
Generally speaking, all Arduino Uno's are made to the same specification, so should be compatible with each other. Some companies do add or remove features, but the pin numbers, layout and general functionality should be the same. Yes, you can use a different Arduino, just make sure that it still has enough IO pins and operates at the same voltage. Thank you, I've updated the link to one which is still available.
@@MichaelKlements hi thanks for your reply, do you have the schematic diagram of this circuit? I'm doing this as my school project, but I don't know how to create a schematic diagram.
I haven't gotten around to drawing up a schematic, I've only done the breadboard layout. You could probably put something together quite quickly using Fritzing
I am new to all of this (arduino) and I am trying to get it to work I have checked the connections and download the code 3 times even copied it by hand once but i cant find nothing wrong. Is there a change in the code or the wiring required?thx.
There are a number of reasons why this might not be working. What part is not working? Are you getting text on your serial monitor? Are the LEDs coming on?
hi, i want to develop the locking system in the laptop trolley for our college . So, department get update who's are using it and what time they are using it. So is it possible to do with our stuff ID card. Thanks
If you can find an RFID module that works with your staff ID card then you could probably make something similar. Some RFID systems are open source and some aren't.
Hi, I just wanted to ask. I am building this lock soon but I wanted to know how you set the servo miter in the code to automatically lock after 3 secs. Thanks.
You'd need to make a few changes. Add a 3 second delay to the code after the servo opening movement, then move the servo to the closed position again. And you'd need to remove the logic which closes the lock on a tag read so that it only opens the lock.
You'll need to be able to do some programming to build this, it's not just a plug and play solution. You'll need to edit the code to add your cards/tags and adjust servo set points etc..
hello Michael i have been trying to do this project but i only keep getting the place card/tag near reader message. The card and tag came with the kit I have the elegoo mega2560.how can i solve this problem pls reply.
Hi Jesus, If you're not getting any response on the serial monitor then there's most likely a communication problem with the reader. Check your connections again and make sure that they're connected to the correct pins. Is the LED on the reader coming on?
@@MichaelKlementsWhat battery would you recommend for it to last up to a week or more? Am looking to add a voltage sensor to set a low battery indicator with a buzzer as an alarm but I need it to last for atleast a week or more
You'd need a fairly large battery, something like a 7Ah lead acid or a 10,000mAh LiPo. If you're trying to build a long lasting battery powered project then an Arduino Uno is the wrong board to be using, you'd be better off with an Arduino Pro Mini or ESP32 as these use far less power.
Hey Michael. The video has been pretty helpful but I am still confused. I wired the whole thing exactly how you have it and ran the exact same code. The LEDs go through their start-up flash sequence and then the Serial Monitor displays the Place Card message, yet when I place my card near the reader, nothing happens. I am using the same tags that came with the reader, and the reader is the exact same one you have. I ordered it through the link in the description. I just bought the reader yesterday so it is not old or anything, and it should be working properly. Please help! I also emailed you.
This is most likely a communication issue between the RFID sensor and your Arduino. Check the wiring between the two - the LEDs and text being displayed are independent of the communication link so will be displayed regardless of whether the Arduino was able to connect with the sensor or not.
libraries\RFID\RFID.cpp.o (symbol from plugin): In function `RFID::RFID(int, int)': (.text+0x0): multiple definition of `RFID::RFID(int, int) How do i fix?
If you're card doesn't show up in the serial monitor then it's either not able to be read by the RFID sensor or you've got a wiring problem and the sensor isn't communicating with the Arduino.