I've made an iButton garagedoor opener and logger.

On a Dutch (kind of) eBay (www.marktplaats.nl) I found some iButtons and readers very cheap. I had no idea what to do with them, but I bought them anyway.
My garage opens with a push on a button, so it must be possible to get that working with the iButton.
I also found some really cheap (0,50 euro) displays, so it would be nice if I also can make a screen to show me who entered when.
The project is now existing in three parts:

  1. The iButton opening the door
  2. A clock keeping track of times and dates
  3. A screen showing the information
So to keep things understandable I try first to figure out the three parts separately.

Step 1: You Will Need

  • iButton(s)
  • iButton reader
  • Arduino
  • 2 push buttons
  • power supply
  • 2 10 kOhms resistors
  • 220 Ohms resistor
  • 2,2 kOhms resistor
  • 10 kOhms potmeter
  • LCD-display with HD44780 controller
  • NPN transistor
  • relais
  • 1N4001 diode
  • some wire
  • PCB

  • soldering iron
  • solder
  • snips
  • breadboard
  • computer with Arduino software
  • a LED

<p>jou button sketch geeft dit aan: : 0 : 24 : 114 : 58 : 196 </p><p>echter mis ik hier dus de 6de waarde. ook als ik deze reeks invul in jou button sketch gaat mijn led niet aan. </p><p>ik heb het als volgt ingevuld: </p><p>////</p><p>OneWire ds(12);</p><p>byte addr[8];</p><p>int but[6] = {0,24,114,58,196};</p><p>String keyStatus=&quot;&quot;;</p><p>///</p><p>ook als ik int but naar 5 verander gebeurd er niks</p><p>Sorry voor de vele vragen. Ik probeer dit werkend te krijgen voor een scouting vereniging die met ibuttons werkt. </p>
Probeer er eens ,0 achter te zetten. 0,24,114,58,196,0
Al gegeprobeerd :(. Ik heb er al een 0 achter gezet ook een 0 ervoor. Ik kom er maar niet uit. Je klok sletch doet het perfect en deze lijkt het ook prima te doen behalve dat ik de nummers van mn iButtons niet kan vinden danwel niet goed is.<br>
<p>Het probleem is dat al mijn oudere sketches op een inmiddels overleden harddisk stonden, dus ik heb niets meer van dit project, behalve wat in deze Ible staat. Ik kan dus niet meer even terug naar de originele Nederlandse aantekeningen. Zit je toevallig ergens in de buurt? ik zit in de Hoekse Waard.</p>
Ik zal weer even in de sketch moeten duiken. Als je over een paar dagen nog niets hebt gehoord, moet je nog maar even een berichtje als reminder sturen.
<p>je bent echt een held. alvast bedankt!</p>
<p>Hoi Joran,</p><p>Als je de sketch in stap 2 &quot;iButton.pde&quot; draait en de ibutton lezer aansluit, dan kan je in de serial monitor de waardes zien die je moet invullen als je de iButton op de leze houdt.</p><p>Ik hoop dat dit je verder helpt.</p>
<p>Hoe kan ik aan het nummer van mijn iButton komen? ik loop hier op vast. al van alles geprobeerd maar het nummer op de onderkant van mijn ibutton pakt hij niet omdat hier ook letters in staan. dit is de code die onderop staat: 87000018723AC401 wat moet ik dan in jou sketch invullen? Groet, Joran</p>
<p>Hoi Joran,</p><p>Het is een heel oud project voor mij, dus ik moet diep in mijn geheugen graven. Zover als ik het herinner leest de sketch die ik gebruik alleen de eerste 6 cijfers en omdat de eerste en zesde bij mij steeds 0 waren gebruik ik verder in de code alleen de tweede t/m de vijfde. Ik gebruik de iButton sketch om deze cijfers van de iButton te lezen. (als ik het goed herinner)</p>
Bedankt voor je snelle antwoord. Als je heel diep graaft zou je dan weten waar je deze 12 cijfers vandaan hebt? Je zegt dat je sketch kijkt naar de eerste 6 cijfers maar ik tel in je code 12 cijfers. <br>byte addr[8];<br>int but1[6] = {0,149,107,48,13,0}; //*************the code of the iButtton****************<br>String name1 = &quot;Burton&quot;; //name should always be 6 digits<br>byte uit1 = 1;<br><br>Groet, Joran
<p>Any chance you tried this with an ibutton reader that has a LED (4 wires)?</p>
I didn't try it, but I think that the extra 2 wires are just there to light up the LED, so that wouldn't be that different. You probably can even hook it up with just 2 wires and leave the LED for what it is.
<p> ibutton includes 8 numbers.My ibuttons(i bought 10 ibuttons) start first number is 1,not 0.I found the solution.</p><p>Thank you very much.</p>
Ok, I'm glad that you've got it working. I might ask you how when I reinstall my installation the coming week ;)<br>A car drove into my house a couple of weeks ago, so I have to reinstall my system, but I am sure that won't be a problem.
<p> hello,nice project, ibutton reader (ibutton.pde) reads 5 numbers of ibutton</p><p>if(keyStatus==&quot;ok&quot;){</p><p> byte i;</p><p> for( i = 5; i &gt;0; i--) {</p><p> Serial.print(&quot; : &quot;);</p><p> Serial.print(addr[i], DEC);</p><p>,but you wrote 6 numbers of ibutton code for each user </p><p> int but1[6] = {0,149,107,48,13,0}; //*************the code of the iButtton****************</p><p>And last when program check if ibutton code is the right,program check only 4 numbers</p><p>if(addr[1] == but1[1] &amp;&amp; addr[2] == but1[2] &amp;&amp; addr[3] == but1[3] &amp;&amp; addr[4] == but1[4] &amp;&amp; uit1 == 1){welkeBut=1; name = name1;}<br></p><p>,but we read 5 numbers!!! How i know the correct 4 numbers;</p><p>Thank you very much for your help.</p>
This is an very old project for me, but if I remember correctly, the first number is always 0, so I start reading with the second number but1[1]. The first would have been but1[0]<br>But I could be wrong. <br>
Can you simplify it? I want to see just the code that give me iButton.
Which part of this code I need to copy in my sketch for i can read the iButton?
This should do the job:<br> <blockquote> <p> #include &lt;OneWire.h&gt;<br> <br> OneWire&nbsp; ds(12);<br> byte addr[8];<br> int but[6] = {0,149,107,48,13,0};<br> String keyStatus=&quot;&quot;;<br> <br> void setup(void) {<br> &nbsp; Serial.begin(9600);<br> &nbsp; pinMode(13, OUTPUT);<br> &nbsp;<br> }<br> <br> void loop(void) {<br> &nbsp; getKeyCode();<br> <br> Serial.println(&quot;&quot;);<br> &nbsp; if(keyStatus==&quot;ok&quot;){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; byte i;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for( i = 5; i &gt;0; i--) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Serial.print(&quot; : &quot;);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Serial.print(addr[i], DEC);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(addr[1] == but[1] &amp;&amp; addr[2] == but[2] &amp;&amp; addr[3] == but[3] &amp;&amp; addr[4] == but[4]){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; digitalWrite(13, HIGH);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delay(500);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; digitalWrite(13, LOW);}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else {digitalWrite(13, LOW);}<br> &nbsp; }<br> &nbsp; else if (keyStatus!=&quot;&quot;) { Serial.print(keyStatus);}<br> &nbsp;<br> &nbsp; delay(1000);<br> }<br> <br> void getKeyCode(){<br> &nbsp; byte present = 0;<br> &nbsp; byte data[12];<br> &nbsp; keyStatus=&quot;&quot;;<br> &nbsp;<br> &nbsp; if ( !ds.search(addr)) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ds.reset_search();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br> &nbsp; }<br> <br> &nbsp; if ( OneWire::crc8( addr, 7) != addr[7]) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; keyStatus=&quot;CRC invalid&quot;;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br> &nbsp; }<br> &nbsp;<br> &nbsp; if ( addr[0] != 0x01) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; keyStatus=&quot;not DS1990A&quot;;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br> &nbsp; }<br> &nbsp; keyStatus=&quot;ok&quot;;<br> &nbsp; ds.reset();<br> }</p> </blockquote>
What iButton reader you used?
The reader is a really simple thing. It is just one wire touching the side and one the front of the ibutton. There are no electronics or anything in the reader.
one question what's a ibutton
Hi, A iButton is a kind of electronic key, that looks like a button-battery. You can see them in the picture above. Every iButton has an unique number that is written in a chip inside. The communication with the iButton goes trough the 1-Wire protocol and uses, you guessed it, only one wire. See also the site off the manufacturer: <a href="http://www.maxim-ic.com/products/ibutton/ibuttons/">Maxim</a>
thanks :)
Nice job! Sure wish I had all those tools, but I&acute;ll settle for a translator.
Where oh where did you find LCD displays for less than a buck??
On &quot;www.marktplaats.nl&quot; that's a Dutch kind of Ebay. I was really lucky with them.
Nice project and a very good instructables.
Amazing project... Nice integration and great 'ible

About This Instructable




Bio: I'm a social-worker, working with 12 - 23 year-olds. I used to be a printer and I worked voluntarily in Romania for a couple of ... More »
More by kenyer:Deodorant Powder DIY Viewmaster reels Fidget toy hand spinner 
Add instructable to: