Shop OBEX P1 Docs P2 Docs Learn Events
Propeller, RFID and a Magnetic Door Lock — Parallax Forums

Propeller, RFID and a Magnetic Door Lock

NWCCTVNWCCTV Posts: 3,629
edited 2015-06-07 08:01 in Propeller 1
I want to install a door lock similar to this one: http://www.ebay.com/itm/12V-Electromagnetic-Door-Locks-Magnetic-Lock-280KG-Holding-Force-Access-Control-/351119037068?pt=LH_DefaultDomain_0&hash=item51c053528c

and control it with a prop and an RFID reader. My question is, what do i need to connect to in order for the propeller to send the signal to the door lock to open when a correct card or key fob has been read.

Comments

  • kwinnkwinn Posts: 8,697
    edited 2015-06-01 19:00
    All you need is a transistor (mosfet or bipolar) that can handle the voltage and current the mag lock requires. Current draw is usually in the 200-500mA range. Two things to be aware of with mag locks. First is they require current to be locked so they are normally powered from an AC line connected supply. Second is that the alignment between the magnet and the door mounted plate is critical. Any gap between them will keep it from locking properly.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2015-06-01 20:07
    The Mag lock is 12V DC. I plan to use a wall wart and have a battery backup for power outages. Thanks for the advice. I was thinking of just a standard electric lock but I think the magnetic one would be more secure.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-06-01 20:21
    That's an interesting gadget. I didn't see any information about how much current it requires. It looks like it needs to be powered in order to hold the door closed.

    I wonder if it would be possible to defeat it with an external electromagnet tuned to cancel out the locking magnet's field? It would be hard to do but I'd think it should be possible to measure the magnetic field from the outside of the door and figure out which direction the field was pointing. One could then generate a field in the opposite direction and keep turning it up until the fields cancelled out.

    It would probably be easier to just break the door down so I doubt it's anything to worry about.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2015-06-01 20:26
    Specs are below. If they get past my Alarm, my CCTV setup and my dog, they can have it and I will just let the cops come get them and all my stuff!!!

    Specifications:
    1.Holding Force: 280Kg
    2.Working voltage: DC 12V
    3.Weight:1909g
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-06-01 20:32
    Well, with an unknown current demand, you may want to start out with a relay of some sort, and have a fly-back diode on the contacts for when you release the door lock. There is going to be a big spike in voltage of reverse polarity whenever you turn off the magnet.

    You are going to have to bench test the current draw on your lock before anything can be determined for sure.

    Here is an alternative door lock that is quite common in Taiwan. My building has one on the front door and they do hold up quite well. The hidden side will accept a cylinder lock to allow outside access with a key. And this only requires power to open the door, not to hold the door locked. It mounts to the surface on the inside of the door and has a mate for the the door jamb surface. The button on it will mechanically release the door for quick exit. So all the electric portion does is all you to remotely allow someone entry upon request.

    www.ecvv.com/product/3421071.html
  • msrobotsmsrobots Posts: 3,709
    edited 2015-06-01 20:32
    NWCCTV wrote: »
    The Mag lock is 12V DC. I plan to use a wall wart and have a battery backup for power outages. Thanks for the advice. I was thinking of just a standard electric lock but I think the magnetic one would be more secure.

    I can not think of any reason why a magnetic lock is more secure then a actuated bolt. 280 Kg of holding power. Hmm. I am able to push (maybe pull) 280 Kg. When using some leverage like a rope and a block, even more. If power goes down it is open? What a great lock.

    Look at car door locks. Able to open with a key and able to used with electricity or vacuum. If all fails they are closed. You need a key. Mechanical bolted and able to sustain forces way over 280 Kg. Think about car accidents.

    Not sure what you want to protect against whom. But just relaying on magnetic fore, powered by a wall wart or battery sounds not good to me.

    Just my 2 cents

    Mike
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-06-01 20:36
    NWCCTV wrote: »
    Specs are below.

    It doesn't mention how much current is uses. It would be too bad if it cost a significant about of money to keep a door locked.
    I see kwinn gave an estimate on current draw. If the lock pulled 500mA then it would be drawing 6 Watts of power when activated. Not a huge draw but something to keep in mind.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-06-01 20:38
    msrobots wrote: »
    But just relaying on magnetic fore, powered by a wall wart or battery sounds not good to me.

    I agree with Mike on this one.
  • xanaduxanadu Posts: 3,347
    edited 2015-06-01 20:41
    http://www.amazon.com/MicroMall-TM-Holding-Magnetic-Electromagnetic/dp/B00GPB4ETG

    There's some power specs on similar item, if not the same.

    You might want to use a power supply with a limiter in case this thing develops a problem. There's something about a big coil of wire, drawing 1/3 amp, sandwiched in wood...
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-06-01 20:48
    xanadu wrote: »
    There's something about a big coil of wire, drawing 1/3 amp, sandwiched in wood...

    Is that something good or bad?

    These things look really cool but I think Mike made some good points against using one as a door lock.
  • xanaduxanadu Posts: 3,347
    edited 2015-06-01 20:55
    Duane Degn wrote: »
    Is that something good or bad?

    These things look really cool but I think Mike made some good points against using one as a door lock.

    I'm not so sure about a home install and being on 24/7. I think these mag locks are for doors that are opened and closed frequently, where a mechanical movement would wear out or be too slow.

    I don't want to sound negative about it though, I think that it's a fun thing to do, with the right power supply that is.

    I think I will get one and overheat it and see what temps it hits for fun, maybe undo some of my paranoia lol...
  • xanaduxanadu Posts: 3,347
    edited 2015-06-01 20:58
    kwinn wrote: »
    All you need is a transistor (mosfet or bipolar) that can handle the voltage and current the mag lock requires. Current draw is usually in the 200-500mA range. Two things to be aware of with mag locks. First is they require current to be locked so they are normally powered from an AC line connected supply. Second is that the alignment between the magnet and the door mounted plate is critical. Any gap between them will keep it from locking properly.

    I wonder if you can get the alignment right with a wooden door as well. Wont the door change shape based on humidity and temps?

    This may not work at all on a less "precise" door. Or it might work for awhile then when you need it...
  • kwinnkwinn Posts: 8,697
    edited 2015-06-02 06:39
    Some valid points made in the preceeding posts. Pretty much all of the installations I have worked on used the mag locks in conjunction with keyed locks.

    In the schools the main purpose for them was for emergency lockdown and to control access to the school yard during the day (recess and lunch). The card access systems generally used electric strikes that mounted in the frame and they were locked unless power was applied.

    The doors were mainly steel clad to allow for sturdy mounting of the mag lock plate. The plate is mounted with one centered bolt and has a guide pin at each end to hold it in place. It can be adjusted by inserting spacer washers on the guide pins before tightening the mounting bolt.

    All in all I found it to be a less than satisfactory setup that required frequent adjustment as the doors warped or the building settled. The electric strikes were better, although they had their own issues. I think a solenoid mechanism similar to a deadbolt would be much better but I have not seen anything like that on the market.
  • kwinnkwinn Posts: 8,697
    edited 2015-06-02 06:49
    @ NWCCTV

    One suggestion if you go with the mag lock. Mount the door plate first, making sure it is positioned so that it aligns with the mag lock when it is mounted on the frame. Then close the door, place the mag lock against the door plate and apply power to it. This will hold it in alignment while you drill the holes and mount it.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-06-02 08:09
    The magnetic lock seems interesting, and 1/3 amp is certainly not to much for a transistor -- even a 2n2222 can handle .5amps, but I would use something more robust to prevent premature failure, like a TIP35c (25amp rating, 100VDC). There will be heat involved in a constant on situtuation, and a fly-back diode to prevent reverse polarity spikes destroying the transistor is necessary.

    The lock I mentioned is everywhere in Taiwan. And the few that I have seen fail did so after at least a decade of heavy traffic -- front door to an apartment building with 20 units. It uses more amps, but only as a pulse to release the latch, and can be completely usable when there is no power avaiable -- key entry on one side, button to open on the other.

    My gut feeling is to go with a locking system that doesn't require 24/7 power to be active. The electronics will be more reliable. And any lock should have a redundant bypass for emergency access and exit.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-06-02 08:47
    The magnetic lock seems interesting, and 1/3 amp is certainly not to much for a transistor

    Agreed. I keep trying to think of some sort of robotics application for one of these but I have yet to think of a good one.

    BTW, The MIFARE 13.56MHz RFID readers (not compatible with the Parallax readers) are all over the place on ebay. They're surprisingly inexpensive. Here's a link to an object I wrote for these inexpensive readers. These readers are nice and small.
  • kwinnkwinn Posts: 8,697
    edited 2015-06-02 11:12
    @Duane,

    Your link doesn't seem to be working. Nothing happens when it is clicked on.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2015-06-02 11:50
    Just be sure to read up on the local fire regulations. These are often not legal in residences, and are legal only in commercial buildings when they are connected to the fire alarm system, or have an exit bypass that does not require a fob.

    Of course, how would they know if you put one in, It's not like the fire marshal goes around to all the houses and checks. They really only know if you have a claim.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-06-02 12:27
    kwinn wrote: »
    @Duane,

    Your link doesn't seem to be working. Nothing happens when it is clicked on.

    Thanks for letting me know. It's fixed.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2015-06-04 18:20
    Someone always has a way of shooting down what I think to be a "Great Idea'!!!! Oh well, back to the drawing board. I actually did think about using a motor on my dead bolt. I might go back to that option. However, I will need to install the dead bolt in my wall and have it latch in to the door. Otherwise my wife will complain about wires hanging on the door in classic "Red Neck" fashion!
  • kwinnkwinn Posts: 8,697
    edited 2015-06-04 18:54
    If that "someone" was me, well sorry about that, but it probably saves you some frustration. Installing the deadbolt in the wall is the way to go. Avoids problems with wires breaking and usually has more space to work with. Could even be home brewed using a large hexagonal standoff, bolt, and dc motor.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2015-06-04 19:02
    No big deal!! That is why I post my ideas here. Some times I come up with some hair brain idea in the middle of the night and it is good to get others opinions before I actually act on them. I once almost hired a Patent Lawyer until an old timer told me to check my idea and see if there is something similar to it. Sure enough, after a little research I found my idea that was almost to the letter on a Patent search!!!
  • msrobotsmsrobots Posts: 3,709
    edited 2015-06-06 21:53
    A couple of years ago, in Sacramento they had door locks with number entry and/or normal keys. Home Depot? Not even expensive. fits standard doors.

    Get one of those and either add your RDIF stuff, space provided or remove old electronic and replace by your propeller based version... Get rechargeable batteries or two sliding contacts between door and frame and use a wall wart.

    Enjoy!

    Mike
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-06-07 08:01
    I just ran across this thing.

    https://www.sparkfun.com/products/13648

    Seems like a pretty easy way of making a deadbolt into an electronic door lock.

    Andy, It used to bug me when someone would tell me "you're doing it wrong." But then I realized these are actually the most valuable posts someone can offer (assuming they're correct). As kwinn mentioned, being warned there are better ways to accomplish a task can save a person lots of time and money.

    Here are a couple of "You're doing it wrong" posts I've had.

    Here's my relay controlled cell phone:
    http://forums.parallax.com/showthread.php/133851-Propeller-Cell-Dialer-Texter

    This one doesn't really count since I pretty much knew I was doing it the hard way as I was wiring up the relays. Sometimes I get a harebrained notion and just need to try it even though I know it's impractical.

    As someone pointed out in the thread, it's a lot easier if one uses a phone or module which can be controlled directly from a microcontroller. Here's my latest attempt to interface a Propeller and a cell phone.

    This next one, is a better example. I really thought increasing the size of the rims on my Rover 5 would help keep the treads on.

    http://forums.parallax.com/showthread.php/145281-Rover-5-Projects-and-Information?p=1164343&viewfull=1#post1164343

    Fortunately erco told me I was doing it wrong. It turns out eliminating the rims was a much better solution than increasing the size of the rims.

    Now when someone says "you're doing it wrong," I think "Great! Thanks for saving me a bunch of time and money."
Sign In or Register to comment.