magnetic door lock using arduino

magnetic door lock using arduino

magnetic door lock qatar

Magnetic Door Lock Using Arduino

CLICK HERE TO CONTINUE




Surya Mattu is a creative technologist who loves to make things. He’s based in NYC and working at ITP, a two-year graduate program exploring the imaginative use of communications technologies. Today he’s sharing with us how feasible it could be to build an RFID-controlled entry for students using Arduino Yún. Read  other guest posts on Arduino Yún. I work at ITP as the student floor-staff programmer. At the start of the semester I was asked to set-up a system to allow students entry to the ITP floor from the fire escape using their university cards. Although this is something that would normally fall under the NYU IT departments domain its a long and arduous process involving lots of different departments so we decided to go with something that was developed in-house. Although this is a relatively simple task it has a few steps that can be clunky. The objective was to design a simple solution that doesn’t require much maintenance. Things that we kept in mind while designing the system:




Before this project started I was fortunate enough to get my hands on an Arduino Yún from Zoe. I had been playing around with it for a while and felt this application was really well suited to what the Yún can do. Something that I’ve found particularly exciting about the Yún is the Bridge. The Bridge allows the 32u4 (the microcontroller) to talk to the Linino (Linux) chip straight from the .ino sketch! Also, the Linino chip comes with a full implementation of Python which means you can do things like text parsing and web scraping and integrate it with your Arduino in a really seamless way straight from your sketch. So the components we needed to use were pretty few. This was the system we came up with for this application: The great thing about using the Yún is that it has Python on board. It was really easy to write a script that periodically got a JSON dump of the card ID information for all the persons who needed access to the floor. Because it was possible to do a periodic dump so easily we set up an API from the main database that only provided card IDs that had access rights and no other information.




This meant that no student or staff personal information was exposed. A more detailed description of the system: The above figure describes the user interaction with the system. Along with this there is another script that runs periodically on the board to update the local database. The door unlocking mechanism already in place. It used a button that someone could manually press to unlock the door. We used a relay instead of a switch to control it from the Arduino. The video below shows the card reader in action. With two LEDs replacing the relays. Red if access is denied and green if approved. Using the Yún for this project made it possible to write a few small pieces of simple code in different languages rather than one big complicated program. I personally prefer this approach as it makes it easier to test, understand and explain the system. The code for this application is available here This entry was posted by Zoe Romano on Thursday, October 24th, 2013




and is filed under Arduino, Yún. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Here's how it works: Anybody can ask a question The best answers are voted up and rise to the top I want to replace my door lock with an one made with an Arduino and a servo, but I'm not sure if the platform is stable enough to use it for something like this. If I do everything right (code, connections, constant power), could I trust in this? I'm not sure if the platform is stable enough to use it for something like this.As I describe in my post about an RFID door lock I use a Uno (and some additional parts) to unlock my door. Since writing that I improved the software as described here so you can reprogram the valid list of cards "on the fly" (without uploading new code) as the valid cards are stored in EEPROM. My system has been operating for over 5 years without any problems, except once when there was a brownout in the area and I had to power cycle the system (possibly the RFID reader failed and not the Arduino).




My system "fails shut" so it keeps the door locked in the event of a power failure. However I have alternate ways of leaving the building in the event of a power failure combined with a fire. You are talking about a servo rather than an electric strike. That is likely to be the weak point, and not the Arduino as such. You would need to ensure it was powerful enough to do whatever-it-is you are planning to do, and that it had suitable drivers (eg. MOSFET or driver board). My system gets used dozens of times each day. We never have a problem with it. If you want to use an Arduino in this sort of environment, there are a few things to watch out for: Heat (usually from sunlight striking the enclosure). relevant for your project, depending on the installation and locationChoice of enclosure material, colour and finish can all affect this. Rollover of millis() (see http://playground.arduino.cc/Code/TimingRollover). After 55 days, the millis() function on the Arduino rolls over and resets back to 0.




Depending on if/how you use this, it may affect you.If you choose to power your Arduino directly from 5v, ensure that it is a smooth stable supply. I've had noisy power supplies cause some weird resets and glitches.Again, this depends on location. Don't forget to account for condensation and frost (if applicable). Flyback from relay switching and locking solenoids. Add flyback diodes to relay coils and solenoids to stop any flyback voltages killing your control circuitry. I've run in to all of these issues across various Arduino projects. They may not cause the system to fail completely, instead causing strange behaviour. If you design your system to account for all of these factors, then it is absolutely reliable enough to run something 24x7x365. If you can guarantee that your hardware and software skills are impeccable then you can certainly trust the MCU on the board. After all, the ATMega chips aren't toys, even though many people around here seem to treat them as such.




They are a professional industrial product. Of course, this is assuming that the Arduino you have is genuine and not some cheap Chinese knock-off with gawd knows what on the board. Replying to Majenko's answer with more depth. The limits of the Arduino hardware depend on the ATmega CPU it's built around (I suspect you'll be directly migrating from Arduino to the final PCB). but I'm not sure if the platform is stable enough to use it for something >like this. Thus it may be worth considering for you to read through the data sheet. I'd read through it and look at the parameters which could affect your project. For example, the ATmega is only designed to work properly within certain temperature ranges (so this may affect your lock if it's outdoors in the cold). If you're relying on the built-in timer for something in your project, then that can get affected by temperatures, for example — as opposed to using a quartz crystal for reliable timing. So you'd need to think how your project can fail with the parameter limits of the hardware components.




For example, if you're activating the door lock with a secret code stored on external memory, then the memory used may get corrupted when it gets near a magnetic field. To add to the already good advice so far. Safety and security wise you need to plan and anticpate for failure. An electromechanical lock or your power supply are hardware wise probably more likely to cause issue than the Arduino board, just watch for back emf and use a flyback diode or snubber as mentioned if required. There may be issues though in your code being stuck in a loop or say card reader or contact faults and so on, this may require a simple on-off at best. Consider using a battery backed power supply for short blackouts or brownouts. Then consider your lock type and what will happen in an emergency or with a fault. Locks such as a strike or mortice lock allow you to use standard door hardware so you have the capability to use a free handle egress out so you won't be trapped in an emergency.




You can then also fit a key barrel so if the lock has failed you have a backup way of entry. With either type you can then have a fairly good balance of safety and security, if you set it up as fail secure your house will not be vulnerable in a power outage or PSU fault whilst also not trapping you inside. In a commercial setting fail safe is commonly used on non secure common areas and rooms but preference for a residential front door is fail secure. Other lock types such as maglock, drop bolt, V-Lock, hook and loop and automatic doors among others do not have purely mechanical methods of using the door in a fault so are harder to use in a residential setting and may need emergency breakglass or stop buttons to cut power on the inside and keyswitch or pincode unit on the outside in case of fault if no other entry point available. Maglocks for example are fail safe only and will open once power is off,potentially leaving your home vulnerable, so need fairly significant battery backup.

Report Page