{"id":104,"date":"2011-09-19T13:33:25","date_gmt":"2011-09-19T11:33:25","guid":{"rendered":"http:\/\/blog.ulrichard.ch\/?p=104"},"modified":"2011-09-19T13:33:25","modified_gmt":"2011-09-19T11:33:25","slug":"make-an-rfid-tag-with-an-attiny-and-a-coil","status":"publish","type":"post","link":"https:\/\/ulrichard.ch\/blog\/?p=104","title":{"rendered":"Make an RFID tag with an AtTiny and a coil"},"content":{"rendered":"<p>When I stumbled across <a href=\"http:\/\/scanlime.org\/2008\/09\/using-an-avr-as-an-rfid-tag\/\">this blog post<\/a>, I was sure I have to try this at home. I had some interest in RFID for a while, but the <a href=\"http:\/\/hackable-devices.org\/products\/product\/proxmark-iii-rfid-card-no-more-kitting-edition\/\">Proxmark<\/a> was too pricy for me just to play with. So this experiment came just right.<\/p>\n<p>The attiny85&#8217;s were difficult to get in Switzerland, so I ordered them from Germany along with an <a href=\"http:\/\/www.reichelt.de\/Programmer-Entwicklungstools\/DIAMEX-USB-ISP\/index.html?ACTION=3&amp;GROUPID=5100&amp;ARTICLE=110344&amp;SHOW=1&amp;START=0&amp;OFFSET=100&amp;\">ISP programmer<\/a>. I think it would also work with other AtTiny&#8217;s for example the 45 is available from Conrad. The hex file is just 1.7 kB, so the AtTiny45 should suffice.<\/p>\n<p><!--more-->After learning how to use the programmer with avrdude, the chip was quickly programmed. But I couldn&#8217;t get it to work with the <a href=\"http:\/\/www1.conrad.ch\/scripts\/wgate\/zcop_ch2\/~flN0YXRlPTIzNzQ5MzYw====?~template=pcat_product_details_document&amp;product_show_id=536350&amp;no_brotkrumennavi=1&amp;zhmmh_area_kz=LN\">tiny fixed coils<\/a>. So I refreshed some theory about coils and LC filters, that I didn&#8217;t use in ten years, and wrapped a coil myself with 1 mH. <a href=\"https:\/\/market.android.com\/details?id=it.android.demi.elettronica&amp;feature=search_result\">ElectroDrod<\/a> simplified the caluations. With this coil connected to the IC, I got the same reading from my <a href=\"http:\/\/www1.conrad.ch\/fas6\/fh.php?fh_host=http:\/\/www1.conrad.ch&amp;fh_session=\/scripts\/wgate\/zcop_ch2\/~flN0YXRlPTIyMzc0NzcyNzQ=?&amp;fh_pic_url=\/\/media.conrad.com&amp;layout=b2c&amp;finder=&amp;fh_params=fh_search%3Drfid%26fh_secondid%3Dch2191553%26fh_lister_pos%3D9%26fh_location%3D%252f%252fb2cconrad_ch_b2c%252fde_DE%252f%2524s%253drfid%26fh_eds%3D%25c3%259f%26fh_refview%3Dsearch\">RFID-Reader<\/a> as for the reference tag.<\/p>\n<p>I don&#8217;t understand how the copy protection that some vendors advertise their system works. I always thought entrance qualification systems used some sort of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Challenge-response_authentication#Cryptographic_techniques\">cryptographic challenge response<\/a> scheme. But that would require two way communication&#8230; I wouldn&#8217;t consider these systems secure if it&#8217;s so easy to copy the keys.<\/p>\n<p>Now the interesting part was if my prototype would work not just with my RFID reader, but with a real entrance qualification system&#8230; And eureka, it works!! It needs half a second longer to charge, but then lets me in. The same housing also supports <a href=\"http:\/\/de.wikipedia.org\/wiki\/Mifare\">mifare<\/a> or <a href=\"http:\/\/de.wikipedia.org\/wiki\/Legic\">legic<\/a> readers, but ours are only <a href=\"http:\/\/server5.gs-shop.de\/200\/cgi-bin\/shop.dll?AnbieterID=12724&amp;bnr=0.08-026421.10&amp;PKEY=7387&amp;Hauptseite=detail.htm\">proX2<\/a> and the tags are <a href=\"http:\/\/www.fiscard.de\/plastikkarten\/beruehungslos.php?we_objectID=116\">EM4102<\/a>. While the other options are also possible to copy, that&#8217;s a lot harder.<\/p>\n<p>Here is the mterial list:<\/p>\n<ul>\n<li>1 x<a href=\"http:\/\/www.reichelt.de\/Atmel-Attiny-AVRs\/ATTINY-85-20-PU\/index.html?ACTION=3&amp;GROUPID=2958&amp;ARTICLE=69299&amp;SHOW=1&amp;START=0&amp;OFFSET=16&amp;\"> AtTiny85<\/a> : (EUR 2.10)<\/li>\n<li>ca 15m of <a href=\"http:\/\/www1.conrad.ch\/scripts\/wgate\/zcop_ch2\/~flN0YXRlPTIyMzc0NzcyNzQ=?~template=PCAT_suchergebnis&amp;p_searchstring=607584&amp;p_searchstring_artnr=607584&amp;p_back_template=&amp;zhmmh_area_kz=&amp;sp_insert_kz=&amp;s_haupt_kategorie=&amp;p_page_to_display=DirektSearch&amp;p_load_area=$ROOT&amp;p_artikelbilder_mode=&amp;p_sortopt=&amp;page=&amp;p_catalog_max_results=20v\">enamelled copper wire<\/a>. (CHF 6.40 per 50 meters)<\/li>\n<\/ul>\n<p>And what you need as well:<\/p>\n<ul>\n<li>An ISP programmer for example a <a href=\"http:\/\/www.reichelt.de\/Programmer-Entwicklungstools\/DIAMEX-USB-ISP\/index.html?ACTION=3&amp;GROUPID=5100&amp;ARTICLE=110344&amp;SHOW=1&amp;START=0&amp;OFFSET=100&amp;\">diamex avr<\/a><\/li>\n<li>Useful, but not required: <a href=\"http:\/\/tinkerlog.com\/howto\/tiny25-header\/\">programmer PCB<\/a><\/li>\n<li>An RFID reader such as the <a href=\"http:\/\/www1.conrad.ch\/scripts\/wgate\/zcop_ch2\/~flN0YXRlPTIyMzc0NzcyNzQ=?~template=pcat_product_details_document&amp;product_show_id=191553&amp;no_brotkrumennavi=1&amp;zhmmh_area_kz=LN\">Towitech<\/a><\/li>\n<li>An Oscilloscope such as the <a href=\"http:\/\/www.seeedstudio.com\/depot\/micro-digital-storage-oscilloscopedso-nano-p-512.html\">DSO Nano<\/a><\/li>\n<li>And of course a soldering iron and\u00c2\u00a0 computer<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ulrichard.ch\/piwigo\/index.php?\/category\/72\"><img decoding=\"async\" src=\"https:\/\/ulrichard.ch\/piwigo\/_data\/i\/upload\/2015\/11\/12\/20151112205918-8628c29f-th.jpg\" alt=\"\" \/><\/a><\/p>\n<p>Meanwhile I found another very <a href=\"http:\/\/www.openpcd.org\/Live_RFID_Hacking_System\">interesting site about RFID<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I stumbled across this blog post, I was sure I have to try this at home. I had some interest in RFID for a while, but the Proxmark was too pricy for me just to play with. So this experiment came just right. The attiny85&#8217;s were difficult to get in Switzerland, so I ordered [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7,1],"tags":[26,28,185],"class_list":["post-104","post","type-post","status-publish","format-standard","hentry","category-projects","category-software","category-uncategorized","tag-attiny","tag-avr","tag-rfid"],"_links":{"self":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=104"}],"version-history":[{"count":0,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions"}],"wp:attachment":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}