Knock lock balks knock, uses CapSense without shock

[Rob Hemsley] sent in an update to an RFID-based door lock. Previously, if you wanted to enter the MIT media lab, a RFID-enabled card was required to get in. Now, with [Rob]‘s update, you only need to tap the door handle in a ‘secret’ pattern.

The earlier RFID-enabled build used about $80 in hardware, not a very economical solution. The new touch-based solution only uses an Arduino and servo, making the build much cheaper.

The touch sensitive lock uses the CapSense Arduino library. By turning the door handle into a touch sensor, [Rob] allowed a secret code to be saved in the EEPROM. Repeating this sequence when the door is locked sends power to the servo, unlocking the door.

A very cool build that’s also a little more secure than the traditional, audible knock lock. Check out the video after the break.

Comments

  1. Kaz says:

    Is it me, or does it audibly unlock before he finishes the tap pattern at the end? Does it really just unlock after you tap some # of times? ;) (And did it unlock when you held the lock for 10 seconds? Seems like that would be a downside too…)

  2. DarwinSurvivor says:

    I wonder how it reacts to a high voltage being applied to the doorknob (or lock).

    • Nova says:

      Probably the way any IC reacts when you over-voltage it without a clamping network, Kaboom.

      I will add that there are internal clamping diodes on digital I/O pins and this -might- be able to keep it out of harms way, but likely not a permanent solution.

      Another related question is if it has a floating ground or not?

  3. xobmo says:

    tell me if I am wrong, but can’t this be done with a lot less equip, eg. MSP430 instead of Arduino? If so, any idea how to implement?

    • AP says:

      An MSP430 isn’t that much less equipment and it’s only a few bucks cheaper at this point and it doesn’t already have easily available libraries like CapSense. The reason you have to ask how to implement answers the question of why you’d do it this way.

      • Nova says:

        The MSP430 development system (MSP-EXP430G2) is $4.30+free shipping, Arduino Uno is ~$30+shipping. A wee bit more than a ‘few bucks’

        Also many MSP devices have a native capsense I/O pin that does a lot of the work for you.

      • eldorel says:

        @nova

        And a microprocessor with the arduino bootloader preloaded is $4.

        don’t compare the entire dev platform with the stand alone chip.

      • Nova says:

        @eldorel And to program firmware onto an arduino you need a what? A TTL serial adapter of some sort and supporting circuitry, those aren’t free either. I was comparing one dev platform to another. Not to mention the MSP is a -real- debugger.

        Also: https://www.sparkfun.com/products/10524
        $5.50?! that’s still more than the TI DEV offering, sorry, still beat.. add shipping to that $5.50 while you’re at it..

      • WarHemmar says:

        @nova or you can buy this one for $2.88 and program the boot loader yourself.
        ATMEGA328

      • Eirinn says:

        Nova if you already have an arduino you can use it to program the chip, pull it out of the board and add a few caps and a crystal.

        And if you’re playing with an arduino you most likely already have a dev board.

        That way it will only cost you the price of the chip, 2 caps and a crystal.

        Of course on top of that it needs some voltage regulation, but you’d need that anyway.

      • boondaburrah says:

        This is the media lab we’re talking about. They’ve got plenty of atmel chips and have a few programmers so dev tools/board cost isn’t an issue. Probably less true for the MSP430.

        Now why they used an arduino instead of just one of the chips in the parts draw and a board – I mean, a full atmega328p seems a little overkill to me.

        But it’s probably great for prototyping something like this, so I stand corrected.

      • Nova says:

        These comments are making me face-palm. What if you don’t have an arduino already, or an ISP to program the bootloader onto a raw chip? I’m talking about the cost of starting from scratch. If you already have that stuff laying around, great! It’s cheaper for you but not everyone is in arduino-land.

        I’m not arduino-hating, I have one myself. But the cost to start on the MSP and have a -real- dev platform is significantly less. And by real I mean a debugger with breakpoints, variable monitoring, etc..

      • holewheat says:

        MSP430 does have a CAPSENSE library:

        http://www.ti.com/tool/capsenselibrary

    • fartface says:

      MSP430? Why so expensive and oversized? any cheap microchip pic for $1.89 can do it easily. heck I can do this with one of the $0.89 8 pin pics.

    • Nova says:
      • xobmo says:

        Exactly what I was looking for, thanks!

      • john says:

        If you don’t have an arduino, you can can still program it provided your computer has a serial port. All you need are the tx, rx, and dtr pins for programming the atmega328p. If you’ve seen the breadboard arduino, you’ll see that you only need a resonator, resistor, and a 5V source (via linear regulator or perhaps directly via the serial port). The atmega328p can be bought on mouser for only $3.

      • john says:

        I can understand the msp430 argument if you’re searching for a lower power solution, or attributes where the msp430 is superior to atmega, but mentioning cost for a small project where the difference in cost is only a few dollars is insane.

        These days, you can get a raspberry pi for $35, and it will come with all the tools you need for programming the arduino — simply “apt-get install arduino-mk” and you can upload the bootloader code as well as your sketch logic via the serial port found on the GPIO header of the raspberry pi.

        Unless you work as a peasant farmer in India, you should be able to afford a small computer like the RPi, and about $5 in parts for the arduino — that’s all you need to get started.

  4. Hirudinea says:

    Is that a metal door? If it is why not make the door touch sensitive?

  5. Alex says:

    If any of you want to build one of these I have all the source code, I built this same project with a servo on my own. Contact me and I will give you the schematic and the source code.
    Alex

  6. KG4MXV says:

    Waiting to winner until the electric static built up and blows the circuit

  7. jeditalian says:

    what happens if i am electrostatically charged before i touch it?

  8. Stikyballs says:

    This is a very good idea but if anyone is rhythmically challenged or has very good rhythm, they can have a hard time remembering the pattern or some one can easily figure it out just by watching once.

  9. KG4MXV says:

    I think it was IbM many years ago developed a way of transmitting data via someone just shaking hands. Kind of an electronic business card. you could use the same system in a watch.
    Have the lock handle send out a ID when it detects a hand on the door then the MC in the watch sends a code back to the lock and authenticates the code and unlocks.

  10. . says:

    Why not just go around the door?

  11. roliop says:

    So, without even knowing the code, you can mischievously alter it ! And the door seems to unlock itself during recording ! At the moment, any old Joe can come along and do the same, so where is the security ?

    I think the MIT logic needs a little honing.

    rp

  12. boondaburrah says:

    Or, you know, you could try to get in before the doors lock at 6pm and not need any keys/codes! (at least if this is the same media lab I think it is.)

  13. Volfram says:

    (haven’t read the actual article yet)

    The fun police called. You had way too much with that title.

    Seriously, I love the title.

  14. Tim e. Domain says:

    Excellent, even if it’s a rigged demo.

    Older than dirt – I’ve seen numerous projects circa 1978-1980s where you tapped morse code to a cap switch (CD 4011 cmos IC and a few parts) and something happens, usually a solenoid being pulled so the door can open.

    I saw a very cool shadow puppet lock using an early DRAM chip with a microscope cover slide glued on and a nightlight. It wasn’t very accurate, even if it was a cool demo.

    The best one was the lighted doorbell button with a tiny CDS cell (very small, used for VFDs in microwaves) which had two 7493 counters attached. I don’t remember the logic, but it was really simple, maybe a triple nand and a dual-d flip flop or something. You held your finger or hand out for a few seconds, which reset the counter, then waved your hand a few times , waited and waved it again. it was like 5, pause, 5, pause, 1.

    The first counter went at the first pause, the second counter went after the second and then if a short wave followed, it would compare the two numbers, and if they were both 5, the magic occurred. I suppose this would be 50 lines of code in any microcontroller under the sun.

    What was interesting is that it worked really, really well. It was basically for lost key situations, but he ended up using it all the time. One weekend some neighbor kids came over to help him do something to his yard and paid close attention as he let them into the house.

    Boom! The next day (Monday) when he came home from work, all his booze was missing, along with his ice-cream, some tapes and a few other accessories normally associated with the “gentlemanly arts”. He blamed himself for not realizing that Monkey-See Monkey-Do is a time honored tradition, and a reason why anything short of elaborate morse code is risky.

    And this is why hard-wired logic sucks.

    As a side note, thank god no one has re-created Hefner’s short-lived Playboy club in Bangkok VIP room “kiss the no-fig-leaf-covered part of the statue” to gain access to the bar. I’m sure it seemed like a good idea at the time, but it lasted less than a week. It was an awful place.

  15. momo says:

    tap, tap, tap
    scratch, scratch, scratch
    tap, tap, tap

  16. boz says:

    You could add lots of randomising factors to make it a bit more secure such as having a RTC on the uController and having to tap the Hour in binary at the end. Will stick to an RFID keyfob for my home for now though :-)

  17. You can download the original files to build the door opener here: http://colorsaregood.com/door/

  18. xmppinjuly says:

    BlueTooth’s MAC address “of the day” seems more entertaining.

    yes, spoof the MAC address.. why bother with simple passphrases as this will appear entirely passive

    Spoof MAC on android devices with creative framework modification

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,693 other followers