Dangerous Things
Custom gadgetry for the discerning hacker

The Store is now open! Check out the gadgetry »
Like what you're reading?
Share It.

RTOTD: Sprezzatura – Writing RFID Toys

Random Thought Of The Day

From Wikipedia; Sprezzatura (Italian pronunciation: [sprettsaˈtura]) is an Italian word originating from Baldassare Castiglione’s The Book of the Courtier, where it is defined by the author as “a certain nonchalance, so as to conceal all art and make whatever one does or says appear to be without effort and almost without any thought about it”. It is the ability of the Courtier to display “an easy facility in accomplishing difficult actions which hides the conscious effort that went into them”

When I was still in high school, the people were connecting to this new thing called “the Internet” over 14.4k modems. By the time I graduated and went to college, 33.6k modems were available, and a friend of mine called me up and said “We should start an ISP”. All the computer science courses were way behind the times anyway, so I dropped out and we got to work… I think we were 17 and 18 respectively. We found out quickly that technical ability means nothing if you don’t know how to actually run a business. From day 1 we were expertly swindled by GTE (now Verizon), then the phone companies themselves got into the dial-up Internet access business, and we spent all our time actually living in the office playing games, surfing the web at 1.5Mbps (blazing fast!), and regularly harassing the clerk at the nearby Chevron gas station between the hours of 11pm and 6am. As you might have guessed, the business didn’t last more than a few years… but man those were fun years.

Back then I thought retirement was a couple short years away. I believed doing something, anything, was pretty easy. I’d hear news stories and read magazines like Wired (which had just come out) with articles about kids starting businesses and selling them for millions, and people building amazing projects / devices / services / things. The way those people and things are represented… that’s the issue I’m exploring with this post.

Just about everything you observe with your eyes and ears today comes with a healthy dose of sprezzatura. It’s as if nothing in this world takes any effort at all, and it leaves some of us (myself included) feeling bewildered as to why doing something, anything, is so difficult, but seems effortless for everyone else. From social media (facebook, twitter, youtube, etc.) to magazines and news reports, life itself seems to be slathered with glitter and make-up and spackle, then edited together to remove all the difficult preparation, trial-and-error, and ultimately remove all traces of effort that went into whatever is being presented. The difficulty that is actually shown/reported seems solitary… detached and separate from people who appear to be able to simply float through life. Mentally, this tends to falsely create the appearance of a huge gap, where the world is jam packed with people who are either completely destitute/ugly/stupid or wildly successful/beautiful/intelligent without even trying… leaving you there standing in the middle trying like mad to figure out why you’re the only person in existence who isn’t in either of those two groups.

On a conscious level, it’s obvious that this is not the true state of things. Everyone knows, when they think about it, that photos in magazines are illusions made by teams of people and digital magic tricks. I also think everyone also has at least some sense that captains of industry, wunderkinds, and “smarty pants” types who do amazing things like build funky garage projects or launch and sell a business do a lot of work behind the scenes and leverage their experience and/or the experience of others to get those seemingly amazing feats accomplished. So if we all fundamentally understand these truths, why am I bothering to post this?

The Dove “Evolution of Beauty” video is old news, but I still enjoy watching it at least once a year. It strips away the multiple thick layers of sprezzatura so meticulously applied to something so benign as a single magazine cover photo, and reminds me that nearly everything I see and hear on a daily basis is the end result of mountains of preparation and effort, and that all my efforts to build or do something amazing are both necessary and commonplace. I ran into this hurdle when I wrote RFID Toys for Wiley Publishing.

Back in 2005, shortly after news broke about the RFID implants, Wiley Publishing approached me and asked if I would write a book that detailed how to build 15-20 projects centered around RFID technology. I had only just started working with RFID technology 45 days earlier, and that was in a hobbyist capacity. Now I had a book publisher telling me they wanted the book completed, start to finish, in 3 months or less. I told them I would write the book, but I could accomplish what they wanted in maybe 5 or 6 months, not 3. They sent me an advance for $10,000 and told me to get to work, because if it took more than 6 months the project would be called off and they’d want their money back. This was not an option, because I was going to be rejecting consulting jobs and living off that advance while I tackled this book. I figured if I could get the book done in 5 months, that would give me $2000/mo to live off of as well as purchase the equipment and tools I needed for the book. The book barely broke the advance before going out of print, and ultimately I lost money writing RFID Toys… but I think the experience was totally worth it.

Writing the book took more time and effort and stress than I could have ever imagined when I told Wiley I’d do it. The very first thing I had to do was come up with an outline, which means I had to think up 15-20 projects that involved RFID in some way, and they had to be realistic (i.e. both I and the readers could build them). That meant nothing that cost too much or was too technically challenging. It soon became clear I would not be able to cover 20 projects, so I negotiated it down to 11. Now I had 11 projects I had to actually design, build, troubleshoot, rebuild, and meticulously document along the way. In the end, I was only able to come up with 9 projects, and I padded the book by writing other chapters that had interesting content but no actual projects.

Doing the actual writing was the easy part. After a hard day of work in the garage trying to get these projects actually working, sitting at the computer in the evening editing photos and writing instructions was almost relaxing in a way. When working on a project, I had to take notes and pictures at every step. I had to take a lot of pictures with and without the flash. I had to ensure they were in focus, especially the ones I took without the flash. Then I’d do the next step in the project and repeat with the photos and notes. This process takes a long time, and it is especially frustrating when you drill a hole in the wrong place and have to find ways to hide it in the photos or have to buy a new widget and start all over… or build an entire circuit and wire it all up only to find it doesn’t work for some reason and you have to tear it all apart to find the problem. Doing a single build takes days, then another day or two for photo-shopping, draft writing, and draft editing… and that’s not to mention the projects that involved writing software. Whether it was a desktop app or microprocessor firmware… writing software takes time to design, build, and test just like hardware.

