Knock Lock: Part 2

If you havent already, see the previous post outlining the project here. Rather than using the device to lock a door with a deadbolt we will use it to lock a box. We are using a servo rather than a motor because it is easier make the locking mechanism with a servo.

We are planning on finishing the project on friday when we meet again.

Knock Lock PCB

Knock Lock PCB and assembly instructions

I made the picture above using Inkscape.

Further Considerations

Once we connect everything together and complete the final assembly as is shown above, the knock lock should work. However, we still need to add the button for programming in new secret knock patterns, and a battery connector so that the circuitry can operate within the box independent of the computer. I think it would also be a good idea to add a switch accessible from outside the box in series with the battery so that the circuitry can be switched off when not in use and the battery does not run down permanantly locking the box.

How Does a Servo Work?

A servo contains a motor and a position feedback sensor. Using these sensors, it positions itself at a particular angle depending on the data signal.

The servo is controlled with three wires: ground, power, and control.
The power wire is typically red, and should be connected to the 5V pin on the Arduino board. The ground wire is typically black or brown and should be connected to a ground pin on the Arduino board. The signal pin is typically yellow, orange or white and should be connected to a digital pin on the Arduino board.

The control signal controls the angle the servo is set to. The protocol for this signal is called PWM or pulse width modulation. The servo expects a pulse sent from the microcontroller every 20ms. The length of the pulse determines the angle of the servo. There are many different types of servos but should behave according to:

\theta=(T-1.25 ms)\frac{180\,^{\circ}}{0.5 ms}
When programming it shouldn’t be necessary to generate this signal manually, as it can be generated automatically in software.

–Keegan Mann

This entry was posted in Interseason, Knock Lock and tagged . Bookmark the permalink.

One Response to Knock Lock: Part 2

  1. sweemikew says:

    Just want to say what a great blog you got here!
    I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!

    Thumbs up, and keep it going!


Leave a Reply

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

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


Connecting to %s