Access Control System

Hi Guys, I am trying to make a codepad access system for one of the doors at the office. Does anyone know of a way to store numerous four digit codes within the Arduino or external memory and have them checked instantly?

Ideally when the user types in there code, the Arduino compares that there code to the stored codes and if there is a match then the door is released.

I am not even sure where to start on this one so any help would be greatly appreciated.

Thanks in advance, Alex

You could use an SD card to store the valid numbers. Then, when a number is entered, you could check whether the number was in the file. It will not be instantaneous, as you suggest, but, then nothing ever is.

Properly set up, the validity of the number can be determined quickly.

The limiting factors are the number of digits in the number and the number of numbers to check against, and whether the data is stored as numbers or as strings.

Depending on the number of unique access codes, could they not just be stored in the program memory (decleared as values stored in an array)? I would imagine that the program wouldn't be too big so you could store a few numbers in the array. There are a few RFID access control examples floating around the place, could use the access granting code from those as a base for your code ;)