Create a simple electronic lock with RFID using a RC522 - Anything Arduino ep 13

Поділитися
Вставка
  • Опубліковано 25 січ 2025

КОМЕНТАРІ •

  • @itzrobertho
    @itzrobertho 3 роки тому +1

    2020 and still the only person that has posted what I was looking for

  • @BeardedMan
    @BeardedMan 8 років тому +6

    After watching dozens of videos on RfID locks, this one is by far the best! Thank you for this, very informative and easy to follow :). keep it up!

    •  8 років тому +3

      "No no no... Thank YOU!" :) Your encouragement is very much appreciated.

    • @anonymousVSnwo
      @anonymousVSnwo 8 років тому

      totally agree with BeardedMan

  • @jonykolman4238
    @jonykolman4238 8 років тому +3

    I watched so many videos and finally I got what I want from yours,
    thank you so so much!!!!
    so clear and helpful!!!!!!

  • @RadioTrefoil
    @RadioTrefoil 8 років тому

    You're actually a hero man. Best and most useful RFID tutorial on UA-cam. Well done and thanks a lot!

    •  8 років тому

      Thank you for your kind words! :)

  • @tankh4004
    @tankh4004 7 років тому

    I had viewed a number of videos on Arduino and RFID.
    Your is best because I followed closely and able to get what your trying to bring across.
    Thank a lot for the effort you had put in. Keep it up!!!

    •  7 років тому

      Thank you, I will ;)

  • @f_u_n_e_r_a_l
    @f_u_n_e_r_a_l 8 років тому +2

    Master! Best RC522 tutorial I have found on the internet, keep it going man

  • @mortenloftesnes540
    @mortenloftesnes540 7 років тому

    Hi! :D
    Great tutorial, works perfectly!!!!!
    I'm a beginner with arduino and coding, but with your tutorial, Jiran and a lot of trying and failing I have made a version of my own. With 20x4 LCD, buzzer and relay.
    You made me learn a lot more about code, and then I was able to make a code.
    Keep up the good work!

    •  7 років тому

      That is great to hear! Please share your work, I know there are many in the comments that want to implement a LCD display aswell... :)

    • @mortenloftesnes540
      @mortenloftesnes540 7 років тому

      Kristian Blåsol -Kan i put a link here or can people just click on my "name"?
      Where are you from?
      Jeg ser at du har "å" i navnet ditt :p

  • @gussblog7278
    @gussblog7278 8 років тому

    THANK YOU SO MUCH KRISTIAN FOR THESE PROJECT ATLAST I GOT WORKING WITH MY PROJECT ALSO BY USING YOUR CODE AND FOLLOW CAREFULLY NOW ALSO WORKING THE TWO CARDS I HAVE YOUR VIDEO ITS REALLY HELPFUL GOD BLESS AND MORE PROJECT PLEASE...

    •  8 років тому

      Thank you for your kind words :) More projects are coming... (sometime... soon)... :)

  • @reggielaw254
    @reggielaw254 8 років тому +1

    This is exactly what I was looking for! Thank you!

  • @BobJones-sn5vc
    @BobJones-sn5vc 6 років тому

    Thank you for posting this great video. Was able to make the modifications I needed to the sketch you provided and everything is working perfectly. Thanks again!!!! Liked and subscribed.

    •  6 років тому

      That is great to hear! Always happy when I can help someone :)

  • @truckzone9821
    @truckzone9821 5 років тому

    What if I need to fix something like that in truck 24 volt any suggestions

    •  5 років тому

      Sure, just switch 24 volts over the relay instead of the 12volts. Just make sure the relay you use can handle the voltage and amperage of your device.

    • @truckzone9821
      @truckzone9821 5 років тому

      @
      Thanx so much bro ❤️

  • @pijushdutta7432
    @pijushdutta7432 7 років тому

    sir i can get a led LOW when i continuously put a tag on the reader..but i want led to HIGH when i remove the tag from the reader..sir can u give me that particular code??

  • @BrachioMentis
    @BrachioMentis 9 років тому

    A suggestion to simplify adding ID to the sketch would be to save an array of OK ID.
    If you want to elaborate this you can make an array with ID and calling functions. This way reduces the size of the sketch and also makes it simpler to add ID.

    •  9 років тому

      +BrachioMentis Thanks! Great way to make the code smaller aswell... Something for +Tatjana Hiljadnikova maybe?

  • @robvansuilen
    @robvansuilen 9 років тому

    code is not working for me. in the serial monitor the code of my card is shown (i did change rfid_1 to the uid of my card!). but pin 7 doesn't go high. any ideas?

  • @HeathenHacks
    @HeathenHacks 6 років тому +1

    Thank you so much! I'll make sure to include your video on my upcoming one. Thanks again! :D

  • @mahmud09hussain
    @mahmud09hussain 9 років тому +1

    hello! the code doesn't seem to work as the LED does not light up! any reason to why this may happen?

  • @kristineshell7123
    @kristineshell7123 7 років тому

    Thanks for sharing this Video. It's very helpful. What is the purpose of using solenoid and relay in this circuit? Can't we connect the servo motor directly to the arduino pins and work with the same process?

    •  7 років тому

      Yes ofcourse you can use only the servo. I showed off two different ways to implement a lock. One with linear action and one with rotational action... So by all means, just use one of the mechanisms... :)

  • @corerouterbgp7758
    @corerouterbgp7758 8 років тому

    i would like to see a full tutorial or a picture how the final system is all hooked up

    •  8 років тому

      This was only a proof of concept, I havent built a full lock yet. However, this tutorial shows a few ways to interact with normal "standard" locks found on doors etc.

  • @kyanhauto830
    @kyanhauto830 8 років тому

    could you tell me, which website can buy this solenoid?
    because, VIETNAM don't have this solenoid.

  • @mekkibelgacem4561
    @mekkibelgacem4561 8 років тому

    Thank you,
    what is the difference between the blue card tag and the white card tag?

    •  8 років тому

      +mekki belgacem In the video the difference is just the data on the chip and the UID (Unique ID). There are many different frequencies used for RFID, so other cards could have different frequencies aswell. I dont think it is as easy as color coded though ;)

    • @mekkibelgacem4561
      @mekkibelgacem4561 8 років тому

      can i change the UID of blue card tag?

  • @GarrysSketch
    @GarrysSketch 8 років тому

    Possibly dumb question, but where can I get the wires used to connect the reader to the arduino? Thanks

    •  8 років тому

      Ebay is your friend. search for "dupont cables", there are male-to-male, male-to-female and female-to-female versions and packs with all different ones in one. You should be able to get them very cheap.

  • @aswinmohan2790
    @aswinmohan2790 7 років тому

    hey here its howing communication failure is mfrc522 properly connected in the serial monitor pls help i am using a mega and connected properly according to the table shown in the code btw great job

  • @aryanbhatia2193
    @aryanbhatia2193 6 років тому

    Hi Kristian, your video was very helpful to me thanks for it. I want a suggestion from your side, I am working on a project and i want a schematic diagram of the whole circuit including the lock plz if possible?

    •  6 років тому

      There is a companion video showing you how to connect the solenoid to the relay and then the relay to the arduino. This is to shield the arduino from the high current of the solenoid. The link to the video is in the description. Check that. It will help you.

    • @aryanbhatia2193
      @aryanbhatia2193 6 років тому

      @ Thanks a lot

  • @kal-elmulya3657
    @kal-elmulya3657 9 років тому

    hey, what type of solenoid lock did you use? where did you buy? I really need solenoid lock that has a long stroke.

    •  9 років тому

      Kalel Mulya Sorry, but I dont know, it was a "noname" brand from some local shop, I havent found a good replacement either, so when/if you find a good solenoid with a long stroke at a good price, please let me know... :)

  • @francisbutterworth1930
    @francisbutterworth1930 9 років тому

    I have a funduino raid and it will not work can you advise

  • @segadharmawan3431
    @segadharmawan3431 8 років тому

    hi kristian, thanks for your upload. im following your tutorial, but after uploading, in the serial monitor written
    "Firmware Version: 0xEE = (unknown)
    Scan PICC to see UID, SAK, type, and data blocks..."
    and when i scan the card, there's no responds at all. can u help me with this problem?
    im using arduino IDE 1.6.7 on mac
    Arduino UNO and RFID RC522

  • @dyankrizlenrioflorido4104
    @dyankrizlenrioflorido4104 8 років тому

    Hi! How many volts is your relay? Is it 12 V? And what kind of source you used to power the solenoid? Thanks!

    •  8 років тому

      Control voltage is 5V so the arduino can control it, and on the switching side it can handle up to 220V 10A. but it can also handle 9 or 12volts. I dont remember what I used as source power for the solenoid, probably a 9v battery or a 12 volt power supply, both would work.

  • @beroichoberoichev9501
    @beroichoberoichev9501 7 років тому

    Question - What would you do if there is no power and the electricity is cut - for example if i have connected it to the door bell -which is 12V? Can you add backup battery power just in that case and this battery to be used only when the primary electricity circuit is not working. And if that is possible how would you do it(connect it)? :)

    •  7 років тому

      Yes, you could use a battery backup for it, and how to connect it would be totally up to which battery and charging circuitry... Here are two other answers that I wrote to a similar question to yours about what happens when/if the lock malfunctions for any reason (ie. how do you get out or in again)
      1. If that would be an issue I would "turn it all around" and let the door be locked only when there is power to the solenoid for example. That way when there is a electrical mishap, all doors would open. This would however compromise the security from a breaking in point of view. A burglar would only cut the power and then all doors would open... So it is either way :). You could ofcourse have "backdoors" into the system but these could be compromised aswell...
      2. Actually I thought of putting a servo on top of a normal locking cylinder, so the servo could turn the built in lock in the door. And as a failsafe, also use a key in the door... :) That would be a better solution that also has a failsafe...

  • @Jack-sc3dn
    @Jack-sc3dn 6 років тому +1

    Hi Kristian, I am currently working on a college project which requires an RFID but I am struggling to get any to work I started with a RC522 and then tried another one but still nothing. Is it necessary to power the RFID readers through Arduino or can it be done with just an FTDI cable and a power supply?

    •  6 років тому

      You need to translate the signal from the rfid reader to whatever format you need. That is what the arduino does in this video. It takes the data from the reader and then sends it as serial data over usb. By using just an Ftdi cable you need to do the programming/translation in a program on the computer instead.

    • @Jack-sc3dn
      @Jack-sc3dn 6 років тому

      Kristian Blåsol thank you, would PsoC be an option for the computer programme?

  • @jaywon555
    @jaywon555 9 років тому

    G'day Kristian, Great video, very clear and informative, showing all the steps, well done!
    Be great if you could go onto the ESP8266 using the IDE, including making a connector board for it.
    I was going to go with a sparkcore, but this beats it hands down in terms of price and weekend warrior practicality.

    •  9 років тому

      Crackerjack Thanks man! And yes, the ESP8266 is definately on my todolist, I have a whole bunch of them lying here (they were so cheap!)... But I keep getting sidetracked with other interesting things... :)... I have two more projects I "need" to do and then I can get on with the ESP8266... Keep the suggestions coming though, if I ever run out of ideas it is good to have a pool of projects to dig from ;)

  • @JustinMacSkills
    @JustinMacSkills 8 років тому

    We want to use this to make a smart dog door, but we also want to not allow our dog to go out at night. We were thinking using a clock or a light sensor. How would you implement that into the code for this? (I am a beginner with Arduino)

    •  8 років тому

      I get a lot of request for adding other sensors for this project, I cannot easily explain here... I will look into making more instruction videos with the sensors that you wonder about.

  • @opiumw2
    @opiumw2 8 років тому

    Thanks Kristian for the video, its great. I followed your video but i'm having a little problems. The card is read fine and the relay opens and unlocks the door just fine, but after the 2nd or 3rd read, the reader stops working, I have to cycle power the arduino or upload the code again so it can starts reading, but then it does the same thing. It only reads once or twice then it stops working. Any idea what could be causing this?

    •  8 років тому

      +Wilson Does this happen with the example code aswell? Or only with the code made for your project? So if you just load the readcard sketch and open serial monitor, can you read the cards many times then, or only 2-3 times then aswell?

  • @mountainfanatic
    @mountainfanatic 9 років тому

    Kristian, how do you change the string on the card to be used as the authentication to do something? To use something else than in your sketch for example.

    •  9 років тому

      +msevyt Every card/tag has its unique ID-number. This is what we are working with. At around 10:00 I open one of the example sketches that comes with the library "DumpInfo" this program lets you see the ID-nr of the cards you place on the reader. You then just take this ID-number and use in the code. At 13:25 I show how to add more codes to the sketch if you want many tags that can open the door. Hope this helps.

    • @mountainfanatic
      @mountainfanatic 9 років тому

      +Kristian Blåsol Thanks for the explanation. Now I get it, that it is the card uid. At first I though you were reading from some sector or something :)...So every card has its own UID?

    •  9 років тому

      +msevyt Yes correct (although as the numbers arent that long, some overlapping probably occurs)... Also there are cards that can be reprogrammmed, but the simple answer is yes. Every card has its own UID.

    • @atmel9077
      @atmel9077 9 років тому

      You can implement a learning mechanism using the Arduino's EEPROM.

  • @aishwaryaravi1994
    @aishwaryaravi1994 9 років тому

    sir,your video helped me a lot.. but i have a problem .
    Iam only able to read white card not the keychain .. in case i have to read keychain what should i do?
    why only white tag is getting detected not that key chain?

    •  9 років тому +2

      +aishwarya ravi Thank you for your comments. Either the keychain is broken, or it uses a different frequency for the RFID chip. There are many standards for RFID and all chips doesnt work with all readers... Maybe that is the case?

    • @aishwaryaravi1994
      @aishwaryaravi1994 9 років тому +1

      sir, how to identify frequency of RFID chip

    • @atmel9077
      @atmel9077 9 років тому

      +aishwarya ravi If you can't read a tag, place an isolad metal plate at approx. 1cm below the reader. I had two tags that don't worked i tried this and it worked. Bun it appears that some of the keychains provided with the rc522 reader are not working.

  • @thanhngo2688
    @thanhngo2688 9 років тому

    thank you bro, But i made a mistake, i connect pin RST to 5V. is it spoiled?

    • @thanhngo2688
      @thanhngo2688 9 років тому

      and one more thing, first example i follow you every step, But the library
      #include
      #include
      #define RST_PIN 9 //
      #define SS_PIN 10 //
      and this error: DumpInfo.ino:42:21: fatal error: MFRC522.h: No such file or directory
      compilation terminated.
      As i knew, there are 2 libraries in this website. MFRC522 and rfid. and 2 circuit board RFID red and blue. WHat differences ?. THank so much bro

    •  9 років тому

      +Thanh Ngo I dont think it is spoiled because of this no... But only one way to know is if it works once you get the sketch working. As for your sketch not working, did you download the library from this page: github.com/miguelbalboa/rfid and followed the steps in the video? Then it should work. Basically what your error message tells you is that this library cant be found by the Arduino IDE. Also what version of the Arduino software art you using? Hope this helps, let me know if you still have problems...

  • @AyushMandloi
    @AyushMandloi 8 років тому

    pls give the link to download the sketch for servo door opening that u showed

    •  8 років тому +1

      +Ayush Mandloi duinos.net/show/?id=222

    • @AyushMandloi
      @AyushMandloi 8 років тому

      +Kristian Blåsol thanx can i have ur email pls i want to ask some query

  • @greatliar
    @greatliar 9 років тому

    Just curious. What if the lock malfunction? Is there any way to bypass so that you will not locked out? thanks.

    •  9 років тому

      +Mila Sarip If that would be an issue I would "turn it all around" and let the door be locked only when there is power to the solenoid for example. That way when there is a electrical mishap, all doors would open. This would however compromise the security from a breaking in point of view. A burglar would only cut the power and then all doors would open... So it is either way :). You could ofcourse have "backdoors" into the system but these could be compromised aswell...

    • @greatliar
      @greatliar 9 років тому

      +Kristian Blåsol thanks. i guess using solenoid is a better choice for locking system.

    •  9 років тому

      +Mila Sarip Actually I thought of putting a servo on top of a normal locking cylinder, so the servo could turn the built in lock in the door. And as a failsafe, also use a key in the door... :) That would be a better solution that also has a failsafe...

  • @riskungkarim4768
    @riskungkarim4768 8 років тому

    thanks Kristian its great. but i have a question, i need to make simple project like this but i want to add an output like using LCD 16x2 for condition notification text. can you explain the step to use LCD 16x2 in the program, example when the card is doesn't match lcd will notified "THE CARD IS NOT MATCH". i need library for LCD 16x2 or sketch, it will be great project. thanks.

    •  8 років тому

      16x2 lcd displays is on my video-todolist... Unfortunately I cant help you at this moment. There should be other tutorials on youtube though, it is quite commonly used... :) Technically you probably just need to add the library, and then send data to it at the same places that I flash the LED in my sketch...

  • @thecybrknight
    @thecybrknight 9 років тому

    Pls do u have any link to an rfid door lock with data logging

  • @joshcoballes4286
    @joshcoballes4286 7 років тому

    Good day! Can I use this tutorial with an NFC tag? Your answer will be much appreciated.

    •  7 років тому

      I havent tried with NFC-tags... I have bought some, but not tried... So Cant answer your question right now. Sorry...

    • @joshcoballes4286
      @joshcoballes4286 7 років тому

      Okay. I'll just try it myself. Thanks for answering.

    •  7 років тому

      Id love to know what you find out :)

  • @Jack-sc3dn
    @Jack-sc3dn 6 років тому +1

    Can RFID readers work without Arduino or written code? I have tried to get one to work with just a power supply and an FTDI cable?

    •  6 років тому

      There are readers with a USB port that is specifically to be used on their own with a computer or other. They don’t cost that much and technically works like a keyboard which enters the ID of the card as text.

    • @Jack-sc3dn
      @Jack-sc3dn 6 років тому

      Kristian Blåsol thank you!

  • @dejandirgomes7564
    @dejandirgomes7564 7 років тому

    Good afternoon,
    Your project is spectacular, I rebuilt it and it worked perfectly.
    I need to add a condition to a project like this, can you help me?
    Would you like to add a button that when triggered would count a certain time and turn off the relay?

    •  7 років тому +1

      Thank you for your kind words :) This is quite simple to accomplish I think. First you need to make the relay only open the lock, so remove the delay(2000); and the digitalWrite(lock,LOW); lines, so you only open the lock when callen the open_lock function. Then you make a new function that you call close_lock, where you just add the digitalWrite(lock,LOW); line.
      And then you just do an if check in the void loop, where you check if a button is pressed or not, if it is pressed call the close_lock function.
      Easy peasy ;) Hope it works, and let me know how it went, and share a video so we all can see how it went :) Take care!

    • @dejandirgomes7564
      @dejandirgomes7564 7 років тому

      OK,
      I'll try it here.
      I should take a little while to be a beginner and not have mastery over programming.
      As soon as I get stationed here.
      Sorry for translating portuguese from brazil to english via google.

  • @999monkeymonkey
    @999monkeymonkey 9 років тому

    hi new question... i have wired up a 2 channel relay that i have H BRIDGED to allow a linear actuator to be used. is there a way to have the 1 RFID card to first unlock the door and then re-lock it? cuz at the moment i have to use 1 card that has access and one that has access denied so that the denied card triggers the red led signal that has been redirected to the relay to enable the closing of the lock cheers

    •  8 років тому

      +999monkeymonkey In the code just add a variable if the lock is open or closed. If the correct card is used AND the lock is closed, then open it, if the correct card is used AND the lock is open, then close it? Is that what you mean?

    •  8 років тому

      +999monkeymonkey In the code just add a variable if the lock is open or closed. If the correct card is used and the lock is closed, then open it, if the correct card is used and the lock is open, then close it? Is that what you mean?

    • @999monkeymonkey
      @999monkeymonkey 8 років тому

      hi thanks so much for the quick reply! yes thats what i would like it to do because at the moment it automatically closes again on its own after a delay. i would like to be able to open the lock with lets say card named A1 and the when i decide its time to lock it again i will scan card A1 again and it will lock the door up again. im not sure how to type the code for that into your sketch file? i also tried the following sketch file attached below and this one auto locks up again aswell...but i want to control it myself with one card. thanks for help github.com/omersiar/RFID522-Door-Unlock/blob/master/EEPROM/EEPROM.ino

    • @999monkeymonkey
      @999monkeymonkey 8 років тому

      +999monkeymonkey would there be any chance you would be able to do another sketch file to the specification please? i would be very grateful :-)

  • @shimulhossain7467
    @shimulhossain7467 6 років тому

    Best tutorial,that's i ever seen about RFID. Can you please upload a tutorial about school attendance system with notification using RFID.

    •  6 років тому

      I did a similar project at work. But I used iPads (or other tablets) with an RFID reader connected as a keyboard and then a webpage where the RFID code is in a database connected to students. So when the RFID is scanned, the webpage does the logic of signing in the student. Hope this helps.

  • @andreslanza984
    @andreslanza984 8 років тому

    Hello,great video! Im trying to control an electromagnetic lock. I know I just have to adjust this code, buy I'm new in this area and I'm struggling doing it. Any help or suggetions?
    Thanks!

    •  8 років тому

      If it is just one pin to control the state of the electromagnetic lock, then use the code for the Solenoid, which is just on or off. That should work. You probalby need some circuitry in between the electromagnet and the Arduino to protect the arduino though...

    • @andreslanza984
      @andreslanza984 8 років тому

      Thank you, but I'm having a lot of trouble trying to lock and unlock my 12v magnetic lock with my arduino UNO. Help please.

    •  8 років тому

      Ok, for controlling a 12V device you need to either have a relay connected to the arduino and 12v over the other side of the relay to your lock. Or use a transistor connected to arduino and 12v to drive the lock. An UNO by itself cannot drive a 12V device. Hope that clears it up... I am working on some Transistor based videos now to explain how they work and how to work with them... But not done yet.

    • @andreslanza984
      @andreslanza984 8 років тому

      Thanks, I will stay tuned for your next video. If you know about some videos or tutorials that could help me out with that regard please let me know. You're awesome thanks again for all your help.

  • @franckbtjom4895
    @franckbtjom4895 8 років тому

    What's the name of that locker you used with servo? I enjoyed watching your video. It has more details than others.

    •  8 років тому

      I only use a normal servo, and also a Solenoid just to show two different ways you could do the locking mechanism...

  • @tamaspeto5054
    @tamaspeto5054 9 років тому

    Hi,
    Do you know whats the problem if when your led is turned of my led is turned on? (we use arduino nano) Thanks.

    •  9 років тому

      +Tamás Pető It is just something that is inverted probably. Maybe you connected the LED the other way around?

  • @RolfResler
    @RolfResler 6 років тому

    The reason the data is transmitted so slow is not the RFID communication but the serial output the the SerialMonitor you are using.
    Change the Serial Baudrate to 115200 on the Arduino and the SerialMonitor , and you get the complete card information 12 times faster.

    •  6 років тому

      Of course. 😅 Thanks for the heads up!

  • @UnboxyTech
    @UnboxyTech 8 років тому +1

    Hey how can i detach pwm to servo as after locking it makes buzzing noise i tried it but if i detach it then it will not work again please help ASAP!

    •  8 років тому

      Do you want a buzzer aswell? You should be able to add the buzzer inside the if statement for a correct card reading... Just as I have both a servo and a solenoid. So just replace the solenoid part with a buzzer. Might work?

    • @UnboxyTech
      @UnboxyTech 8 років тому

      ok thanks

  • @rozamaevillaraza1178
    @rozamaevillaraza1178 7 років тому

    Sir I have a question. Im new to arduino and I dont have Idea about the current requirements.. Im using arduino mega, 5v relay and 12v solenoid. is it okay if i connect them without using transistor or resistor? cause in other tutorials they use that but in your tutorial I guess you didnt use any transistor or resistor. thanks

  • @suh6392
    @suh6392 8 років тому

    thanks man! it is a great video but i have a question, can we do samething you do without a computer? can it work without A computer after we program it?

    •  8 років тому

      +sururi yil Yes. After you have programmed the Arduino, there is no more need for the computer. All you need is 5V power and everything should work without the computer....

  • @arunimaagarwal8760
    @arunimaagarwal8760 8 років тому

    Hi
    Can more than one RFID sensor or reader be connected to a single arduino board? If yes, then how?

    •  8 років тому

      I actually dont know if this is possible. If so it probably depends on the library. It seems like the pins for the reader is configurable when looking in the code, so that makes it more likely that it will work with two readers. Have a try and let me know if you get it to work.

    • @arunimaagarwal8760
      @arunimaagarwal8760 8 років тому

      I am afraid I did not frame my question correctly. I meant if two or more readers could be simultaneously connected to an arduino board. Because there are not as many pins on the board. Maybe we have to use a special module? And thanks for the reply! I will try and let you know

  • @xyz3dprinting409
    @xyz3dprinting409 8 років тому

    hi there, can you build or boost the reader that will read from 50 cm

    •  8 років тому

      No I dont think so :/ You need another reader for that, probably a bigger coil and a more amplified signal. When looking on ebay.com I did find a few larger readers for industrial use. But they were way more expensive...

  • @bricemaurice1310
    @bricemaurice1310 7 років тому

    How did you connect the solenoid and the relay with the arduino?

    •  7 років тому

      The relay is used to control the Solenoid. Since the Solenoid needs 12V I use the relay to allow that. The arduino is connected on the 5v control side of the relay, and the solenoid on the "hot" side with 12V connected. Hope that clears it up...

  • @advertaCS
    @advertaCS 9 років тому

    what is the maximum number of tags that this code can run on Arduino Uno, or Arduino nano, I need to run about 80 tags, is it possible?

    •  9 років тому

      +Tatjana Hiljadnikova Sorry for late reply, it is all down to how much memory it takes up. I dont think it would be a problem. Copy the code for an extra code and see the difference in size... You have a total of 32kb to work with in a UNO. A bit more in a MEGA if an UNO isnt enough...

    • @atmel9077
      @atmel9077 9 років тому

      If you're using MiFare tags you can write a same "reference code" in the tag's memory. Then the reader compares the code in the card (the same in your 80 cards) with an unique reference code.

  • @نورالهدىأمأُبيْوتُماضر

    THANK YOU VERY MUCH, your video on RFID is too much helpful
    but I really need the code of interfacing this RC522 with PIC18F4550 bcz I really need it the sooner

  • @remconet
    @remconet 7 років тому

    Great video. So what do I add to the code if I want to use 5 readers in stead of 1, all accepting just 1 card?

    •  7 років тому

      Not sure that is possible. I would probably add one arduino to each reader.
      But I guess you could try to add multiple readers to one arduino. Make sure to give them unique variable names etc. and then make a check for each reader with one code each? Try it and let me know if it works. :)

    • @remconet
      @remconet 7 років тому

      I have tried but I'm not experienced enough yet. There are escape room companies that use it, but they charge a lot of money and are unwilling to offer the codes...

  • @MediaEnrekang
    @MediaEnrekang 8 років тому

    thanks, nice tutorial,
    how the connection Arduino Uno to RFID RC522-(Keypad to input password)-(LCD2x16)-(Buzzer as Alarm)- (Solenoid to open the door) and
    -(use the PIR sensor as a security room,
    please help me to make the circuit

    •  8 років тому

      I get a lot of request for adding other sensors and parts for this project, I cannot easily explain here... I will look into making more instruction videos with the sensors that you wonder about.

  • @elektron95
    @elektron95 8 років тому

    Nice work! Keep it up :)
    One question though, how can I add a push button as a trigger?
    Thank you!!!

    • @elektron95
      @elektron95 8 років тому

      Please help me. I want to add a PIR sensor so when it detects movement it will open the relay.
      I can't figure it out how to add that to your code... I spent two day looking for an answer but nothing... Please help me out!
      Thank you!

    •  8 років тому +1

      PIR sensors are quite easy towork with. They have a digital output which outputs a 1 when movement is detected otherwise 0 (or vice versa). So just connect a pin to the PIR-sensor. write an if statement that if pir-sensor-pin is 1 then run the open door function. Hope that helps. Also see Anything Arduino Episode 19 for how to work with the PIR sensor: ua-cam.com/video/ZAUXMoygVOU/v-deo.html

    • @elektron95
      @elektron95 8 років тому

      Thank you very much for the response, I will give it a try asap, on the other hand, how can I connect a momentary button ? What should I add to your code ?! Thank you again !!!

    •  8 років тому

      Hello again, for a pushbutton its the same thing, a button can be connected as a digital input, so when it is pressed it is 1 and when not pressed it is 0. So an if statement that if the button_pin is equal to 1 then open_door()...

  • @ondrejplocica-osobni5830
    @ondrejplocica-osobni5830 9 років тому

    How do I hook up the servo to the Arduino?

    •  8 років тому

      +Ondřej Plocica I just used the example sketch for Servo and copied that into my code inside and if statement. Look in the example code for Servo, it is explained how to connect it there...

  • @hjmnal1057
    @hjmnal1057 7 років тому +1

    i need the code please

  • @realtrickybilly
    @realtrickybilly 7 років тому

    Question: Have you soldered "the pins" coming out of the RC522 (I mean the pins that are connected to the colored wires). My RC522 came with the card (which has holes for the pins) and the pins separately. Is it enough to just put the pins inside the holes or is soldering absolutely necessary?
    REPLY

    •  7 років тому

      Well, you cant just put cables in the solder holes without any kind of force put on them, or you would get really strange behaviour and not good functionality. You can ofcourse just solder the cables directly to the board if you dont want the socket pins. But soldering of some sort and/or cables that apply force to the contact area is necessary for a functional circuit yes...

    • @antonnpn9063
      @antonnpn9063 6 років тому

      trickbilly you dumb fuck

  • @robvansuilen
    @robvansuilen 9 років тому

    i managed to solve the problem. When reading the card with dumpinfo sketch, the serial monitor gave back the UID code in capitals. Your sketch doesnt use capitals. A small en simple problem that is easy to oversee!

  • @dcnasoni
    @dcnasoni 8 років тому

    Thanks Kristian great video!

  • @0xN0x
    @0xN0x 8 років тому

    What's the reference of your solenoid ?

    •  8 років тому

      Sorry, Im unsure... its a noname solenoid so I dont have any values...

  • @MrHOMBREOSOCERDO1
    @MrHOMBREOSOCERDO1 8 років тому

    thanks, kristian saludos from mexico!!

  • @seanpatrickuy6762
    @seanpatrickuy6762 6 років тому

    Sir do you have a Circuit Diagram ?

    •  6 років тому

      Watch the video to see the schematics. :)

  • @frederinegahery9724
    @frederinegahery9724 9 років тому

    Thank you very much, from France.

    •  9 років тому

      +Frédérine GAHERY You're welcome! From Sweden :)

  • @andrewbeaton3302
    @andrewbeaton3302 8 років тому +1

    Thank you for the great DIY!

  • @tameresam9787
    @tameresam9787 9 років тому

    Very good explanation.

  • @drapesent.2162
    @drapesent.2162 7 років тому

    i nearly burnt down my house i plugged the power right into the wall , all the connections were okay. Any help?

    •  7 років тому

      How do you mean plugged power into the wall? The arduino is powered via USB 5V either from a computer or a 5v power supply. And the solenoid needs 12volts in my case therefor the relay. It all depends on what equipment you connect. But in my setup nothing is using mains volts directly into any circuit.

    • @drapesent.2162
      @drapesent.2162 7 років тому

      what i don't understand is what is connected to the relay at COM , i know the part of the solenoid goes into NC on the relay but what other connections are there, i couldn't see in picture. Is it all connected back to the arduino ? or is there an external power source used?

    •  7 років тому

      Ok, so because the Solenoid needed 12V to function I had to hook that up to a 12V powersupply. The relay is used as an isolator between the 5V arduino side and 12V solenoid side. I needed to use a relay because the Arduino cant tolerate 12V. Hope this cleared it up.
      I did not go through this is the video as they were just examples for how to hook up the locking "hardware", and it would differ from project to project. I was only showing the Arduino side.
      When working with electronics it is important that you always check what power and current your devices need and can withstand and never exceed those, if you do the components will break. High Voltage is LETHAL, and should never be used if you arent 100% sure what you are doing... Again hope this clears it up, and be careful.

    • @drapesent.2162
      @drapesent.2162 7 років тому

      ok i fully understand now, thank you! This project is the best i've seen so far kudos!

  • @999monkeymonkey
    @999monkeymonkey 7 років тому

    how would i add lcd display please? cheers

    •  7 років тому

      I havent worked with LCD displays yet. So I am not really sure how it works, I'll see if I can do a video on LCDs in a near future...

  • @sabrineslimi6006
    @sabrineslimi6006 7 років тому

    hi please i want to controol a door with rfid module with a card and i want to get the access from wifi or bluetooth how can i make this access pleaaaaase hellp meee

    • @Therysin
      @Therysin 7 років тому

      Use an esp8266. Set up a webserver(in addition to the rfid module) and use a toggle there or something.

  • @personalspam2365
    @personalspam2365 8 років тому

    can i add a push to exit button

    •  8 років тому

      Sure, that would just be a few lines of code more, to check if the button is pressed, then run the unlock function.

    • @wranox
      @wranox 8 років тому

      Hello kristian , i can't find your Libery of the locking Arduino and RC 522 . is it ok to use your Libery to make my one locking .

    • @personalspam2365
      @personalspam2365 8 років тому

      thanks this is the best RFID tutorial on youtube

    •  8 років тому

      Yes, you are welcome to use any information shared in this video... :) You can find the links to the Sketch and library in the description.

  • @greatliar
    @greatliar 9 років тому

    very good and clear explanation. Thanks.

    •  9 років тому

      +Mila Sarip Thanks! :)

  • @Pietro1976
    @Pietro1976 8 років тому

    vorrei chiederti se sai come clonare le schede devo fare 4 chiavi tutte uguali grazie

    •  8 років тому

      I think there are examples of this in the example folder for the library. However you need special reprogrammable tags for this.

    • @Pietro1976
      @Pietro1976 8 років тому

      gli esempi ci sono ma non sono funzionanti li ho provati tutti ma nulla

    •  8 років тому

      Then again, I think you need another type of Tags, that have reprogrammable IDs in them...

    • @Pietro1976
      @Pietro1976 8 років тому

      ok thank yuo

  • @raphaelmanalo1425
    @raphaelmanalo1425 6 років тому +1

    Thanks for your vids man!

  • @richardeanchou2346
    @richardeanchou2346 7 років тому

    Please share schematic diagram, appreciated.

    •  7 років тому

      It is all in the video... ;)

  • @btxft5848
    @btxft5848 6 років тому

    Can you send me a diagram of how you connect a magnetic lock

    • @btxft5848
      @btxft5848 6 років тому

      Kristian Blåsol I mean how you connect the solenoid to the Arduino

    •  6 років тому

      Yes. Then watch the video I sent you. It explains that hookup in detail.

    • @btxft5848
      @btxft5848 6 років тому

      Kristian Blåsol thank you for your help

    • @btxft5848
      @btxft5848 6 років тому

      Kristian Blåsol but that video seem to be about volume knob

    •  6 років тому

      Sorry about that, not my day today, ok THIS should be the correct video... ua-cam.com/video/NuVxBqTuAL4/v-deo.html

  • @kclove101
    @kclove101 7 років тому

    how did you get the dumpinfo?

    •  7 років тому

      I show it in the video here: ua-cam.com/video/XJjOZpdOcqk/v-deo.html

  • @nathanking9771
    @nathanking9771 7 років тому

    Thanks for sharing that, very good!

  • @fordzaza
    @fordzaza 8 років тому

    how to turn on/off one card ?(sorry,I do not speak English)

    •  8 років тому

      Do you mean add and remove cards? It is explained in the code and video somewhat.

  • @AgusSalimcoper
    @AgusSalimcoper 8 років тому

    can you give The code and wiring to me please?
    thank you

    •  8 років тому +1

      Code here: duinos.net/show/?id=220
      Wiring in the video :)

  • @muratgursoy8167
    @muratgursoy8167 4 роки тому

    This is my homework. Please help me.
    Defined cards are requested to open a computer using the RFID card system. (any
    it is enough to have a relay installed) The ambient temperature of this computer to be turned on is between 10 degrees and 35 degrees
    There is a requirement. The LCD will show the temperature value and whether the computer is on or off. if
    If the temperature range is not suitable, the temperature is not suitable warning will appear. The circuit to do the necessary action
    create the necessary codes by designing.

  • @aswahd
    @aswahd 6 років тому

    you deserve a subscribe👏️ and 1000 likes

  • @bryanvasquez1774
    @bryanvasquez1774 7 років тому

    exellent video!! thank you so much

  • @danisurya1283
    @danisurya1283 8 років тому

    Why i get some error while compile dumpinfo,,,i do same like in this video,,but still error,,,

    •  8 років тому

      Could you write the dumpinfo here, so I can see what could be wrong... Does the example sketches that comes with the library work?

    • @danisurya1283
      @danisurya1283 8 років тому

      #include
      #include
      #define RST_PIN 9 // Configurable, see typical pin layout above
      #define SS_PIN 10 // Configurable, see typical pin layout above
      MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance
      void setup() {
      Serial.begin(9600); // Initialize serial communications with the PC
      while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
      SPI.begin(); // Init SPI bus
      mfrc522.PCD_Init(); // Init MFRC522
      mfrc522.PCD_DumpVersionToSerial(); // Show details of PCD - MFRC522 Card Reader details
      Serial.println(F("Scan PICC to see UID, SAK, type, and data blocks..."));
      }
      void loop() {
      // Look for new cards
      if ( ! mfrc522.PICC_IsNewCardPresent()) {
      return;
      }
      // Select one of the cards
      if ( ! mfrc522.PICC_ReadCardSerial()) {
      return;
      }
      // Dump debug info about the card; PICC_HaltA() is automatically called
      mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
      }

    • @danisurya1283
      @danisurya1283 8 років тому

      the examples sketches that come with library not work,,

    • @danisurya1283
      @danisurya1283 8 років тому

      In file included from Dumpinfo.ino:37:
      D:\My Documents\libraries
      fid/MFRC522.h:276:error:use of enum 'PICC_Type' without previous declaration....this message of error,

  • @sostomc
    @sostomc 8 років тому

    Very helpful... Thanks

  • @ripppage2316
    @ripppage2316 8 років тому

    Great Stuff...

  • @MrHOMBREOSOCERDO1
    @MrHOMBREOSOCERDO1 8 років тому

    In file included from DumpInfo.ino:37:
    C:\Users\DANIEL\Documents\Arduino\libraries
    fid/MFRC522.h:276: error: use of enum 'PICC_Type' without previous declaration
    C:\Users\DANIEL\Documents\Arduino\libraries
    fid/MFRC522.h:276: error: expected primary-expression before '{' token
    C:\Users\DANIEL\Documents\Arduino\libraries
    fid/MFRC522.h:276: error: expected ';' before '{' token

    • @asadshaikh8983
      @asadshaikh8983 8 років тому

      THIS IS BECAUSE U ARE USING OLDER VERSION OF IDE PLATFORM USE 1.6.1 VERSION

  • @dinhthecuong7306
    @dinhthecuong7306 7 років тому

    very helpful, thank you !!!!!

  • @yuby985
    @yuby985 9 років тому

    very nice video!!!

    •  9 років тому

      Mide Sabic Thank you, glad you liked it! :)

  • @fuat8101
    @fuat8101 8 років тому

    I want your components on the shelf ^_^

    •  8 років тому +1

      Haha, yes, I have collected a loooong time to aquire this many components... Also some of the drawers only have one or two of that component in them so it may look more than it is ;)

  • @marlonramilo3039
    @marlonramilo3039 8 років тому

    HI! I add some modules like LiquidCrystal LCD, RGB LED, relay & Buzzer but I have some problems with the code when I use 2 cards and make some IF statement it runs both of them of course but my lcd screen print both Card Accepted & Access Denied. My Codes below
    #include
    #include
    #include
    #define RST_PIN 9 // Configurable, see typical pin layout above
    #define SS_PIN 10 // Configurable, see typical pin layout aboveLiquidCrystal lcd(7, 6, 5, 4, 3, 2);
    MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.String read_rfid;
    String ok_rfid_1="cccb6f85";
    String ok_rfid_2="47f552ab03a80"; //add as many as you need.
    int lock=A0; //Which pin the lock will be on if using a relay or solenoid or similar
    int error=A1;
    int openlight=A2;
    int buzzer=A3;//Use the lines below if you plan on using a servo as a locking mechanism.
    #include
    Servo myservo; // create servo object to control a servo
    int posClosed = 0; // variable to store the servo position for locked
    int posOpen = 360; //same for open...
    /*
    * Initialize.
    */
    void setup() {
    Serial.begin(9600); // Initialize serial communications with the PC
    while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
    SPI.begin(); // Init SPI bus
    mfrc522.PCD_Init(); // Init MFRC522 card //Choose which lock below:
    pinMode(lock, OUTPUT);
    pinMode(error, OUTPUT);
    pinMode(openlight, OUTPUT);
    pinMode(buzzer, OUTPUT);
    //myservo.attach(2); // attaches the servo on pin 2 to the servo object
    }/*
    * Helper routine to dump a byte array as hex values to Serial.
    */
    void dump_byte_array(byte *buffer, byte bufferSize) {
    read_rfid="";
    for (byte i = 0; i < bufferSize; i++) {
    read_rfid=read_rfid + String(buffer[i], HEX);
    }
    }void open_lock() {
    //Use this routine when working with Relays and Solenoids etc.
    digitalWrite(lock, HIGH);
    digitalWrite(openlight, HIGH);
    delay(2000);
    digitalWrite(lock,LOW);
    digitalWrite(openlight, LOW);
    //Use this routine when working with Servos.
    //myservo.write(360);
    //delay(2000);
    //myservo.write(0);
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);
    // Print a message to the LCD.
    lcd.print("CARD ACCEPTED!");
    }
    void loop() { // Look for new cards
    if ( ! mfrc522.PICC_IsNewCardPresent())
    return; // Select one of the cards
    if ( ! mfrc522.PICC_ReadCardSerial())
    return; dump_byte_array(mfrc522.uid.uidByte, mfrc522.uid.size);
    Serial.println(read_rfid);
    if (read_rfid==ok_rfid_1) {
    //ok, open the door.
    Serial.println(ok_rfid_1);
    open_lock();
    // Turn off the display:
    lcd.noDisplay();
    delay(500);
    // Turn on the display:
    lcd.display();
    delay(500);
    }
    else{
    digitalWrite(error, HIGH);
    delay (2000);
    digitalWrite(error, LOW);
    digitalWrite(buzzer, HIGH);
    delay (2000);
    digitalWrite(buzzer, LOW);
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);
    // Print a message to the LCD.
    lcd.print("ACCESS DENIED!");
    }
    //Add below as many "keys" as you want
    if (read_rfid==ok_rfid_2) {
    //ok, open the door.
    Serial.println(ok_rfid_2);
    open_lock();
    // Turn off the display:
    lcd.noDisplay();
    delay(500);
    // Turn on the display:
    lcd.display();
    delay(500);
    }
    else{
    digitalWrite(error, HIGH);
    delay (2000);
    digitalWrite(error, LOW);
    digitalWrite(buzzer, HIGH);
    delay (2000);
    digitalWrite(buzzer, LOW);
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);
    // Print a message to the LCD.
    lcd.print("ACCESS DENIED!");
    }
    }

    •  8 років тому +2

      Ah, you have two different if/else statements for each card. So you will get both access accepted and denied on both. You need to make ONE if/else if/else statement with all the cards in one check. So if card1 then do this else if card2 then do that else no access... Hope this helps.

  • @abdulkadermaqsoud4890
    @abdulkadermaqsoud4890 8 років тому

    Thx man.

  • @sivaragu3391
    @sivaragu3391 8 років тому

    hi Is there is any link for learn code about read/write proximity cards which supports in RFID reader

  • @musashiarif
    @musashiarif 8 років тому

    which code to make the rellay always on when tapping?

    •  8 років тому

      Just remove the delay and digitalWrite in the code that turns off the relay again. But then you need to add another loop or something that turns it off the next time you tap the card. Orelse youll need to reset the arduino every time you open the lock to close it again...

    • @musashiarif
      @musashiarif 8 років тому

      +Kristian Blåsol thank you so much, i'll keep that i mind

  • @zerosploit
    @zerosploit 5 років тому +1

    well done thank you for this video.