iButtons are small button like casings that communicate with only 2 wires. They are incredibly robust and all have a unique serial number which is hardware written into the device and never repeated. They are cheap (about 1 Pound / 1,50 Euro/ $2)

This serial number allows the keys to be truly unique and thus are effectively secure. I have seen them used:
>as the till logon device at bars
>in securicor money cases
>computer logins
>as secure dongles used with expensive software.
>...as door locks!

The problem with using them for the beginner, is that you have to be able to program hardware to read them and if you loose the key, the locking device is useless!

This Instructable shows you how to build a lock, and a USB programmer that enables you to write new keys to the lock in seconds, without dismantling the unit. Making the lock completely secure and updatable for up to 80 keys at a time. The lock can work on between 5-30V AC or DC and so is incredibly flexible; designed to work on the same voltage as your electronic door release - you can buy the cheapest or most expensive one you find, Fail-Locked or Fail-Unlocked, AC or DC, 12V or 24V.

What you will need:
>Components (see next)
>PIC programmer
>Electronic door release.
>PCB making equipment (if you want to make it look puurdy)

This is an old instructable that I haven't uploaded for some reason. If you have trouble building it, email me and I will happily help - however, I can't guarantee I've made it as simple as possible - sorry - hopefully it'll give inspiration if nothing else.

Step 1: The Process

Firstly you'll need to decide which type of lock you need.

FAIL SAFE/UNLOCKED remain open when the unit looses power. This would generally be used if the door nbeeds to be accessable in the event of a power failure - e.g Fire

FAIL SECURE/LOCKED remain locked unless power is applied to the lock. These would be more appropriate when using a traditional door entry system, having the door traditionally locked at all times, unless power is applied.

Below is a flow chart to show how the device operates.
Simply, if you enter a key, the microprocessor firsts checks to see if it's a programming key, or it's an access key.

If it's an [iButton] access key, the microprocessor checks against the list of known keys stored in it's EEPROM (memory), if it finds it, it lets you in. Otherwise it will send a red-light to say that no access is granted.

If it's a reprogrammable key of any type (e.g. an iButton with a new list of keys to store on the internal EEPROM). It will check if the ibutton is allowed to re-program the internal EEPROM but checking it's authentication code. (This is programmed into the iButton by the USB programmer and this you can't change - see last page for info). 
If the iButton is allowed to program the internal EEPROM, the LED will flash Green/Orange and then microprocessor will pull all the key-codes off the iButton and store them to it's internal EEPROM. This will cause the LED to flicker and could take up to 20 seconds - do not remove the key while this is happening. The LEDS will then pulse green to indicate the programming is over - now remove the iButton.
<p>Hi Daniel, THANKs for posting this. If I cant source an F628,any substitue?</p>

About This Instructable




Bio: Daniel Crane by real name terms, teacher of secondary science (Physics) and a cheap-skate when it comes to buying equipment... espescially when you can make ... More »
More by Dandymon:USB Reprogrammable iButton door lock Sony XPLOD Car stereo stalk adapter / AUX out hack DIY PCB Bubble Etch Tank 
Add instructable to: