Long-range RFID Vicinity Sensor Christmas Escape Room Puzzle Tutorial using PN5180 and ESP32

Sdílet
Vložit
  • čas přidán 30. 07. 2024
  • RFID ("Radio Frequency Identification") technology is widely-used in all sorts of applications - ID cards, inventory tracking, pet microchips - and it's also the "magic" behind escape room interactions where a door opens (or any other action) after players position a series of items in the correct positions to solve a puzzle. Each item has an embedded RFID tag with a unique ID, and when tags of the correct ID are positioned in front of an array of sensors, a relay is triggered which powers the desired output.
    Now, if we want players to suspend their disbelief that they are not really positioning props embedded with RFID cards but actually placing objects with some mystical power, we need those RFID tags to be detected as smoothly and seamlessly as possible. The sorts of RFID sensors typically used in an escape room are based on the ISO14443 protocol for proximity sensors, which require tags need to be positioned accurately within only a few centimetres of the sensor (as if holding up an ID card to a security-controlled door access panel) - and this can limit the player's experience.
    In this video, I'll demonstrate how you can use a PN5180 sensor that uses ISO15693 vicinity sensors instead: these work in almost exactly the same way as a regular RFID proximity sensor - by detecting passive tags that can be embedded in props - but have a significantly greater detection range. The setup shown can reliably detect tags up to around 20cm-30cm from each sensor, they do not have to be axis-aligned, and you can build it yourself for around $30.
    Timings
    ---
    00:00:00-00:02:06 Introduction
    00:02:07-00:06:09 Hardware Overview
    00:06:10-00:09:01 Demonstration with Debug Output
    00:09:02-00:17:42 Hardware In Detail
    00:17:43-00:29:14 Wiring
    00:29:15-01:03:37 Arduino IDE Code Listing
    01:03:38-01:05:51 Wrapup
    Hardware Used
    ---
    - ESP32. I'm using an ESP32 board with a 38-pin NodeMCU-32s pinout, such as www.banggood.com/custlink/mvK... . ESP32 dev boards come in many varieties with different pin layouts. If you are using a 36-pin board, such as www.banggood.com/custlink/Gv3... , please be sure to use the appropriate pins!
    - PN5180 RFID Sensors: www.aliexpress.com/item/32840...
    - RJ45 Breakout Board www.banggood.com/custlink/33D...
    - MP3 Player www.banggood.com/custlink/mGm...
    - 5V Relay Module www.banggood.com/custlink/mmG...
    (Sorry - I don't have a link to the particular Christmas lights I'm using - they came down from the loft!)
    Code & Wiring Downloads
    ---
    If you'd like to support me making more video tutorials explaining how to use tech in escape rooms and other playful settings, please check out my Patreon at / playfultech , where you can also find code downloads, wiring diagrams, and additional resources for this and all my other tech projects.
  • Věda a technologie

