AVR HID RFID, take 1…
I've been slowly making progress building my own AVR RFID according to the instructions in this blog: http://scanlime.org/2011/05/duct-tape-rfid-tag-1/
After building the assembly code for HID tag type, I obtained a ATTiny85 and a handful of ATMega168s. I wanted to prototype first with the Tiny85s, but I have a cheap and plentiful source for the 168s and wanted to use those if possible: http://store.atxhackerspace.org/
Building the code for the ATMega168 turned out to be challenging, as I kept getting the same compiler error over and over and just couldn't fix it with any of the most common suggestions I found by googling:
C:AppDataLocalTemp/cc69IjcD.o: In function `loop': (.text+0x1d12): relocation truncated to fit: R_AVR_13_PCREL against `no symbol'
This comment gave me the clue:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=764390
"... IOW, you are trying to RJMP to a location that
cannot be reached that way. .."
Researching rjmp vs jmp I found this thread..
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=21053&start=0
I changed the "rjmp loop" to "jmp loop" and it compiles now. Whether it works or not, we'll see
Back to the Tiny85, I got one and soldered it to a $2 Surfboard from Frys. This was my first experience hand soldering SMD components and it was pretty challenging but I managed to do a pretty good job. This was a little crazier by the fact that I had purchased 0203-sized (grain of sand) sized parts without thinking it through.
In the end, I was able to successfully solder the 2 caps in place on the surfboard. (Circled in red)
To make the antenna, I laboriously made a 66mm form out of cardboard, started winding it, and noticed a nearby beer can. Just for fun, I measured the beer can and it turned out to be... 66 mm! What are the odds?
I wound approximately 100 turns of 30 gauge magnet wire (or maybe 98... or 102...
, slipped it off the can, and stuck it to a clear packing tape backing. I soldered a 1x4 male 0.1 header strip flat against the contacts to connect the bus pirate probes up to for (very slow) programming purposes.
Ultimately, unfortunately my first test was a failure. Swiping the "badge" by the hackerspace and my office readers does not result in a beep. I'm certain the hackerspace badge is the right type. After looking closer, I realized I had attached the capacitor in series with the antenna rather than in parallel.
After fixing the error this morning (with a parts-bin capacitor roughly 100 times larger than the original
, the badge still does not garner a beep from the card reader.
I have to say, I'm pretty pleased with myself for just getting this far, it does look pretty neat even when it doesn't work.
Next steps: probe the antenna leads with the oscilloscope while trying to read the badge to check for resonance; also go back to the formula and try to recalculate the antenna length. Perhaps using a heavier-gauge wire or a slightly incorrect number of turns of wire resulted in a change in the resonant frequency? (I don't really know what I'm doing here yet, just learning as I go
I'll also probably also attempt to build my own reader at some point using these instructions here by the same author: http://forums.parallax.com/showthread.php?105889-World-s-simplest-RFID-reader



June 21st, 2011 - 11:33
that looks like a lot of fun! How are you enjoying the Bus Pirate? I confess to not firing mine up yet, but realized just yesterday I can use it as a serial port to tweak my Samsung TV via its serial port