The timeline involved kept the stress level high. I remember writing chapter 5, the fire safe chapter, was particularly difficult. It involved hacking an electronic pin-code fire safe to open with an authorized RFID tag. The difficulty in writing a book like this with a short timeline and on such limited funds is that you really have to do as much research and concept/design work as you can before you go out and buy what you think will work for the project… but the limited timeline keeps that research period very short. In most cases I basically just ran out the door and did 5 minutes of research standing there at the store before buying whatever it was and dragging it home to the garage to tear apart. At first I didn’t know if I would be using an full on electronic pin-code safe, or a simple metal box with a solenoid as a locking mechanism. Standing in the store staring at safes, I used the tools I brought with me in my back pocket to crack open some of the fire safes out on display. The store clerks were not too happy with that, so I explained I was writing a book and I needed to see what was inside before purchasing. That didn’t seem to help the situation, but I had already removed the inside cover plate of an electronic pin-pad safe and saw what I needed to see… a simple locking mechanism controlled by a solenoid. I bought the safe and lugged it home.

There was a duality in dealing with the fire safe. On one hand I had the locking mechanism, which was a very simple circuit. I could easily see that a small reed relay could be used to energize the solenoid without interfering with the original pin-pad circuitry. The pin-pad circuitry on the other hand was a nightmare. The goal was to enable the user to press the START button on the pin-pad, then either press in a PIN code or scan an RFID tag. Don’t ask my why the designers put a START button on the pad, but I figured it would serve my purposes perfectly so I appreciated their design choice. I needed a start button of some kind because I knew that the safe’s batteries would only keep an RFID reader and microprocessor powered up for a few hours. In the store, I noticed when I pressed the start button, the LCD screen had a backlight that lit up for a few seconds. I knew I could use this behavior to switch on a transistor that in turn powered up the RFID reader.

After testing pins on the main control IC with a multimeter, I found the one used to power up the LCD backlight. I connected that pin to a transistor and tested using the IC signal to switch the transistor, which then powered up the RFID reader and microprocessor. I then connected the microprocessor to the reed relay and tested the whole system together and it worked as expected. I put it all together, taking notes and photos the whole way… then started doing the write-up. This process sounds simple, but it took about a week. There were issues with the safe door locking hardware, problems getting parts together, fitting the RFID reader board in behind the pin-pad, etc. After the write-up was finally done I tested the safe again, but this time it didn’t work. Great.

I pressed the start button on the safe and the LCD lit up. I presented an RFID tag to the reader and I heard the solenoid click open, but then immediately clack closed. What was going on? I had a complete chapter that was obviously based on a flawed design. After tearing it all apart, eventually I figured out that the fresh-out-of-the-package AA batteries I put in the fire safe’s battery pack had settled down into their typical “workhorse” output. Batteries ship out completely topped off and it doesn’t take much to shave a few millivolts off the top of a battery’s typical “under load” output. Well, under this more typical battery output scenario, the LCD backlight would power up, then the RFID reader and microprocessor would power up… no problems so far. But when an authorized RFID tag was presented, the solenoid would energize using the safe’s battery pack… and that dropped the supply voltage enough for the pin-pad’s IC output to dip to the point where the transistor switched off and killed power to the RFID reader and microprocessor, thus killing power to the reed relay and solenoid. From the outside, it just looked like the solenoid was toggling on for a microsecond, then off again… but internally it was a cascade of failures. Tearing the whole thing apart was no picnic after thinking I was finished, but it had to be done.

With the guts all torn out, I tested the solenoid’s energizing voltage requirement and found it was low. The solenoid was chosen by the safe’s designers for it’s low energizing voltage to ensure the safe would still unlock even if the batteries were in poor condition. Well this design concept was going right out the window. I didn’t have time to redesign my whole approach, so I stuck a resistor in series with the solenoid to split the voltage and let the pin-pad get a little more juice while the solenoid was energized. This reduced the low battery functionality of the safe, but because the safe’s battery pack was externally accessible I figured it wasn’t a serious problem… the user could just put in new batteries if they got too low. The solution worked and in long term testing I could get months of use with this approach, but at the time I wasn’t sure if the solution was solid or not, so after taking the necessary photos I tore the pin-pad transistor circuit out and started a new branch of photos and notes detailing how to install a push-button option. The push-button option side-stepped the pin-pad issue completely and let the user just press a button to power up the RFID reader and microprocessor.

All in all, the amount of work and trial-and-error that went into writing the book is completely shrouded. Before writing it, I would read through other “how-to” books and marvel at how smart these guys were and how easy they could just build these project and it was all so simple for them… while I was getting lost just trying to follow along. While the people that write these books and do other various amazing things in the world are pretty smart, I’m pretty sure they went through the same kind of trials and frustrations I did. Knowing that makes me respect those people in a whole different way… less reverence and more appreciation. I sometimes get people emailing me or posting on the RFID Toys forum that express shame about their own efforts or emphasize their lack of knowledge, while at the same time telling me I’m some kind of genius. For those of you who might somehow feel that way (and have read this far), I hope this post has done something to evaporate the sprezzatura surrounding RFID Toys and the projects within. Only through hard work and much effort is it possible to create something even as simple as this book. Next time you marvel at a fancy new widget or funky web service or slick hack project someone built, never forget the abundance of covert work and shrouded effort that really goes into creating something simple, let alone amazing.

Tags:

Leave a Reply

Get Adobe Flash player