Introduction: RFID MagLock for Shed
In order to protect my tools and 1/2 finished projects which reside in my outside shed, I've connected a magnetic lock to an access control system. I've tried several variations for this, but this instructable will list the access control system that seems to work best for me. In the end, the simplest version is usually the best. I tried using an arduino v a raspberry pi v just a straight locking switch. Each had their own challenges and pros v cons. I ended up settling on a stand alone access control panel with everything built which cost just a few bucks.
Step 1: RFID Panel
I used to install security systems many eons ago. There are a lot of very cool and fun things you can do with them, especially nowadays. However, in the end it all boils down to cost v trouble v what you are trying to protect. Its important to understand that no system (NONE) is full proof. The true trick is to balance what you are trying to protect with the likelihood of attack with the costs and implementation. You want to make it more difficult to get into an area than its worth it for a thief to trouble with. Most thefts are crimes of opportunity. I'm sure a professional safe cracker could get into my system easily enough, but it would still take time. What is in my shed worth the time of someone like that? Nothing really. So, the system I've implemented is designed to stop the random person, troublesome teenager, general casing thief.
I started off with a self-contained RFID input panel. You wire the power supply and MagLock directly to the panel and nothing more. I have an intermediate relay and alarm horn but otherwise not much else is connected. It's the same as a full security panel from professional alarm companies, just without the call in function.
Step 2: Mag Lock
Ignore the inside of the shed.
I attached a lock which can withstand 200lbs of pressure to the top of the wooden door frame. I do not need to go for anything stronger since I'm pretty sure the hinges. door and frame will fail after that much force is applied. So unless I want to replace the entire entry frame and door, the smaller maglock will suffice. It cost me about $25. You can purchase locks ranging from 50 lbs ($20) to 600lbs ($50) on ebay.
Step 3: POWER
The biggest thing you will have to worry about for any electronic security system is power. The lock I picked is a 24V DC electromagnetic lock. They come in varying voltages, but I prefer the 24V for stability. Some of my other instructables show it better, but I have several power supplies connected in various ways behind what I affectionately term my "command station." I have a dedicated 120V AC to 24V DC transformer just for the mag lock. It's connected to part of a backup power supply which powers more stuff should the power be cut. If power goes out for any reason (storm, intentional switch off, etc.) the backup will keep the mag lock operational for about an hour. That's probably overkill, but since I use the backup for computers and other aspects regardless of the access control system, it didn't hurt to hook it up as well.
Step 4: Getting Out
The lock is constantly on and tied to a normally closed circuit . As a result, once I get in, I'm stuck there until I disengage it again. But instead of wiring another access panel, I just wired a switch into the circuit via a serial connection. It sits right above the door and is a lot cheaper than another panel. You just flip the switch and open the door. I toyed with having a delay relay so that I just push a button to trigger the relay and do not have to remember to flip a switch back to reinitiate power. However, I found that at times I will be going in and out of the shed several times a minute on projects in the yard and needed a way to turn off the lock while doing this. So, I left the simple switch. Like i said, simple is usually better, although not as cool sometimes.
Step 5: Outside Panel
The panel is placed in a waterproof box outside the shed. While this is the most convenient placement it is also the greatest weak point. Since I run most everything through the panel, exposing it to tampering is a risk. However, in order to do anything effective with it, the person messing with it has to have knowledge of how to work with such systems, a pretty good guess as to how I set it up, and a pretty good guess as to whether I'm using any relays between the panel and the lock. Like I said, I doubt someone with these skills will find my shed a worthy target so the weak point is not one which worries me. .. even if they are someone who reads instructables and is reading this one right now. If you want to minimize this area as a risk, you can place the panel on the inside of the shed separated by a small panel which is thin enough the RFID signal can go through. That way you never risk the exposure. Either that, or use a resistance monitor which measures the resistance of the line and can sound an alarm if the resistance changes without the proper code entry. Most professional panels have something like that. But again, you balance cost with likelihood of attack.
Step 6: Code Entry
I chose an access panel which has both a keypad and can read an RFID signal. Each panel out there has it's own programming pattern. This panel was pretty simple and just required scanning the fobs while in programing mode. I like using a system with a redundancy for entry just in case one of the reading mechanisms fail.
Finally, I will comment that you may want to install some form of manual override, just in case the panel is damaged and the lock will not disengage. These things do happen and you should plan for this type of contingency. I could cut the power and wait an hour to get back into the shed or I can build in a secret backdoor way to cut the power as a manual override, hidden from view and known only to me. However, just as we were shown by Matthew Broderick in War Games, back doors or overrides can be dangerous is they fall into the wrong hands, so be careful with such an addition.
We have a be nice policy.
Please be positive and constructive.