AVR-T32U4 Arduino Leonardo experiments with knock sensor and servo


Image

This is simple fun project which we build for couple of minutes with materials in the office.

What you need: AVR-T32U4 Arduino Leonardo clone, Breadboard-1 for AVR-T32U4, LiPo battery, some JumperWires, Knock sensor, MS-1.3-9 servo motor, some tape and empty carton box.

Tape the servo in the corner and put on it plastic arm which to rise the box lid, tape the knock sensor to the lid. Connect the servo to D9 and Knock sensor to A0 of AVR-32U4.

The code Knock.ino is on GitHub https://github.com/OLIMEX/DUINO/tree/master/AVR/KNOCK, as you can see it’s pretty simple, once on A0 is detected level above some threshold (you can experiment what this level is in your case as it depend on how you attach the knock sensor to the box) you move the servo motor up wait some time and move it back.

Watch the video in action: http://www.youtube.com/watch?v=HFmPvcbbiT4

Then one of our practicing students at Olimex decided to make code which will open the box only if you knock in some secret sequence of long and short knocks and the code is also on Github (please be gentle the code is crappy but written by enthusiast with no much experience).

The new video for the password knock is here: http://www.youtube.com/watch?v=3wsnxi5x2R0

3 Comments (+add yours?)

  1. Dylan
    May 31, 2013 @ 20:11:46

    Line 8 of the code is very crappy indeed, but I saw the video first and <3.

    Reply

  2. daitomodachi
    Jun 01, 2013 @ 14:27:06

    Sweeeet. This reminds me of something a spy would use.

    Reply

  3. a.m.70
    Dec 16, 2017 @ 22:29:09

    hi, the link for source code is broken, may you provide the code somewhere? thanks

    Reply

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s

%d bloggers like this: