Instructables

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.
 
Remove these adsRemove these ads by Signing Up

Step 1: You will need

Picture of You will need
Parts
  • 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

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

tatulea1 year ago
Can you simplify it? I want to see just the code that give me iButton.
tatulea1 year ago
Which part of this code I need to copy in my sketch for i can read the iButton?
kenyer (author)  tatulea1 year ago
This should do the job:

#include <OneWire.h>

OneWire  ds(12);
byte addr[8];
int but[6] = {0,149,107,48,13,0};
String keyStatus="";

void setup(void) {
  Serial.begin(9600);
  pinMode(13, OUTPUT);
 
}

void loop(void) {
  getKeyCode();

Serial.println("");
  if(keyStatus=="ok"){
      byte i;
      for( i = 5; i >0; i--) {
           Serial.print(" : ");
           Serial.print(addr[i], DEC);
          
      }
      if(addr[1] == but[1] && addr[2] == but[2] && addr[3] == but[3] && addr[4] == but[4]){
      digitalWrite(13, HIGH);
      delay(500);
      digitalWrite(13, LOW);}
      else {digitalWrite(13, LOW);}
  }
  else if (keyStatus!="") { Serial.print(keyStatus);}
 
  delay(1000);
}

void getKeyCode(){
  byte present = 0;
  byte data[12];
  keyStatus="";
 
  if ( !ds.search(addr)) {
      ds.reset_search();
      return;
  }

  if ( OneWire::crc8( addr, 7) != addr[7]) {
      keyStatus="CRC invalid";
      return;
  }
 
  if ( addr[0] != 0x01) {
      keyStatus="not DS1990A";
      return;
  }
  keyStatus="ok";
  ds.reset();
}

tatulea1 year ago
What iButton reader you used?
kenyer (author)  tatulea1 year ago
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.
techxpert2 years ago
one question what's a ibutton
kenyer (author)  techxpert2 years ago
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: Maxim
thanks :)
alahamm2 years ago
Nice job! Sure wish I had all those tools, but I´ll settle for a translator.
nolte9192 years ago
Where oh where did you find LCD displays for less than a buck??
kenyer (author)  nolte9192 years ago
On "www.marktplaats.nl" that's a Dutch kind of Ebay. I was really lucky with them.
Cello622 years ago
Nice project and a very good instructables.
jam BD2 years ago
Amazing project... Nice integration and great 'ible