Ruby

Tagging Your World With RFID

Tagging Your World With RFID

by Adam Walker

In this engaging talk titled "Tagging Your World With RFID," Adam Walker discusses the versatility and applications of UHF RFID tags in everyday life and industry. He begins by defining RFID, or Radio Frequency Identification, and explains how it uses electromagnetic fields to identify and track tags attached to objects. Walker shares his professional background related to tracking laboratory samples and emphasizes several key points:

  • Practical Applications of RFID: Once primarily utilized in industrial settings, RFID technology has become accessible for everyday use, including applications like race timing, asset tracking, and consumer products.
  • Evolution and Accessibility: The cost of RFID tags has significantly decreased, with prices as low as 13 cents, encouraging widespread adoption. Notable companies like Walmart and Best Buy leverage RFID for inventory and asset management.
  • Fun and Creative Uses: Walker humorously recounts personal anecdotes, including how he developed an RFID-based system for his dog, Betty, which alerts him when she goes outside. He also created a smart trash can that logs disposed items to maintain a shopping list.
  • RFID Technology Overview: Walker discusses different RFID ranges and types, including the Monza X2K and concepts like 'smart dust.' He addresses privacy concerns while providing insights into how tags work and their limitations, such as signal collision and tag reactivation for security purposes.
  • Integration with Ruby: Walker highlights Ruby as an excellent programming language for implementing RFID technology, thanks to its accessibility and support for APIs and WebSockets, making development both quick and enjoyable.

In conclusion, Walker encourages attendees to explore RFID applications, whether for practical tracking or creative endeavors. He underscores the exciting opportunities RFID presents, inspiring innovation and personal projects, while also addressing potential privacy concerns. Walker invites participation in hands-on activities to further engage with RFID technology, fostering curiosity among the audience.

