background preloader

RFID

Facebook Twitter

TKJ Electronics » Arduino RFID Door Lock. //Start#include <EEPROM.h>#include <Servo.h> //Initialiser Servo servoLock; // create servo object to control a servo // a maximum of eight servo objects can be created #define RFID_Enabled_Pin 2 // sets RFID enable pin to pin 2#define servoPin 3 // sets the servo's pin to pin 3#define LockedPos 10#define UnlockedPos 110 byte buffer[100]; //used to store the incoming bytes from the RFID byte RFID_Master[10] = {'1', '7', '0', '0', '7', 'D', 'B', '2', '4', 'F'}; //the secound RFID fob (key) to look for byte RFID_Slave1[10], RFID_Slave2[10], RFID_Slave3[10]; //the first RFID fob (key) to look for byte i; //used to keep track of which bit to write to byte i2; //used to erase the RFID fob (key) number from the buffer boolean DoorLocked; //true if door is locked void EmptySerialBuffer() { //replaces all bits in the buffer with zeros while (Serial.available()) { Serial.read(); } for (i2 = 0; i2 <= i; i2++) { buffer[i2] = 0; } i = 0;}

RFID Door Opener… | blog.flo.cx. [Arduino] Lecteur RFID à écran lcd, avec stockage du tag « valide  en EEPROM externe I2C | «Skyduino - Le DIY à la française. Bonjour tous le monde ! Aujourd’hui je vous ai préparé un petit « projet tutoriel » bien sympa ! /! \ Sketch Arduino pour l’ide 0023 (ou plus ancien) – ne compilera pas sous Arduino 1.0 à cause des changements dans la librairie Wire /! \ Ce projet est simple, j’ai une porte (ok j’ai pas vraiment de porte, je vais la simuler via deux led, mais imaginons que j’ai vraiment une porte) avec une gâchette électrique.

Imaginons que la gâchette se connecte via trois fils, un pour ouvrir, un pour fermer et une masse. Le but : Mon but est « d’arduinoniser » la porte avec un systéme de tag RFID. Le matos :- Une carte arduino UNO, - Un écran SerLCD de sparkfun, - Un lecteur RFID série de parallax (+ au moins 2 tag RFID (merci captain obvious)), - Une protoboard V2 + 2 led (avec résistances de 330ohms) + 1 bouton poussoir, - Un EEPROM I2C 24LC16 (+ résistances de pull-up pour l'I2C). Le câblage : SerLCD / ArduinoVCC -> VCC RX -> D9 GND -> GND La vidéo de démonstration : Et bien sur le code : Jason955 / Arduino Access Control. This is my Arduino-based project that allows you to use RFID for access control to open a door. The door can be anything that can be controlled by a relay. In my case it will be a garage door opener. This is the initial prototype. Next I plan to build it on a prototype shield and then if put it on a PCB.

There is a master RFID key that is hard-coded into the software, which allows you to add other keys. Top breadboard + components - from right to left: Access relay - Relay to activate door.Reset button - Hold for ~2000ms to clear all keys.Button to activate access relay - Hold for ~200ms to activate4 pin switch - Bit registers (I think that's the name?) Looking at the bottom half of components - from right to left: RFID/NFC reader - Reads NFC/RFID cards.Audio and visual feedback module - Red/green 2-color-led and a piezo buzzer.