Komentáře • 61

  • @BradleyHerbst
    @BradleyHerbst Před 3 lety +1

    I love your videos!! I always lean so much about elections when I watch them. And besides, I love seeing how things work!! Thank you so much!!!

  • @tomran247
    @tomran247 Před 3 lety

    Excellent video! Detailed and informative. Well done!

  • @conversationwithgod272

    great video ...it is my first time watching your channel..i am very surprised by the way you are explaining things..you are a great man.
    Just once you were explaining the code..the screen was not enough clear to see the code.
    over all..it is a perfect achievement .God bless you.

  • @mfx1
    @mfx1 Před 3 lety

    I wonder if it's worth doing a video on converting SPI (and other serial protocols) to/from RS485 so it can be sent over very long Ethernet cables, depending on data rate SPI can be quite limited on how far you can reliably send it and using RS485 makes best use of the twisted pair cable. there's very easy/cheap to use RS485TTL converters available from the usual suspects.

  • @rachelking2371
    @rachelking2371 Před 3 lety +1

    Would you recommend these readers for a project that is reading the difference between two different pets, wearing the rfid tags on their collars? I'm making a project where I want to be able to passively read the difference between two pets to open and close a food bowl. The rfid reader would be somewhere near the bowl that is going to be opening and closing. Do you believe that these rfid readers would be able to read a moving entity that is at a range of 45 cm away from the reader? If not, is this project even possible using rfid? I've been debating between bluetooth and rfid but I really like the idea of having a passive tag.

  • @mfx1
    @mfx1 Před 3 lety

    Couldn't the Rest wires also be commoned? In fact for something like this you could possibly common the busy lines as well although I've not looked at the PN5180 datasheet yet.

  • @mazemakes
    @mazemakes Před 3 lety

    Thank you SO much for making the PN5180 library! How does it handle collisions (multiple tags?) I actually have a few of the boards lying around since your last video on it, but I couldn't get more than basic testing working. Maybe I should get back to tinkering with them taking hints from this video.

  • @parcydwr
    @parcydwr Před 3 lety

    Hi. I am wanting to use the pn5180 board and arduino uno to create a feeder that only feeds one of our calves. I can't find the small sticker tags that you can get for the PN532. The cattle have ear tags by law and I was hoping to use a sticker tag stuck onto the ear tag. Have you seen these available?

  • @Nick-si9kr
    @Nick-si9kr Před 3 lety

    Hey, i have the problem that my mfrc522 reader read the card a few times and then stop working. I have to reset the whole thing. Any idea?

  • @drangel11
    @drangel11 Před 3 lety +2

    Nice video again.
    What do you use as a power supply for the different voltages? Which kind do you prefer or recommend?
    Merry Christmas 🎄

  • @johnacsyen
    @johnacsyen Před 5 měsíci

    @20.12, Had figure out why my sensor does not work, indeed the PN5180 need 5V from the ESP32 vin pin. The PN5180 library did not mention this in the example code.

  • @aydinliefe1486
    @aydinliefe1486 Před 2 lety +3

    Hey Good Job Playful Technology and I Have a question can we make this setup with multiple rfid tags (reading 5-10 tags at the same time) ?

  • @Dagonve90
    @Dagonve90 Před rokem

    hello, can you maybe help me with a simple code to use with an esp32 and the connection diagram?

  • @rohanbhavsar6976
    @rohanbhavsar6976 Před rokem

    Good Information. As you mentioned in Titel "Long-range RFID", but the PN5180-NFC sensor only communicate with NFC tags, is it possible to use same sensor for RFID ?
    Thank you

  • @ytfp
    @ytfp Před 3 lety

    You always have such joyful projects and in depth coverage. While its a shame the code and things now has to be behind a paywall, I think that you have at least demonstrated enough information where a person on a low income could replicate the project with what you have provided and a little research and study and have managed to strike a great balance between the new and the old methods. I think you have and continue to be of great service to others and can also get some wages for your dedicated work. I still find the channel fantastic and your uplifting demeanor and fun projects really make this channel a joy!

    • @mazemakes
      @mazemakes Před 3 lety

      wdym paywall it is all on his github
      (which I think is amazing that he does this for free knowing that escape room operators might use it for profit)

  • @ronaldc2742
    @ronaldc2742 Před 3 lety

    Awesome video as always! I have some questions..
    Is there a way to adjust the reader sensitivity like in the mfrc522 library? I am worried that the reader might be too sensitive in some applications- having readers too close together could cause problems I assume for some puzzle setups!
    Also, do both the 5v and 3.3v need to be connected for the module to work?
    Lastly, I think it would be better for most escape room puzzles to have an automatic reset as opposed to having a dedicated reset card. Automatically resetting after all of the cards have been removed is something I struggled with when making some mfrc522 puzzles because the library allows the reader to detect when a new tag is present, but doesn't have a function for detecting when a tag is removed. Is this something you have tried using the mfrc522 or pn5180 modules?

    • @mazemakes
      @mazemakes Před 3 lety

      You can detect if a tag was removed by polling the reader and comparing to the last reading, if the last read was an ID and the current read is nothing, you know the card was removed. He shows the code for this at 50:49
      Resetting automatically has the drawback that players can reset it themselves, which might be unwanted. But when this doesnt matter its definitely the simplest option!

  • @abuzzakasm9767
    @abuzzakasm9767 Před 3 měsíci

    Is their any way that i can send data receive data from under water esp32

  • @user-ix3ny2lf1n
    @user-ix3ny2lf1n Před 3 lety

    Great video! - Thanks!
    you've used RJ45 breakout boards to carry the signal lines to the ESP32,
    I wonder, what is the maximum range you can go with the cable without losing the signal quality ?

    • @PlayfulTechnology
      @PlayfulTechnology  Před 3 lety +1

      I've got 3.3V over Cat5 running 20m. Haven't tested beyond that.

  • @cicerosnt
    @cicerosnt Před 5 měsíci

    How are you? The content is very good. Is it possible to share the pinout/connection diagram?

  • @FanDeNeko
    @FanDeNeko Před 2 lety

    Is there any manual or library for the MP3 reader? :) I can't found it :/

  • @nicojohnson_
    @nicojohnson_ Před rokem

    hello, where can i find the PN5180 library for fritzing?

  • @jolyonjenkins1
    @jolyonjenkins1 Před 3 lety

    I have found that the sensors will work on 3.3V and don't need the 5V. YMMV

  • @mauriciomilani3909
    @mauriciomilani3909 Před 2 lety

    Great!

  • @g.m4z956
    @g.m4z956 Před 2 lety

    Hi! Great video & Very usefull! Are in store some rfid Capsul or microRfid that can be detect via rc522 o p5180? all the capsul (named microchip dog's ecc) seems work in 124-134.2 KHz with UART EM4100 (like RDM6300). And this product work only one for arduino without possibility to array them in 4 or 5 sensor in a row..

    • @PlayfulTechnology
      @PlayfulTechnology  Před 2 lety

      I have some tiny capsule RFIDs that are 13.56MHz and work with ISO14443 readers (i.e. like the common MFRC-522 sensors). I haven't seen any that are ISO15693 compatible though.

  • @christopherlawes9286
    @christopherlawes9286 Před 2 lety

    Do you know how good the PN5180 can detect RFID/NFC rings? I used a PN532 and it could only read it if it was virtually touching.

    • @PlayfulTechnology
      @PlayfulTechnology  Před 2 lety

      In my experience, those rings are pretty useless because the metal of the ring interferes with the antenna of the RFID chip itself... I've only ever been able to get read range of a few mm too.

  • @OhYa1337
    @OhYa1337 Před 10 měsíci

    READY TO JOIN PATRION, but first...
    Hello, I am in the Philippines & just getting started with all this.
    I just bought an Arduino Uno (with 3.3v) and 5 RC522 rfid sets.
    This video is a bit old, so before I sign up on your patrion, I would like to make sure, will I be able to use the code with 5 RFID RC522 on my Uno?
    I know $10 doesn't seem like a lot there, but here that's 1 days wages, So it's better to check first if I can do what I need to before I spend so much.
    Thank you

  • @robgraham67
    @robgraham67 Před rokem

    Hi man, love the video! I have a quick question- are your rfid tags 125kHz or 13.5mHz? I have some capsule tags (EM4102 chip) that work at 125kHz, just wondering if i could use a setup like this with them ... Thanks in advance! (Sorry if its a duplicate question)

  • @freemont-mike
    @freemont-mike Před 3 lety

    Hey man, cool video. Do you know any anti-metal tags that can read through a metal table ? ones I bought work only on metal surface. Want to place the PN5180 under a metal table.

    • @PlayfulTechnology
      @PlayfulTechnology  Před 3 lety +1

      I'm pretty sure all the RFID technologies I'm familiar with would not work if attempted through a metal surface - it requires electromagnetic coupling which is achieved through a tuned antenna, and the metallic surface would interfere with that. It's possible that an active RF transmitter at a suitable frequency might work, but that would obviously require battery power in the portable part of your prop.

    • @freemont-mike
      @freemont-mike Před 3 lety

      @@PlayfulTechnology okay, thanks a lot.

  • @joshuaolakanla3993
    @joshuaolakanla3993 Před 2 lety

    Hello, thank you very much, I was able to successfully read the tag but I got a ridiculous range of 10cm. The level shifter and every thing works well. I have 3 iso15693 tags which have different range

    • @kccr37
      @kccr37 Před 2 lety

      I have exactly this issue and absolutely nothing I do resolves it. Did you ever figure it out?

    • @joshuaolakanla3993
      @joshuaolakanla3993 Před 2 lety

      @@kccr37 no not at all. There was really no solution. I had to buy a UHF reader. I was able to get 5M read rangs

    • @katelyncahill-rowley1127
      @katelyncahill-rowley1127 Před 2 lety

      @@joshuaolakanla3993 thank you so much for your answer. Which reader did you end up going with? I'm currently trying the Sparkfun Simultaneous RFID reader, which is UHF. It's okay but not perfect for my application.

  • @linharesking
    @linharesking Před 2 lety

    I want to develop a UHF RFID application but they are very expensive

  • @jolyonjenkins1
    @jolyonjenkins1 Před 3 lety

    This is cool for reading the UIDs. But I would really like to see an example where blocks are written to (and read again). I am struggling to understand the documentation on this.

    • @PlayfulTechnology
      @PlayfulTechnology  Před 3 lety

      Oh sure, I can show that. Do you have a particular application in mind to use as an example?

    • @jolyonjenkins947
      @jolyonjenkins947 Před 3 lety

      Thanks. Let’s say you have a bunch of cards that you want to be readable by multiple readers without having to program in the UID of each card for each reader. You would want to write a block of bytes to each card with its name, so that any reader could read the card without having to know its UID, and also worn out cards could be replaced without having to reprogram the reader.

  • @robertlim7423
    @robertlim7423 Před 3 lety

    Wow Reall cool... if i want to have more than 4 RFID, how do I connect them? TQ. Merry Christmas

    • @jolyonjenkins1
      @jolyonjenkins1 Před 3 lety

      You would need to have a device with 3 more pins, for NSS, BUSY and RST. (The SPI lines are shared). (If you don't have spare pins you can buy port expanders). Then in Alistair's code you change the number of devices, and specify the pin numbers in the nfc array

  • @musereden
    @musereden Před 3 lety

    Hi, Thanx for yet another inspiring and very detailed video :) Can you please elaborate on the amount of wires in the Ethernet cable? You have wired 9 wires from the PN5180 and there are only 8 wires in the Ethernet cable? Thanks in advance and happy new year! - BR. Martin from DK

    • @mazemakes
      @mazemakes Před 3 lety +1

      I wondered this too but it looks like there is a separate 9th wire, presumably GND, going to each of the readers ;) Maybe you can use shielded JR45 connectors and connect the shield to GND, then you get away with just one cable.

    • @musereden
      @musereden Před 3 lety +1

      Hi @@mazemakes , I believe I saw it too, but hoped it to be wrong :) I was wandering if only 5V could be supplied (and not also 3,3V) and then use the 5V for 5V (of cource) and a stepdown resistor (? ohm) at the PN5180 module side (or a specific stepdown module) for the 3.3V input. Then 8 wires are enough, without going with the shielded wire... :-)

    • @mazemakes
      @mazemakes Před 3 lety +1

      @@musereden a resistor does not step down the voltage, it limits current. But you could use a voltage regulator no problem in this scenario :)

    • @martinrydahlpedersen8884
      @martinrydahlpedersen8884 Před 3 lety

      @@mazemakes
      Hi, Yep you are right :) I wasnt aware of that. I have read a little about it since your post.
      Maybe setting 2 resistors up as a voltage divider, where the PN5180 specs determine the mA and thereby the resistors? I found some specs specifying 250 mA as max and limiting value 300 mA. So if 250 mA is max and 5V, the total resistors will be 20 ohms. Then the resistors ratio must be 3,3V/5V = 0,66. Giving R1 = 20 ohms x 0,66 = 13,2 ohms and R2 = 20 ohms - 13,2 ohms = 6,8 ohms.
      Is that correct?

    • @mazemakes
      @mazemakes Před 3 lety +1

      @@martinrydahlpedersen8884 that would not work sadly, you can use a voltage divider to change signal levels, but not for powering something. Just get a regulator, for example a 1117-3.3. there are even ready made little "step down" modules that make it really easy to use!

  • @JohannFritz78
    @JohannFritz78 Před 3 lety

    Only the white cards RFID card works. The blue key chain RFID card does not work. Any idea how to make it work, please?

    • @TheKsbdude
      @TheKsbdude Před 2 lety +1

      Hi Johann, I am having the same issue. I have figured out that the blue chips I received are of the type of ISO14443 instead of ISO15693 which are not what the library and example code are written for. I am curious if you ever found a good solution. Thanks!

    • @PlayfulTechnology
      @PlayfulTechnology  Před 2 lety +1

      As @TheKsbdude said, the PN5180 is capable of decoding both ISO15693 and ISO14443 tags, and they normally come supplied with one of each type - I only demonstrate the ISO15693 in this video, because if you only want to use the shorter-range ISO14443 there's plenty of examples using the cheaper MFRC-522 boards instead.

  • @JohannFritz78
    @JohannFritz78 Před 3 lety

    Hope you can help. I get the following error when trying to run your code:
    *** FATAL: Reading more than 508 bytes is not supported!

    • @mytholibarG
      @mytholibarG Před rokem

      did you get a resolution to this error? I'm getting the same.

    • @JohannFritz78
      @JohannFritz78 Před rokem

      @@mytholibarG No, I did not. Please let us know if you find a solution.

    • @mytholibarG
      @mytholibarG Před rokem +1

      @@JohannFritz78 So I had a miss configured GPIO. I used the PN5180-ReadUID.ino to check each reader and found I had one that was incorrect. I have a 30-pin ESP as well so makes it more challenging. I'm getting the correct ones now but still want to learn by troubleshooting this one. Hope that helps.