00:00:14.290 Alright, well this is Tagging Your World with RFID, or how to annoy your friends, family, and pets, which is something I’m a bit of an expert on. You can find me on Twitter at @acontece. You can also follow my live tweet stream that has extra information and links to details about RFID tags. The hashtag is #RubyRFID.
00:00:27.680 I work in laboratory information management software. Basically, what we do is track vials and robotic freezers using RFID tags. It's an exciting job! The company I work for, JMI Laboratories, tests antibiotics to determine which ones the bacteria are developing resistance to. We have been doing this for 15 years.
00:00:40.640 We pass this information on to the FDA and the European Health Agency, and we assist drug companies in developing better antibiotics. We have a lot of data to sift through, and it’s a lot of fun. While I'm up here, I also want to promote Ruby for Good. I'm sure some of you have already heard about it, but if you haven’t, you can visit rubyforgood.org or talk to Sean Marcia or Chris Sexton.
00:01:05.659 It’s basically a weekend hackathon where you’re helping nonprofits and open source initiatives. Last year, we worked with the Humane Society and had kittens. This upcoming year, we will be working with red pandas and will be at the Smithsonian Mason Research Center in Virginia. A couple of personal things about me: I have a unique sense of style—I tried to bring back this '40s spin mustache, but it didn’t work out. I generally hike in a kilt with Crocs. Before that, I was a professional chef. I quit IT, went to culinary school, became a chef, then returned to IT because I realized that cooking professionally was not quite the path for me.
00:01:52.729 I go to a lot of punk rock shows with my daughter, who is 18 and surprisingly not too embarrassed by me. I work remotely, partly because I was known in my office for doing horrible things to our office maze, but honestly, there weren't many co-workers to annoy, just one, and we’re still good friends.
00:02:13.280 Just a random fact, this is a photo from outside of the plane on my way here. It was absolutely beautiful and fascinating to me. I’ve done quite a bit of traveling, but at the age of 38, this was actually my first time on a plane, and it was also my first time speaking to such a large group.
00:02:31.250 So let's move on to what RFID is. RFID stands for Radio Frequency Identification. It uses wireless electromagnetic fields to transfer data, enabling automatic identification and tracking of tags attached to objects. Now, any explanation of RFID won’t be complete without mentioning Nikola Tesla. Tesla was undoubtedly a brilliant inventor, and if you follow my tweet stream, you’ll find a link to an explanation of why he is regarded as one of the greatest inventors.
00:03:06.019 In 1894, Nikola Tesla used resonant inductive coupling to wirelessly light up phosphorescent and incandescent lamps. Resonant inductive coupling is the near-field wireless transmission of electrical energy between magnetically coupled coils. This principle is behind passive RFID tags, which you will see here today. Wireless charging, which many people have likely adopted, as well as contactless smart cards, are also examples of this technology. Thank you, Nikola.
00:04:01.069 There are many practical uses for RFID technology, some of which many people have already encountered, such as race timing bibs and shoe tags, which are now very common. Authentication doors, medical carts, and even things like EasyPass are all uses of RFID technology in real life. Tracking is the bread and butter of the RFID industry. This is what has driven prices down. Not long ago, RFID tags cost several dollars each, but now you can buy a paper tag for around 13 cents, due to the fact that companies like Walmart, Best Buy, and others are using RFID to track their assets.
00:05:05.300 It’s easy, it’s cheap, and it’s becoming more accessible for everyone, not just large industrial applications. Getting back to access tracking for a moment, it's really fun because you get to say, 'Oh, we have a bunch of vials. Please don’t touch that.' There are a few other random uses for RFID that I wanted to mention, such as wireless access points and smart dust.
00:06:00.709 There’s a thing called the Monza X2K, which is a UHF RFID reader that can hold about 9,000 bits. It can be attached to a circuit board or a microcontroller, allowing it to passively pass information to the processor even if the device is turned off. Now, how is this being used? Microsoft is starting to use these in some of their tablets. The idea is that you go into the store, purchase your product without anyone noticing it, activate it as you buy it, and a signal is sent to a turned-off device, notifying it that this was a legitimate purchase and that it is now under warranty.
00:07:12.000 However, if you try to walk out of the store with it before activating, the device will remain turned off, which is both cool and a bit scary. Additionally, smart dust consists of tiny RFID chips that create wireless sensor networks. These are starting to be used in neural networks to control artificial robotic limbs. It’s truly wild technology.
00:08:14.400 Most people are probably familiar with RFID tags, as they are commonly used in industrial farming and for tracking pets. They are also used to monitor personnel movements within buildings at doors and elevators. Every time I discuss this topic, the privacy question inevitably arises. RFID tags are becoming cheaper and more widespread, but they are still not well understood by the general public. The range for reading one of these embedded RFID chips is centimeters—not feet, not even inches.
00:09:16.130 Concerns about being tracked by RFID tags may be somewhat exaggerated. While it’s wise to be cautious, the fact is that when we’re carrying networked computers that determine our location using satellite signals, we should be more concerned about that than RFID tracking. If this is a concern for you, let me offer a bit of advice.
00:09:53.400 Alright, so here we have an RFID tag, as we can see it’s red. You can find yourself some tin foil and make a hat to block RFID signals. They work! Now let’s talk about some limitations and disadvantages of RFID tags. There are certain physical limitations; for example, you can’t read through aluminum foil. Tracking people can be difficult when signals don’t penetrate liquids.
00:10:43.500 There’s also a problem called signal collision. If you try to read too many tags in one spot, things can go wrong. Just as if two readers are attempting to read a single tag, the reader becomes confused and fails to communicate effectively.
00:11:11.880 However, higher-end hardware has better collision detection capabilities. Generally speaking, there are standards for scanning RFID tags, such as the UHF Gen 2 tag, where the first three numbers indicate the manufacturer if bought in the U.S. However, regulations vary elsewhere, and privacy concerns are being worked on. One interesting concept is 'zombie tags.' These tags deactivate their signal after purchase, making them undetectable unless they are reactivated with a special code.
00:12:31.250 This technology is useful as a security measure and prevents concerns regarding tracking products after leaving the store. There’s also a further advantage for return policies; when returning a product, the tags can be reactivated for resale. Now, why Ruby? You may wonder why I’m discussing RFID tags and all of this humorous goofiness. The technology has developed over the last ten years, and libraries have been built to make programming much easier.
00:13:43.320 Ten years ago, working in this space required an electrical engineer to help write the software. Now, manufacturers are exposing APIs and WebSockets, which make Ruby an excellent language for this field. In my personal work, I often collaborate with scientists who are already familiar with Python, making it easy to transition into Ruby. It brings me joy.
00:14:12.960 This talk provides a high-level overview. If you'd like to delve deeper into frequency ranges for UHF tags versus HF and NFC, I'm happy to talk about that after Matt's presentation over coffee. I’m also open to taking on simple coding tasks over a beer!
00:14:41.760 Let's get to some less practical uses. This is Betty, my dog. I’m very thankful to the RubyConf organizers for this opportunity, but they did say I couldn’t bring her along today, so you'll have to imagine her if you will. Recently, Betty signed up for Twitter, and she has been tweeting a little bit (though it's difficult without thumbs!).
00:15:04.980 I have an RFID antenna by my back door and the software running on a Raspberry Pi. I’d let my dog out, thinking I would be able to test my setup, but then an hour later she would scratch at the door, giving me that sad look because I forgot to let her back in. I love my dog; she's wonderful! So I ended up coming up with a different solution.
00:16:07.009 What I now have is a system that watches for Betty. She has an RFID chip in her collar. So when Betty goes outside, the system recognizes her RFID tag and lets her know she's outside. Unfortunately, technical issues occasionally occur, but when this system functions correctly, it also tweets me to let me know that she is outside, ensuring I won’t forget to let her in!
00:16:58.170 The software observes our WebSocket for events associated with Betty’s tag. When her tag is detected, it performs one of two actions. This is one of the many reasons I love Ruby—it allows for rapid development and testing of ideas!
00:18:01.890 Now, let’s discuss the concept of the Internet of Things. I'll admit that I don't particularly like this phrase; it feels like a buzzword. As Julian mentioned, should your fridge really be internet-connected just to tell you when you’re out of eggs? I mean, you probably stopped eating eggs months ago!
00:19:13.330 Instead, I have created a smart trash can that logs the items you throw away so you can keep track of what's running out over time. I've recently brought some items from my house to use in a demonstration. For instance, taco shells, mason jar covers, ginseng tea, and even stool softeners!
00:20:06.170 As the week goes on, you will throw away these things, and the smart trash can simply logs that, keeping a shopping list that anyone can access from a web browser. This way, while your loved ones are out shopping, they can easily see what you need to restock. This is just one of the ways you can take advantage of RFID technology at home.
00:21:50.510 Furthermore, you can even get RFID bracelets for your family members to measure their wastefulness! Tagging them and then gently teasing them about it can lead to some amusing family interactions.
00:22:03.850 In a similar vein, I’ve rigged up an RFID scanner in my bedroom. I created a fashion portal of sorts to help me make better clothes decisions. The idea is that when I wake up, I can easily choose from my wardrobe based on activities I have planned for the day.
00:23:13.820 The RFID reader scans the items and helps me select the right clothing based on the occasion. This simplifies my morning routine immensely! Plus, I get to feel good about my clothing choices.
00:24:37.100 Today, my talk has covered a wide spectrum of RFID applications, from practical to humorous. I didn't dive into writing RFID tags or the security concerns that might come with them, as that could take up far too much time. RFID is its own vast topic, but the enthusiasm it generates can lead to creativity and innovation.
00:25:59.950 I hope everyone here takes away the notion that there are numerous ways to explore technology and have fun with it, whether that means annoying your pets or friends. I want to share a fun little starter activity. If anyone wants to join me, I'll be handing out starter cards that'll guide you to examine RFID tags to solve a small mystery.
00:27:37.370 I urge you to grab some people and give it a shot. If you want to pursue some more advanced RFID projects or discuss any ideas, feel free to reach out. Thank you for allowing me to speak today, and I look forward to your questions!
00:29:28.250 Does anybody want a foil hat? The kind of tags that are more advanced generally have a high success rate, while basic tags, especially paper ones, have a very low rate of reliable reads. Typically, these tags are printed and assigned a corresponding barcode using specialized printers.
00:30:23.268 There are many types of RFID tags, including NFC, which is fascinating but operates at a much shorter range. With the right equipment, I can read my dog Betty's RFID tag from about 30 feet away. While there are cheaper alternatives for RFID technologies available, higher-end applications are definitely industrial-grade equipment.
00:31:57.480 RFID tags are put to use in various sectors, such as inventory management at construction sites, where they are used to manage beams. These tags must withstand harsh conditions, ensuring they function accurately for many years, sometimes exceeding their expected lifespan. The critical aspect of selecting RFID-friendly materials and devices is crucial for optimal functionality.
00:33:18.230 Addressing the concerns of multiple tags responding simultaneously, the solution involves using advanced industrial-grade readers, maximizing the efficiency and effectiveness of reading tags accurately. Overall, RFID technology is continuously evolving, opening avenues for innovative applications in various industries. Thank you once again for your time!