DIY Electronic Popsi-lock

Introduction

The deadbolt door lock opener is a great project which you can use everyday! It’s definitely one of the most practical projects you can make. This doorlock isn’t like your average doorlock though. This one opens based on your knock on the door! That’s right – it’ll respond to your secret code knock. The Hobbyist kit also has a keypad in addition, so if you don’t feel like knocking you can just enter in a secret code.

This kit is divided into four distinct steps:

  • Servo & Microcontroller(both beginner & hobbyist)
  • Mechanical Popsicle Arm (both beginner & hobbyist)
  • Piezo Knock Sensor
  • Keypad (hobbyist only)
  • Editing code

Together these parts will let you unlock your door with style!


The door lock works by supplying electrical power to the piezo door sensor, keypad, servo, and microcontroller. Then when an input (knocks or key code) is put into the piezo door sensor or keypad, it generates an output to servo and micro controller. The microcontroller process the output to see if the right code or knocks were entered. If it was right, the servo moves the mechanical arm to unlock or lock your door.

Door lock overview picture

FAQ’s
1. You will get more parts than needed or get interchangeable parts. You don’t have to use all parts of your kit.
2. If the LED’s on the keypad holder don’t turn on, check to make sure that your power supply is connected and/or check with a 3 V battery to make sure the LED didn’t burn out.
3.If the switches aren’t working, check to make sure that there is a good connection with solder and/or check with a multimeter and perform a continuity check to make sure the switch is not defective.

Servo & Microcontroller Schematics

Beginner:

Electronic Door Lock Beginner (1)-page-001

Hobbyist:

Electronic Door Lock Hobbyist (1)-page-001

Op Amp & Piezo Sensor Schematic

piezo-page-002 (1)

Momentary Switch Keypad

keypad-page-002

Materials

Mechanical Arm

22x Popsicle sticks
4x washers #4
2x machine screws #4-40 x 9/16”
2x nylon insert locknuts #4-40
1x servo crank

Keypad:

1 x 5 cm by 7 cm PCB
12 x momentary switches
3 x 4.7k ohm resistors
3 x 1k ohm resistors
1 x 3mm Green LED
1 x 3mm Red LED
1 x 3mm Yellow LED
1 x Tin with lid

Not included:
10x small paper clips
1 x 15.2 cm Copper wire
2 x 6.9 cm Insulated colored wires (Green and Brown)
1 x 5.4 cm Insulated colored wire (Orange)
3 x 2ft Insulated colored wires (Red, Black, and Blue)
3 x 2 feet wires (Green, Yellow, and Red)
1 x 3 cm Insulated colored wire (Black)

Servo Controller:

1 x 7 cm x 9 cm PCB (hobbyist)
1 x 5 cm x 7 cm PCB (beginner)
1 x ATmega-8 Microcontroller
1 x 28-pin IC Socket
1 x 8-pin IC Socket
1 x LM358P Op-amp Device
1 x 3-pin Header
1 x 3mm Green LED
1 x 3mm Red LED
1 x 3mm Yellow LED
1 x 16MHz Crystal Oscillator
2 x 22pF Capacitors
1 x 1M ohm Resistor
1 x 100K ohm Resistor
1 x 1K ohm Resistor
1 x 1N4733 Diode
1 x 50K Potentiometer
3 x 1K Resistors (for beginner)
6 x 1K Resistors (for hobbyist)
1 x 10K Resistor
1 x Momentary Switch
1 x Slide Switch
1 x Barrel Jack (for beginner)
2 x Barrel Jacks (for hobbyist)
1 x Piezo Element

Tools

Mechanical Arm

Hot Glue Gun
Super glue
Needle Nose Pliers
Scissors
Wire cutters (optional)

Momentary Switch Keypad

Soldering Iron with Fine Tip
Solder
Needle Nose Pliers
Wire Cutters
Wire Strippers

Servo & Microcontroller

Soldering Iron with Fine Tip
Solder
Needle Nose Pliers
Wire Cutters
Wire Strippers
Tape
Hot Glue
Copper Wire


Secret Knock Door Lock Kit
Beginner

  1. Build the arm for deadbolt
  2. Build the main circuit
  3. Test circuit, sensor, & servo
  4. Default secret knock is: 3 even knocks
  5. Build case for circuit & servo
  6. Mount case to door
  7. Mount knock sensor to door
  8. Attach arm to servo
  9. Attach circuit to sensor
  10. Power on
  11. Test full system

To test changing secret knock:
While unlocked (green light on), press button
Yellow light will flash, which means you are entering reset mode
Red and yellow lights turn on, which means you can record new secret knock
Make your new secret knock
Wait after done, red and green light will approximately playback your new secret knock
Make a new secret knock until you are satisfied.
If you want to confirm the last knock entered, press button
Yellow light will flash, which means you have saved the new secret knock and are exiting reset mode

Hobbyist

  1. Build the arm for deadbolt
  2. Build the main circuit
  3. Build the keypad
  4. Test circuit, keypad, & servo
  5. Default code is “1111”
  6. Build case for circuit & servo
  7. Mount case to door
  8. Mount keypad to other side of door
  9. Attach arm to servo
  10. Attach circuit to keypad
  11. Power on

To test changing entry code:
While unlocked (green light on), press # button
Yellow light will turn on, which means you are entering reset mode
Enter new 4-digit code
After all 4 digits entered, yellow light will blink, which means new code has been saved and exiting reset mode

Part #1: Servo & Microcontroller – Beginner

NOTE: While the Beginner version is built on a 5x7cm board, the Hobbyist version uses a 7x9cm board – because of the bigger servo. The 5x7cm board in the Hobbyist version is for the keypad.

Power Rail

1. Using wire cutters, cut the copper wire in two 2 inch pieces.
2. Using needle nose pliers, straighten them as much as possible.
3. Put copper wire along column D and U and hold in place with tape.
1

4. Solder the end holes at each of the copper wire to hold them in place and remove tape (D18, D1, U18, and U1).
2

5. This side will be known as the bottom of the PCB.

Microcontroller Holder

6. Flip over PCB. Place the top of the microcontroller holder (labeled with a “28”) in row 14 so that the left column of pins is in column I and the right column of pins is in column L. Hold in place with tape
3

7. Flip the board over to the bottom side and solder the corners pins of holder to the bottom of the PCB so that it held in place and remove the tape.
4

Crystal Oscillator

8. On the top of the PCB, put one lead of the crystal oscillator into G6 and the other lead into F5.
5

9. On the bottom of the PCB, bend the leads at R6 and S5 directly to the left so that they are touching the pins of the microcontroller holder.
6

10. Solder the lead at R6 to P6 and the lead at S5 to P5. Trim excess leads.
7

22 pF Capacitors

11. On the top of the PCB, get one 22 pF capacitors and put one of the leads into F8 and the other into G8.
8

12. Flip over PCB, Bend lead at S8 to the right so that it is in contact with the copper wire. Bend the lead at R8 down to R6. Solder each these connections.
9

13. On the top of the PCB, get one 22 pF capacitors and put one of the leads into F3 and the other into G3.
10

14. Flip over PCB, Bend lead at S3 to the right so that it is in contact with the copper wire. Bend the lead at R3 up to R5. Solder each these connections.
11

Ground Line

15. Get a piece of black wire and cut it to ¾ inch. Put one end of the wire into P7 with the pin of the microcontroller holder and solder this connection.

16.Put the other end of the black wire on to the copper wire (that will be the ground bus) and solder it together.
12

17. Using the remaining black wire cut from the previous steps, cut it to ¾ inch. Put one end of the wire into M8 with the pin of the microcontroller holder and solder this connection.

18. Put the other end of the black wire on to the copper wire (ground bus) and solder it together.
14

Power Line

19. Get a piece of red wire and solder one end into P8, and the other end to the copper wire that will be your power line. (If desired, trim to appropriate length).
14

20. Using another piece of red wire, solder one end into M7, and the other end to the power line.
15

21.Use another red wire to solder one end into M6 and the other end to the power line.
16

Your power and ground lines for the ATmega8 are complete!

Part #2: Piezo & Op-Amp – Beginner

Setting up the Piezo element is a bit more tricky because the frequency is measured at around 6MHz – meaning it’s not sensitive enough. An op-amp configuration is thus needed to make the sensor more sensitive to knocks. [A piezo element at a lower frequency would most likely make the sensor more susceptible to detecting knocks].

Operational Amplifier (Op-amp)

22. On the top side of the board, get an 8-pin socket and place it on top of the the 28-pin socket, it should fit between columns I-L. Place a tape over to hold it in place.
17

23. Flip the board to the bottom side and solder the four corners so it can stay in place. Then remove tape from the top side of the board.
19

24. Grab a piece of black wire and solder one end in P15 and the other end to the ground line
20

25. Grab a red wire and solder one end into M18 and the other end to the power line.
21

50K – Potentiometer

NOTE: You may be shipped a 100k Potentiometer. Both of them work the same as the resistance you need to adjust around is about 27k.
26. Flip the board over and place a 50K Potentiometer (reads 503) with the single pin in M16, and the two legs into O17 and O15, respectively.
22

27. Flip the board over again and using pliers, carefully bend the single pin to the right so that it is touching M16 and solder the joint. (Note: wire or a stray leftover pin from a resistor can also be used to connect the pin from L16 to M16.)
23

28. Grab a red wire and solder one end to J17 (one of the pot legs), and the other to the power line.

29. Grab a black wire and solder one end to J15( other pot leg), and the other to the ground line.
24

Resistors

30. Flip the board over to top side and place a 100K-ohm resistor into E18 and H18.
22

31. Flip the board over to the bottom side and bend the lead coming out of Q18 and solder to P18, and the lead coming out of T18 to P17. (Note: this is connecting pins 1 and 2 of the IC socket.)
26

32. Flip the board over to the top side and place a 1K-ohm resistor to E17 and H17.
27

33. Flip the board to the bottom side and solder the lead coming out of Q17 to P17, and the lead coming out of T17 to ground.
28

34. Flip the board to the top side again and place a 1M-ohm resistor to E16 and H16.
29

35. Flip the board to the bottom side and solder the lead coming out of Q16 to pin P16, and the lead coming out of T16 to ground.
30

1N4733 Diode

36. Flip the board to the top side and place the 1N4733 Diode with the orange end into E15 and the black striped end into H15.
32

37. Flip the board to the bottom side bend the diode lead coming out of Q15 upwards so that it is touching Q16 and solder the joint.

38. Bend the lead coming out of T15 to the left so that it touched the ground rail and solder the joint.
33

0.1uF Capacitor (labeled 104)

39. Flip the board to the top side and place the .1uF (labeled 104) capacitor into E14 and F14
34

40. Flip the board to the bottom side and solder the lead coming out of R14 to Q15 (the black striped end of the diode).
35

41. The other lead will be connecting to the positive wire of the Piezo Element.

Piezoelectric Sensor

42. Grab the Piezo element and solder the wire connecting to the white circle to the other lead of the capacitor.

43. The wire connecting to the gold plate will be connecting to ground.
36

One more connection

44. Take a stray clipped lead from a resistor or a piece of copper and connect P18 to M15. (connecting pins 1 to 5 of the IC socket).
37

45. (There will be another wire for the pin not connected on the IC later)

Momentary Switch

This switch will be the reset button to customize the knocks. Keep in mind that the pins pointing towards each other are ALWAYS connected.

46. Flip the board over to the top side and place the switch so that the pins parallel to each other (not connected) sits in column M1-M3, and the other side of the switch sits at column O1-O3.
38

47. Flip the board over to the bottom side and using a stray lead, connect the pin sticking out of L1 to M1.
39

48. Flip the board to the top side and place a 10K-ohm resistor leads in P1 and S1, respectively.
41

49. Flip the board back to the bottom side and the lead sticking out of I1 is soldered to the pin on J1.

50. Grab a black wire, and solder one end of the wire to the other lead of the resistor (coming out of F1) and the other end of the wire to ground.

51. Grab a red wire and solder one end of the wire to the other pin of the momentary switch that will be connected when the button is pushed. (Pin J3)

52. Solder the other end of the red wire to the power line.
42

Indicator Lights

53. Flip the board over to the top side and grab (3) 1K-ohm resistors and place one of them in M6 and P6, the other in M5 and P5, and the last one in M4 and P4.
43

54. Flip the board to the bottom side and solder the lead coming out of L6 to M5, the lead coming out of L5 to M4, and the last lead from L4 to M3. The other leads of the resistors will connect to the LEDS  which will be the indicator lights.
46

55. Flip the board to the top side and place the green LED with anode (longer pin) in Q7 and cathode (shorter pin) in  R7, the yellow LED with anode in Q5 and cathode inR5, and the red LED with anode in Q3 and cathode R3.
47

56. Flip the board to the bottom side and bend the cathodes in column G downward to and solder together to create a common ground for the LEDS. Trim excess leads and solder a black wire with one end connecting to the cathodes and the other end to ground.

57. Solder the resistor lead coming out of hole I6 with the anode lead of the green LED (hole H7).

58. Solder the second resistor lead coming out of hole I5 to the anode lead of the yellow LED (hole H5).

59. Solder the third resistor lead coming out of hole I4 to the anode lead of the red LED (hole H3).                 49

Power Switch

60. Flip the board to the top side and place the barrel jack in T16 and T14. It should fit snuggly so no tape is needed to hold it down.
50

61. Place the switch in holes O18, P18, and Q18 and tape it down.

62. Flip the board to the bottom side and solder the pins of the switch to hold it in place.

63. Grab a red wire and solder one end to the middle pin and the other end of the wire to the power line.
52

64. Grab a black wire and solder one end to the right pin of the switch (hole J18) and the other end of the wire to ground.

65. Grab a red wire and solder one end to the E14 (the 2nd pin of the barrel jack) and the other end of the red wire to the left pin of the switch (H18).

66. Grab a black wire and solder one end to E16 (1st pin of the barrel jack) and the other end of the black wire to the rightmost pin of the switch (J18). (where the other black wire is connected).
55

Servo Motor

67. Grab the 3 pin header, flip the board over to the top side and place the short pins through holes P11, Q11, and R11. (long pins are sticking up.)
56

68.Place tape to hold the header in place and flip the board over to the bottom side and solder the three pins,
57

69. Grab a piece of black wire and solder with the pin coming out of I11 (rightmost of the 3 pins) and solder the other end of the wire to ground.

70. Grab a small piece of red wire and solder one end to the middle pin (H11) and solder the other end to the power line.

71. Grab a piece a blue wire and trim to appropriate length, solder to the left most joint (G11) and solder the other end to M2, ( AKA physical pin 16 of the IC socket).

72. Using leftover blue wire, connect M17 to M12 (physical pin 7 of the IC socket to physical pin 26 of the Atmega8 socket).
58

The motor pins are now connected. Be sure when plugging in the motor that brown matches with ground (the black wire), red matches with power (the red wire), and yellow matches with the data wire (blue wire).

Your kit is nearly complete! Place the ATmega-8 chip in the IC socket with the circle in the top left corner (also half circle dent at the top) which indicates physical pin 1. That should be in I14. The 8-pin IC is placed above the ATmega8 chip with the half circle dent at the top (that indicates physical pin 1) which should be placed in I18.
63

When turning the kit on, the green LED should be lit which indicates the microcontroller is working. The potentiometer controls the sensitivity of the knock, so if the yellow LED is constantly on, then it is too sensitive. Adjust the pot until the yellow light is not on, but will turn on whenever there is a knock. The default code is set to three knocks, which can then be changed when the momentary switch button is pressed. When the yellow LED and red LED are on at the same time, give the knock you wish to do and once finished watch the green LED flash back your pattern of knocks. Once the yellow LED flashes, press the momentary switch and your customized pattern should be set. (Note: once you turn off the chip the default knock will go back to three knocks.) An incorrect sequence of knocks will flash a red light and the motor will not turn.

 

Mounting the Motor

The motor is best mounted when using copper wire to wrap around the handles and through the board (if space allows) and then hot-gluing around the edges, also ensure that the copper wire does not touch any connections on the board! Popsicle sticks are useful in creating a frame on the edges of the board, which could then be placed on a door.

59

60

61

62

Hobbyist Build

The hobbyist build includes a piezo element and keypad! You can choose either one you want to implement. We won’t go over how to implement both at once – that’s possible but we want to leave it as a challenge. The instructions henceforth will go over discrepancies between the beginner and hobbyist for the servo control.

To implement the keypad refer to a separate tab. (To implement the servo control core/piezo element refer to the beginner instructions.)

A ground and power rail is suggested.

Microcontroller Holder (for more clarity refer to beginner instructions)

  1. The 28 pin socket for the ATmega-8 can ideally go anywhere on the 7x9cm board. For practical purposes a suggested area would be that it is placed in rows X-L and columns #25-22.
  2. Setting up the microcontroller is the same as the beginner kit. A crystal oscillator is used to connect pins 9-10 of the ATmega-81
  3. Two 22-pF capacitors are used to connect to the pins of the crystal oscillator to ground. (Flipping the board over: One capacitor per leg of the crystal oscillator – one lead goes to one leg of the oscillator and the other lead of the same capacitor goes to ground).                                                                                               2
  4. Physical pin 22 of the IC socket goes to ground.
  5. Physical pin 8 of the IC socket goes to ground.
  6. Physical pin 7 of the IC socket goes to the power rail.
  7. Physical pin 21 and 20 go to power rail.

Indicator Lights

  1. Place two 1k resistors in series connecting to physical pin 19 of the IC socket, the free lead will connect to the anode of the green LED.
  2. Place two 1k resistors in series connecting to physical pin 18 of the IC socket, the free lead will connect to the anode of the yellow LED.
  3. Place two 1k resistors in series connecting to physical pin 17 of the IC socket, the free lead will connect to the anode of the red LED.3

Power Supply

Since the hobbyist kit does indeed include a much larger motor (the Futaba S3005) which takes in a whopping amount of current that doesn’t allow the ATmega-8 to function properly with the keypad, a separate power supply is provided.

11. Place two barrel jacks on the circuit board, they can be in close proximity to each other.

12. Place a switch next to the barrel jack that will cut off power to the board and tape it down.
4

13. Flip the board over and solder the pins to stay in place.

14. Grab a 3 pin header, and place it on the board in a convenient area with the long pins sticking outward and tape it to hold in place.
5

15. Flip the board over and solder the joints in place.

16. Solder a black wire from the front pin of the barrel jack (not connected to the switch) and solder to an outer pin of the three-pin header. *Important: Also make sure to connect a ground wire from this header to the common ground rail which is pictured later.

17. Solder a red wire from the back pin of the barrel jack and solder the other end to the middle pin of the three-pin header.
6

18. Connect a blue wire (or a different colored wire) to the last pin of the three pin header and solder the other end of the wire to physical pin 15 of the IC socket.
7

19. The data of the Keypad connects to physical pin 28 of the IC socket.  To implement the piezo element see “Code This!” tab. For an extra challenge it is possible to have a key pad and door lock knock sensor at the same time, but it is up to you to figure out a way to merge the code.

*Important* Be sure to connect the ground and power wires of the Keypad to the ground and power rails of the board!

20. To connect the LEDS, use the colored wires from the keypad with the respective colors as indicated in step 8-10. (green goes to the series resistors connecting to pin 19 of the IC socket, yellow goes to the series resistors connecting to pin 18 of the IC socket, and red goes to the series resistors connecting to pin 17 of the IC socket.)
IMG_3089

Mounting the motor can be done the same way as the beginner kit, by using popsicle sticks for the sides and then tying down the motor with some copper wire and hot gluing the edges for more security.

As you notice, there is space on the other side of the board to fit the motor. It really depends on your preference and ease of being able to tie down the motor.

This final product should look something like this. The keypad can be mounted outside the door and the wires should be thin enough to allow the door to close the with the door opener on the other side.
final

Mechanical Servo Arm

In this section you will construct the mechanism which connects your servo to the deadbolt and allows it to turn!

Be aware that this part of the instructions requires you to customize the mechanism to your specific deadbolt and that no two deadbolts are the same.

If your deadbolt is stiff and difficult to turn lubricate it with WD-40 or another lubricant to ease the load on the servo.

Tools

Hot Glue Gun with glue
Super glue
Needle Nose Pliers
Scissors
Wire cutters (optional)

Materials

22x Popsicle sticks
10x small paperclips
4x washers #4
2x machine screws #4-40 x 9/16”
2x nylon insert locknuts #4-40
1x servo crank

Instructions

Servo Arm

This part acts as a torque arm extender for the servo and increases the distance the end of the servo arm sweeps though. It is constructed by laminating together five Popsicle sticks in a staggered configuration with paperclip eyelets embedded in the hot glue.

1) Start by un-bending a paperclip in the middle so that they look like a stretched out ‘C’.

IMG_0027a

2) Next, use a pair of needle nose pliers to bend the small end of the paperclip into a loop just large enough for a screw to fit.

IMG_0028a
IMG_0030a

3) Snip any extra wire off of the loop and make the wire end flush and flat with the rest of the loop.

IMG_0032a

4) Repeat steps above for seven more paperclips. These are the DIY eyelets you will be using.

IMG_0034a

5) Hot glue an eyelet so that hang off of the popsicle stick about half an inch.

IMG_0141a

6) Hot glue a popsicle stick next to the eyelet so that it hangs off the other side

IMG_0142a

7) Line up another popsicle stick with bottom popsicle stick and hot glue it on top of the paperclip and a portion of right popsicle stick.

IMG_0143a

You can put half a Popsicle stick between the side with only two for more rigidity if desired.

IMG_0144a

IMG_0145a

8) Repeat steps 5-7 to add another eyelet and two popsicle stick this portion of the arm. Bend the eyelets about 30 degrees downwards to increase the range of motion of the linkage.
IMG_0146a

IMG_0147a

Link

9) The linkage assembly in similar to the servo arm, but is only one popsicle stick long. There are two small spacers in the middle made from cutting about half an inch off of a popsicle stick with a pair of scissors. Hot glue one of these spacers in the center of the popsicle stick.

IMG_0119a

10) Hot glue an eyelet on each side so it sticks out about half an inch off the popsicle stick.

The holes of the eyelet should be on opposite sides of each other.

IMG_0134a

11) Hot glue a popsicle stick on top of paper clips and spacer.

IMG_0135a

12) Repeat steps 9-11 to add two more eyelets, a spacer, and a popsicle stick. Bend the eyelets as shown.
IMG_0136a

IMG_0138a

IMG_0139a

Deadbolt Arm

This part will be made to fit your specific dead bolt handle.

13) Start by measuring the width and length of the deadbolt handle.

14) Get two popsicle sticks and space them out the same distance as the width of the deadbolt. Then cut a popsicle stick into three pieces so they will fit across the two long popsicle sticks. Hot glue two of cut popsicle sticks them at the ends of the two long popsicle sticks. From the left side of the cut right popsicle stick, hot glue the third cut popsicle stick away the same distance as the length of the deadbolt.

The right side of this “box” will hold the deadbolt.

IMG_0090a

15) Flip the frame over.

IMG_0091a

16) Glue the extended arm to the frame at an angle between the two long popsicle sticks.

IMG_0092a

17) Cut another popsicle stick into 3 pieces the same size as in step 9 and glue them on top of the angled arm and the two long popsicle sticks.

Align the cut popsicle sticks with the ones in step 9.

IMG_0103a

18) Glue an eyelet to the arm so it extents a half inch and bend it approximately 60 degrees down.

IMG_0104a

19) Glue two more popsicle sticks on top of the three cut pieces of the popsicle stick.

IMG_0105a

20) Repeat steps 16-18 to add another extended arm, eyelet and three cut pieces popsicle sticks.

IMG_0113a

IMG_0114a

IMG_0115a

IMG_0117a

Assembly

21) Start by lining up the eyelets of the link and the servo arm so they are bent towards each other. Put a washer on a machine screw then push it through the eyelets. On the other side, put on another washer and then add the lock nut.

Do not tighten the locknuts all the way! They shouldn’t be clamped down on the paperclips.

IMG_0036a

IMG_0152a

22) Repeat step above to connect the link and the deadbolt arm.

IMG_0155a

Installation and Mounting

23) Place the servo connector (a long white plastic piece) parallel with the servo. The longer end of the servo connector should be on the side that servo stick out relative to the motor head.

24) Screw in the screw to hold the connector to the servo.

25) Place your servo and microcontroller on to your door so that the servo is three inches below and six inches to the left of the deadbolt.

The longer end of the servo connector should be pointed to the left.

26) Place the deadbolt arm on the deadbolt and make sure the servo arm can reach it.

27) Super glue the connector to the servo arm.

28) Tape the piezo sensor to the door and plug in the power adapters.

29) Your servo actuated deadbolt is now installed! Give it a try! Please remember to use this kit responsibly. Don’t get locked out of your house!

Keypad

Overview

This part of the project is the most critical to the door lock because without it you can’t open your door. It would be easy to go out and buy a keypad but, where’s the fun in that?!?!? So what we did is make one for you to assemble.  It is cheaper for us both and you get to experience making it.

The keypad has buttons that are laid out in a grid and each connection is set up to have a specific resistor value. When the switch is pressed, current flows through the switch and creates a voltage drop that is specific to that button. So when you input your super secret code, you are creating different voltages with every button. When the right series of buttons and voltages occur, the door opens.

Tools

Soldering Iron with Fine Tip
Solder
Needle Nose Pliers
Wire Cutters
Wire Strippers

Materials

1 x 5 cm by 7 cm PCB
12 x momentary switches
3 x 4.7k ohm resistors
3 x 1k ohm resistors
1 x 15.2 cm Copper wire
2 x 6.9 cm Insulated colored wires (Green and Brown)
1 x 5.4 cm Insulated colored wire (Orange)
3 x 2ft Insulated colored wires (Red, Black, and Blue)

Instruction

Installing Switches

1) Start by orientating a momentary switch so it is 3 pins tall and 4 pins wide according to the PCB.

This might require some effort to pull apart the pins.

1
2

2) Place the top left pin of the momentary switch into B2 and install remaining pins into closest holes for each pin.

Make sure that you have a good connection to the PCB.

3) The remaining switches will be orientated the same way as above.
3

4) The switches in each row should be placed with 2 empty holes between the pins on the right of one switch and the pins on the left of the next.  The switches in each column should have 3 empty holes between the bottom of one and the top of the other.
4

5) This should give you a 3 by 4 array of switches.

The bottom edge is the side that has 2 rows of holes.

5

6) Turn over the PCB. Using a fine tipped soldering tool, solder the top left and bottom right pin of every switch to the PCB (For example, the top left switch is soldered at W17 and U14).

8
7

6
9

Installing Vertical Resistors

7) While keeping the switches face down, get a single 4.7k ohm resistor and put one of the resistor’s leads into V18 and the other lead into P18. Press resistor down until its flush with the PCB. Slightly bend the leads towards each other to hold this first resistor in place.
10

8) Take another 4.7k ohm resistor and place one of the resistor’s lead into O18 and the other lead into J18. Press resistor until its flush with the PCB. Slightly bend leads towards each other to hold the second resistor in place.
11

9) Take the third 4.7k ohm resistor and place one of the resistor’s lead into I18 and the other lead into D18.  Again press the resistor until its flush with the PCB and bend the leads to hold the third resistor.
12

Installing Power Rails

10) Cut the copper wire into four 3.8 cm lengths and straighten them as much as possible.

14
13

11) Using needle nose pliers, place one end of the copper wire through V18.

This requires a little bit of effort and should fit snugly. About 1 mm of the copper wire should be visible on the other side.

15

12) Bend the rest of the wire so that it is parallel with the surface of the PCB. It should run horizontally straight between all of the pins of the top three switches. Use a piece of tape to hold it in place.

Make sure the copper wire runs along of the row of switches and reaches bottom left pin on the right most switch without touch any pins on the switches.

16
17

18

13) The second piece of copper wire should be inserted into P18 and repeat step 13 to bend the copper wire between the second row of switches.
19

14) The third piece of copper should be inserted into J18.  Again repeat step 13 to bend the copper wire between the third row of switches.
20

15) The fourth and final piece of copper should be inserted into D18.  Repeat step 13 to bend the copper wire between the fourth row of switches.
21

16) Solder all the connections that have a resistor lead and copper wire (V18, P18, J18, and D18) and the resistors leads (O18 and I18).
22

17) Remove the tape holding the copper wire to the PCB and using wire cutters, cut the resistors leads.
23

18) Now, solder the connections between the resistor lead and the copper wire and the other resistor lead together (Join [P18 with O18] and [J18 with I18]).
24

19) Solder all of the bottom left pins of the switches to the copper wires.

Its ok if the hole above the bottom left pin gets soldered.

25

Installing Horizonal Resistors

20) Keeping the switches face down, get a 1k ohm resistor and put one of the resistor’s leads into X14 and the other into X9. With another 1k ohm resistor, put one of the resistor’s leads into X8 and the other into X2. Press the resistors until they are flush with the PCB. Bend the leads outwards to hold the resistors in place.
26

21) Solder the resistors to the PCB and connect the resistors at X9 and X8 with solder.
27

22) Using wire cutters, cut off the leads of the resistors.

The third 1k ohm resistor will be used later.

Installing Ground Rails

23) Cut the green and brown wire into three 2.3 cm pieces and the orange wire into three 1.8 cm pieces.
28

24) Using wire strippers, strip off 0.5 cm of insulation on each end of all the wires (Brown, Green, and Orange).
29

25) Using the needle nose pliers, spin the strands of the now exposed copper on each of the wires into a bundle.

Twisting the loose strands at the end of each wire together will make the wires easier to put into the PCB.

30
31

32

26) Starting with a piece of brown wire, put one end into W13 and the other end into Q13. Put a piece of tape on top of it to hold it in place.

Make sure none of the wires’ exposed ends are in contact with the bare copper wire.  It is okay if the insulation is touching the copper wire.

33

27) With another piece of brown wire, put one end into Q13 and the other end into K13. Put a piece of tape on top of it to hold it in place.
34

28) With the third piece of brown wire, put one end into the K13 and the other end into E13. Put a piece of tape on top of it to hold it in place.
35

29) Repeat steps 28-30 with the green wire and change all the hole numbers from 13 to 7.
36

30) Repeat steps 28-30 with orange wire.

a) With piece of orange wire, place one end into V2 and the other into R2.
b) With another piece of orange wire, put one end into P2 and the other end into L2.
c) With the third piece of orange wire, put one end into the J2 and the other end into F2.
37

31) Solder all the connections between the colored wires and PCB and remove the tape.
38

32) Check that none of the colored wires are touching the copper wire or the bottom right pins on the switch. If so, move the insulation on wires to prevent this connection.

33) Solder the right top pins of the switches to the colored wires.

a) Left column of switches are connected to the brown wires.
b) Middle column of switches are connected to the green wires.
c) Right column of switches are connected to the orange wires.
39

34) The resistor soldered at X14 must also be connected with solder to the top right pin of the switch and the brown wire.
40

35) The resistors soldered at X8 and X9 must also be connected with solder to the top right pin of the switch and the green wire.
41

36) The resistor soldered at X2 must now be connected with solder to the top right pin of the switch and the orange wire.
42

Installing the Power, Data, and Ground Lines

37) With the wire strippers, strip off 0.5 cm of insulation from both ends of each colored wire. Using the needle nose pliers, spin the strands of wires into a bundle.

a) Blue wire – Data line
b) Red wire – Power line
c) Black wire – Ground line
43

38) With the third 1k ohm resistor, place one lead into W1 and the other lead into S1. Bend the leads inward toward each other to hold them in place. Next, insert the end of the data line wire into W1 and the end of the ground line into S1. Bend the wire bundles on other side to hold them in place.

The lines should be going to the right.

44

39) Solder the connection at W1 and S1 and cut off the leads of the resistors.
45

40) Connect W1 and W2 with solder.
46

41) Insert the power line into T5 and bend the wire bundle on other side to hold it in place.
47

42) Solder the power line, the bottom right pin of the switch, and the copper wire to together.
48

43) Check again that none of the connections between the green and brown wires are connected and that the orange wire is not touching the bottom right pin of the switches. Cut any wires on the switch side to clean it up.

44) Before we put it in the case lets test it out. Hook up the keypad to the up to an Arduino and run the “ReadAnalogVoltage” code. The keypad should have these values.

image

45) Now, enjoy your new Door Lock Keypad!!!

Keypad Holder

The purpose of this holder is to store your keypad safely. Holder has two pieces: a lid and a bottom. The bottom has your keypad and 3 LED and the lid covers it all.

The LED’s operate in unison with the keypad to let you know the current status of the door, tell you whether or not the code is right, and whether it is reset mode.

Tools

Hot glue gun with glue
Soldering Iron with solder
Electrical tape
Phillps #1 screwdriver
Needle nose pliers

Materials

1 x 3mm Green LED
1 x 3mm Red LED
1 x 3mm Yellow LED
3 x 2 feet wires (Green, Yellow, and Red)
1 x 3 cm Insulated colored wire (Black)
1 x Tin with lid

Prepping the Tin

1) Remove the lid of the tin and mark the end of one of the short sides of the tin with three dots. Place a dot in the center of the side and place the other dots .5 cm away from the edge of the flat part of the tin lengthwise and keep it centered width wise. On the other end of the tin put a dot directly in the center of the side.

All of the dots are with a reference to the flat part of the tin, not the whole width.

1
2

2) Puncture a hole at all of the dots. Each hole on the three-hole side should be 3 mm in diameter and the hole on the single hole side should be 6 mm in diameter. Trim the inside of the holes so you don’t hurt your self and it looks nicer.

3
4

3) On the backside of the tin measure .5 cm inside from the long side and draw a line one each side of the side of the tin. Also, measure 1.3 cm inside from the short side and draw a line one side of the tin. Where each of the lines meet, draw a dot. Make a hole in tin where the dots are. After that wipe off the lines and trim the edges of the holes.

This is where the screws will go at the very end of the assembly.

5

6

Installing LED’s

4) Grab the Green LED and bend the anode (the short lead) to the left 90 degrees. Repeat with red and yellow LED’s.

The cathode (the long lead) is facing upwards.

7

5) Put the LED’s into the three holes of the tin with the order of green, yellow, and red. Bend the cathodes upward to hold in place. Spiral all the anodes together and solder them .

The ground wire is bend to be on the left side of the tin.

8

6) Using the hot glue gun, put hot glue on the LED’s and anodes to hold them in place on the inside of the tin. Bend the cathodes down back into the tin.

9

Installing LED and Ground Lines

7) Strip off .5 cm off of each side and bundle the ends of all the colored wires.

8) Bend one end of the black wire in half to make a hook. Put this hook on the ground line and pinch the hook closed so that it can be held in place. Solder this connection. Repeat for each LED and colored wire.

The color of the wire matches the color of the LED.

10

9) Get the other end of the LED wires and put them through the single hole at the bottom.

11

10) On the other side of the ground line apply some solder to it and attach the end of the wire to the ground of the switch.

12

11) Using some electrical tape, put it over the connections of the ground and LED lines. Then put all the cables from the keypad into the single hole at the bottom of the tin.

Make sure that the tape does not cover the holes on the bottom of the tin.

13

Installing Keypad in Tin

12) Using a screwdriver, screw in the screws at the corners of the PCB and place the nylon spacers on top it.

14

13) Flip of the tin and align the screws with the holes at the bottom of the tin. Press on the screws so they appear on the backside and put on the hex nut for each screw. Tighten hex nuts so they fit snuggly.

15
16

Servo Code

Keypad Code: Brief overview of how it works!  You must also include the EEprom tab when making changes and uploading using the arduino.

#include
#include // for type definitions

template int EEPROM_writeAnything(int ee, const T& value)
{
const byte* p = (const byte*)(const void*)&value;
unsigned int i;
for (i = 0; i < sizeof(value); i++)
EEPROM.write(ee++, *p++);
return i;
}

template int EEPROM_readAnything(int ee, T& value)
{
byte* p = (byte*)(void*)&value;
unsigned int i;
for (i = 0; i < sizeof(value); i++)
*p++ = EEPROM.read(ee++);
return i;
}

 

 

 

#include <EEPROM.h>

#include “EEPROMAnything.h”

 

#include <Servo.h>

 

Servo lockServo;  // create servo object to control a servo

 

/*This bit of code determines what pins to use for the ATmega 8. If you want to change the location for wiring it is best to use a pin-mapping image of the ATmega 8 since the digital and analog pin numbers do not match the physical pin numbers. For example digital pin 13 is actually physical pin 19 on the ATmega8 chip for the wiring.*/

 

constint greenLed = 13;

constint yellowLed = 12;

constint redLed = 11;

constint servoPin = 9;

constint keypadPin = A5;

 

/*This bit of code determines the angle the motor will turn. For a 90 degree turn simply change 179 to 90, or any angle desired that is less is between 0 and 179.*/

constint lockAngle = 179;

constint unlockAngle = 0;

 

/*This is the default entry code*/

int entryCode[4] = {0,0,0,0};

structconfig_t

{

int entryCode[4];

} configuration;

 

/*This maps the values of the voltages when a button is pressed */

int keyMap[12][2] = {

{490,500},{240,260},{165,166},

{86,89},{72,74},{63,64},

{46,47},{42,43},{38,40},

{31,33},{29,30},{27,28}

};

/*Assigns characters to the key-mapping, Using the serial function can show what characters are being pressed on the serial monitor feature with the Arduino.*/

char keys[12] = {

‘1’,’2′,’3′,//’A’,

‘4’,’5′,’6′,//’B’,

‘7’,’8′,’9′,//’C’,

‘*’,’0′,’#’,//’D’

};

 

/*This bit of code makes an array, 4 cells long for the input code. */

 

int entrySequence[4];

int entryCount;

 

/*Boolean determines whether the state is true or false. Only holds two values*/

 

boolean isLocked;

boolean isResettingEntryCode;

 

/*This

voidclearEEPROM() {

for (int i = 0; i < 512; i++) {

EEPROM.write(i, 0);

}

EEPROM_writeAnything(0, configuration);

}

 

boolean checkSavedEntryCode() {

EEPROM_readAnything(0, configuration);

 

 

Serial.println(“configuration:”);

Serial.println(configuration.entryCode[0]);

Serial.println(configuration.entryCode[1]);

Serial.println(configuration.entryCode[2]);

Serial.println(configuration.entryCode[3]);

 

for (int i=0;i<4;i++) {

if (configuration.entryCode[i]==-1) {

return false;

}

}

Serial.println(“custom entry code”);

return true;

}

 

voidsetup() {

Serial.begin(9600);

 

lockServo.attach(servoPin);

 

//clearEEPROM();

 

if(!checkSavedEntryCode()){

Serial.println(“defualt entry code”);

for (int i=0;i<4;i++) {

configuration.entryCode[i] = entryCode[i];

}

}

 

entryCount = 0;

isLocked = false;

isResettingEntryCode = false;

 

pinMode(greenLed,OUTPUT);

pinMode(yellowLed,OUTPUT);

pinMode(redLed,OUTPUT);

pinMode(keypadPin, INPUT);

 

 

switchLock();

}

 

voidloop(){

showLockState();

listenForEntry();

if  (entryCount==4) {

if (isResettingEntryCode) {

entryCount=0;

isResettingEntryCode=false;

for (int i=0;i<4;i++) {

configuration.entryCode[i]=entrySequence[i];

}

EEPROM_writeAnything(0, configuration);

blinkLed(yellowLed,3);

} else if (validateEntry()) {

//switch lockState

isLocked = !isLocked;

switchLock();

blinkLed(greenLed,3);

//turn lock

} else {

//show incorrect

blinkLed(redLed,3);

}

}

}

 

voidshowLockState() {

digitalWrite(greenLed,LOW);

digitalWrite(yellowLed,LOW);

digitalWrite(redLed,LOW);

if (isResettingEntryCode) {

digitalWrite(yellowLed,HIGH);

} else if (isLocked) {

digitalWrite(redLed,HIGH);

} else {

digitalWrite(greenLed,HIGH);

}

}

 

voidswitchLock() {

if (isLocked) {

lockServo.write(lockAngle);

} else {

lockServo.write(unlockAngle);

}

}

 

voidblinkLed(int pin, int count) {

int blinkDelay=150;

for (int i=0;i<count;i++) {

digitalWrite(pin,HIGH);

delay(blinkDelay);

digitalWrite(pin,LOW);

delay(blinkDelay);

}

}

 

boolean validateEntry() {

Serial.println(“validating”);

entryCount=0;

digitalWrite(greenLed,LOW);

digitalWrite(yellowLed,LOW);

digitalWrite(redLed,LOW);

for (int i=0;i<4;i++) {

Serial.println(entrySequence[i]);

Serial.println(entryCode[i]);

if (configuration.entryCode[i]!=entrySequence[i]) {

return false;

}

}

return true;

}

 

voidlistenForEntry() {

int keyPressSensor = checkKeyPress();

int keyPressedIndex = mapKeyPress(keyPressSensor);

//Serial.println(keyPressedIndex);

if (keyPressedIndex!=-1) {

//char keyPressed = keys[keyPressedIndex];

//check if reset entry code

if (!isLocked && keyPressedIndex==9) {

blinkLed(yellowLed,3);

isResettingEntryCode = true;

} else {

entrySequence[entryCount] = keyPressedIndex;

Serial.println( entrySequence[entryCount]);

entryCount++;

}

} else {

//blinkLed(redLed,1);

}

}

 

intmapKeyPress(int sensorValue) {

 

for (int i=0;i<12;i++) {

if (sensorValue>=keyMap[i][0] && sensorValue<=keyMap[i][1]) {

return i;

}

}

return 1;

}

 

floatcheckKeyPress() {

int sampleSize = 20;

int threshold = 10;

int debounce = 300;

//Serial.println(analogRead(keypadPin));

if (analogRead(keypadPin)>threshold) {

//int resStream=0;

int resStream=0;

int resStreamCount=0;

do {

resStream+=analogRead(keypadPin) * (5.0 / 1023.0) * 100;

//resStream+=analogRead(keypadPin);

resStreamCount++;

} while (resStreamCount<sampleSize);

resStream = resStream/sampleSize;

Serial.println(“checkKeyPress”);

Serial.println(resStream);

if (isResettingEntryCode) {

//turn green LED on

digitalWrite(greenLed,HIGH);

} else {

//turn yellow LED on

digitalWrite(yellowLed,HIGH);

}

delay(debounce);

return resStream;

} else {

if (isResettingEntryCode) {

//turn green LED on

digitalWrite(greenLed,LOW);

} else {

//turn yellow LED on

digitalWrite(yellowLed,LOW);

}

return 0;

}

}

Code for the Piezo Element

#include

/* Detects patterns of knocks and triggers a motor to unlock
it if the pattern is correct.

By Steve Hoefer http://grathio.com
Version 0.1.10.20.10
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0
http://creativecommons.org/licenses/by-nc-sa/3.0/us/
(In short: Do what you want, just be sure to include this line and the four above it, and don’t sell it or use it in anything you sell without contacting me.)

*/
Servo lockServo;

// Pin definitions
/*This determines what pins to assign to the ATmega8 microcontroller. Analog pin (A3) is physical pin 26 on the ATmega8. See resources for pin-mapping.*/
const int knockSensor = A3; // Piezo sensor on pin 0.
const int programSwitch = 9; // Momentary switch button.
const int lockServoPin = 10; // Gear motor used to turn the lock.
const int greenLED = 13; // Status LED
const int yellowLED = 12; //Status LED
const int redLED = 11; // Status LED

const int lockAngle = 90;
const int unlockAngle = 179;

// Tuning constants. Could be made vars and hoooked to potentiometers for soft configuration, etc.
const int threshold = 10; // Minimum signal from the piezo to register as a knock
const int rejectValue = 25; // If an individual knock is off by this percentage of a knock we don’t unlock..
const int averageRejectValue = 45; // If the average timing of the knocks is off by this percent we don’t unlock.
const int knockFadeTime = 400; // milliseconds we allow a knock to fade before we listen for another one. (Debounce timer.)
const int lockTurnTime = 650; // milliseconds that we run the motor to get it to go a half turn.

const int maximumKnocks = 20; // Maximum number of knocks to listen for.
const int knockComplete = 1200; // Longest time to wait for a knock before we assume that it’s finished.

// Variables.
int secretCode[maximumKnocks] = {100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int knockReadings[maximumKnocks]; // When someone knocks this array fills with delays between knocks.
int knockSensorValue; // Last reading of the knock sensor.

boolean isLocked;
boolean isResettingEntryCode;

void setup() {
Serial.begin(9600); // Uncomment the Serial.bla lines for debugging.
Serial.println(“Program start.”); // but feel free to comment them out after it’s working right.

pinMode(lockServoPin, OUTPUT);
pinMode(redLED, OUTPUT);
pinMode(greenLED, OUTPUT);
pinMode(yellowLED, OUTPUT);
pinMode(programSwitch, INPUT);

lockServo.attach(lockServoPin);

knockSensorValue = 0;
isResettingEntryCode = false;
isLocked = false;

updateLock();
}

void loop() {

showLockState();

if (digitalRead(programSwitch)==HIGH && !isLocked){ // is the program button pressed?
Serial.println(“reset button pressed.”);

if (!isResettingEntryCode) {
Serial.println(“entering reset mode…”);
isResettingEntryCode = true;
blinkLed(yellowLED,5);
} else {
Serial.println(“saving new code.”);
isResettingEntryCode = false;
blinkLed(yellowLED,3);
}
}

delay(25);
// Listen for any knock at all.
//knockSensorValue = analogRead(knockSensor);
//Serial.println(knockSensorValue);

if (checkKnock()){
listenToSecretKnock();
}
}

void blinkLed(int pin, int count) {

int blinkDelay=150;

for (int i=0;i<count;i++) {
digitalWrite(pin,HIGH);
delay(blinkDelay);
digitalWrite(pin,LOW);
delay(blinkDelay);
}
}

void showLockState() {

digitalWrite(greenLED,LOW);
digitalWrite(yellowLED,LOW);
digitalWrite(redLED,LOW);

if (isResettingEntryCode) {
digitalWrite(yellowLED,HIGH);
digitalWrite(redLED,HIGH);
} else if (isLocked) {
digitalWrite(redLED,HIGH);
} else {
digitalWrite(greenLED,HIGH);
}

}

void updateLock() {
if (isLocked) {
Serial.println(“Door locked.”);
lockServo.write(lockAngle);

} else {
Serial.println(“Door unlocked!”);
lockServo.write(unlockAngle);
}
}

void showKnock() {

if (isResettingEntryCode){
digitalWrite(greenLED, HIGH);
} else {
digitalWrite(yellowLED, HIGH);
}

delay(knockFadeTime);

// again, a little delay to let the knock decay.
if (isResettingEntryCode){
digitalWrite(greenLED, LOW);
} else {
digitalWrite(yellowLED, LOW);
}
}

void playbackEntryCode(int maxKnockInterval) {

Serial.println(0);
showKnock();

for (int i = 0; i < maximumKnocks ; i++){ int playbackDelay = map(secretCode[i],0, 100, 0, maxKnockInterval); Serial.println(playbackDelay); delay(playbackDelay); // Expand the time back out to what it was. Roughly. if (playbackDelay>0) {
Serial.println(1+i);
showKnock();
}
}
}

boolean checkKnock() {
//if (knockSensorValue >=threshold){
if (digitalRead(knockSensor)==HIGH) {
return true;
} else {
return false;
}
}

// Records the timing of knocks.
void listenToSecretKnock(){
Serial.println(“knock starting”);

// First lets reset the listening array.
for (int i=0;i<maximumKnocks;i++){
knockReadings[i]=0;
}

int currentKnockNumber=0; // Incrementer for the array.
int startTime=millis(); // Reference for when this knock started.
int now=millis();

showKnock();

do {
//listen for the next knock or wait for it to timeout.
knockSensorValue = analogRead(knockSensor);
Serial.println(knockSensorValue);

if (checkKnock()){ //got another knock…

//record the delay time.
Serial.println(“knock.”);
now=millis();
knockReadings[currentKnockNumber] = now-startTime;
currentKnockNumber ++; //increment the counter
startTime=now;
// and reset our timer for the next knock

showKnock();
}

now=millis();

//did we timeout or run out of knocks?
} while ((now-startTime < knockComplete) && (currentKnockNumber < maximumKnocks));

//we’ve got our knock recorded, lets see if it’s valid
if (!isResettingEntryCode){ // only if we’re not in progrmaing mode.

if (validateKnock()){
switchLock();
} else {
Serial.println(“Secret knock failed.”);
blinkLed(redLED,3);
}

} else { // if we’re in programming mode we still validate the lock, we just don’t do anything with the lock

validateKnock();

blinkLed(yellowLED,5);

Serial.println(“New lock recorded.”);
}

}

// Runs the motor (or whatever) to unlock the door.
void switchLock(){

isLocked=!isLocked;
updateLock();

blinkLed(greenLED,3);
}

// Sees if our knock matches the secret.
// returns true if it’s a good knock, false if it’s not.
// todo: break it into smaller functions for readability.
boolean validateKnock(){
int i=0;

// simplest check first: Did we get the right number of knocks?
int currentKnockCount = 0;
int secretKnockCount = 0;
int maxKnockInterval = 0; // We use this later to normalize the times.

for (i=0;i<maximumKnocks;i++){ if (knockReadings[i] > 0){
currentKnockCount++;
}
if (secretCode[i] > 0){ //todo: precalculate this.
secretKnockCount++;
}

if (knockReadings[i] > maxKnockInterval){ // collect normalization data while we’re looping.
maxKnockInterval = knockReadings[i];
}
}

// If we’re recording a new knock, save the info and get out of here.
if (isResettingEntryCode){

for (i=0;i<maximumKnocks;i++){ // normalize the times
secretCode[i]= map(knockReadings[i],0, maxKnockInterval, 0, 100);
}
// And flash the lights in the recorded pat/tern to let us know it’s been programmed.

playbackEntryCode(maxKnockInterval);

return false; // We don’t unlock the door when we are recording a new knock.
}

Serial.println(currentKnockCount);
Serial.println(‘/’);
Serial.println(secretKnockCount);

if (currentKnockCount != secretKnockCount){
return false;
}

/* Now we compare the relative intervals of our knocks, not /the absolute time between them
(ie: if you do the same pattern slow or fast it should still open the door.)
This makes it less picky, which while making it less secure can also make it
less of a pain to use if you’re tempo is a little slow or fast.
*/

int totaltimeDifferences=0;
int timeDiff=0;
for (i=0;i<maximumKnocks;i++){ // Normalize the times
knock readings[i]= map(knockReadings[i],0, maxKnockInterval, 0, 100); Serial.println(“—“); Serial.println(knockReadings[i]); Serial.println(“-“); timeDiff = abs(knockReadings[i]-secretCode[i]); Serial.println(timeDiff); if (timeDiff > rejectValue){ // Individual value too far out of whack
return false;
}
totaltimeDifferences += timeDiff;
}
// It can also fail if the whole thing is too inaccurate.
if (totaltimeDifferences/secretKnockCount>averageRejectValue){
//return false;
}

return true;

}



  • aiden

    does he use two circut boards throughout the hole kit

    • Stephanie Rosales

      Depends on what you have! The beginner kit come with one 5x7cm board and the hobbyist kit comes with one 5x7cm board for the keypad and one 7x9cm board for the circuit.

    • Stephanie Ann Rosales

      The beginner kit is one 5x7cm board, the hobbyist kit is one 7x9cm board. =)

  • Stephen

    Pretty cool!! I found the page through the rss feed, so I decided to breadboard it out and… It works perfectly! When the vid comes out then I’ll build it on the pcb.

    • Jimmy from Kipkay’s Team

      Great! 🙂

  • joseph scalisi

    so, the new kit is useless unless you have an arduino?

    • joakim

      i agree
      i failed the smd soldering on my arduino twice, do i need to buy a ardoino?
      or can i use the code in the kit?

      • Stephanie Ann Rosales

        The atmega8’s are already preprogrammed =), the arduino is if you want to add more features or add the piezo element to the kit.

    • Stephen

      Not sure about the Hobbyist Kit but, the Beginner kit doesn’t need an arduino at all. The atmega 8 is already programmed.

      • joseph scalisi

        hella rad bro, thanks

    • handballnut

      you don’t need an arduino, and I think you could use the kipduino.

    • handballnut

      YOU DONT NEED AN ARDUINO

      • joseph scalisi

        bro, chill, that comment was from a month ago, jeeze

  • joakim

    wow

  • joseph scalisi

    i don’t really like secret knocks, can i just wire in a button and hide it?

    • The Doctor

      You could, but in my opinion that would defeat the purpose of the project. If I’m assuming the code is only comparing electrical signals from the piezo, so if you replaced it with a momentary switch and changed the code to only one knock I believe that it would work the way you want it to. Although this is me assuming several things, so I maybe very wrong.

  • Kevin

    Very nice! I will start working on it tomorrow!! Will make sure I have pictures and a video!

    • Stephanie Ann Rosales

      Do share with us duuude!

      • Kevin

        Unfortunatly I haven’t started yet… I’ve been working on a couple other projects

        • Stephanie Ann Rosales

          Haha no worries, are you getting into electrical engineering?

          • Kevin

            No I’ve been playing around with wood. Which is something I’ve never done before

  • joakim

    hey kipkay+crew can you have Leds on the keypad and board at the same time?

    • Stephanie Ann Rosales

      Hi joakim, You could have LEDS on the keypad and mainboard at the same time, if you want to do it in series make sure the negative leg of the LED on the board connects to the positive leg of the LED on the keypad, and the positive leg of the LED on the board connects to the resistor that goes into the microcontroller.

  • joakim

    What is the volt on the kit? need to buy adapters

    • Stephanie Ann Rosales

      The voltage for the adapters are 5V 1A. A switch could work if you change the logic in the code, there would need to be some sort of case or if statement that when the button is pressed the Atmega8 will respond differently, either looking for the keypad or looking for the piezo element. What would be easiest is assigning a different pin from the Atmega8 to read the piezo element, which is a difficult challenge but a rewarding one for sure!

  • Lavoz24

    Could you please put up better pics of the schematics? I can’t see/read any of them, when I zoom in it comes up blurry and when I click on them it says the picture isn’t there. Thanks! }:-)

    • Stephanie Ann Rosales

      Hi Lavoz24, are you still unable to read the schematics? I have checked with them and are working fine our end, when you click on them there should be a button in the top left corner which enlarges the schematics when your mouse cursor hovers over the image. Also which browser are you using? Seems to work fine with Google Chrome.

      • Lavoz24

        Hey Stephanie, I’m using Chrime thru an IPad. All the other pics can be viewed fine except for the schematics and I never had an issue before. Thanks for the reply,I found the schematics on KipKays other site so I DL them from there.
        Also, I sent an email 2 weeks ago concerning an issue I have with the laser because I was working on that project but haven’t heard a response. Should I send another email? Thank you.

        • Stephanie Ann Rosales

          Hi Lavoz24, I apologize for the late response! xD It seems this website does not notify when someone responds to my comments. Is the issue you were having with the laser project having to do with a faulty part or the overall build?

          • Lavoz24

            The actual laser itself Hun. I was desoldering the LED and I must’ve held the iron too long because it doesn’t turn on when I push any of the buttons and yes I did have them connected to batteries,lol.
            Thank you.

          • Stephanie Ann Rosales

            Oh noooo, that is unfortunate :O. Was it working before you desoldered?

          • Lavoz24

            I don’t know hun, unfortunately I don’t test out any of the parts I get. I just open the box,look at the schematics/instructions and solder away.
            It’s ok, I found some on eBay for $.99 so I’ll just order those. I don’t know if they’ll be the same potency as the one in the kit but I’m guessing it won’t be much of a difference.

          • Stephanie Ann Rosales

            It should be fine! I know what you mean, sometimes I’ll just jump into a project too. It’s always good to test out parts in case something goes wrong so you can eliminate the 128384382 different possibilities as to why it isn’t working aha.

  • Anthony Velez

    Can’t wait to get me kit!

  • Eric S

    I took my time soldering and checking my connections, yet when I power on the kit the yellow light stays on constantly (except when the red light blinks). Adjusting the 50K Potentiometer has no effect nor does desoldering the piezoelectric sensor completely. Any ideas?

    • Stephanie Ann Rosales

      Hi Eric, I also had the same problem when I was doing one of these builds and it was either one of the pot legs had disconnected or one of the wires from the Piezo element had come off.

  • Gadgetron

    So, I’m going to have to alter the design to something I can actually use since I don’t have any doors like this. Secret box?

    • Mitch

      I don’t either. Let me know, I’d love to know.

  • Sondertruck83

    Hi everybody 🙂

    I have just a questions : I dont find the information in this post, so I request to yeou 🙂
    In the Beginner kit, hat is the voltage I need to send in the barrel jack adapter ?

    Thank you for your future response 🙂

    • Eric S

      I think its 5V, I don’t have the AC adapter, so I used the 3 AA battery pack from a previous build, like Stephen did, and it seems to be working (minus my constant yellow led problem)

      • Sondertruck83

        Thank you, I try it later 🙂 I tell you if 5V is good

        • Jimmy from Kipkay’s Team

          Try 5V 1A or 6V

    • Sondertruck83

      Hi again, I have test with 5V but that doesen’t work and it’s normal, I think my circuit have a problem, I have check it with the pictures but I see any problem, anyone can help me ? Pictures here : http://puu.sh/a0SzL/062ec882eb.png // http://puu.sh/a0Xz2/6c8af960dd.png

      Thank you for your help 🙂

      • Joshua Post

        Other projects with this same chip have been 5V, so go with that.

        From the pictures, it looks like one of the pink wires right in the middle got melted and could be shorting out. If you have a multi-meter, check to make sure you are getting power at all to your positive and ground rails and work from there.

        • Sondertruck83

          Thank you for your response, I have a multimeter but I don’t know how and where to position the plugs to identify any error :3

          • Stephanie Ann Rosales

            Hi Sondertruck83!
            Check to see if your multimeter has a continuity setting, it should look like sound waves which makes a noise when electricity can flow through the two probes. If not you could also set to the lowest ohm setting on your multimeter and if there’s continuity then the device will read 0, if not then it will read a 1 or infinity =p!

      • Stephen

        Are both of your piezo leads touching ground? Cant quite tell from the pics but it looks like they are. And if they are you should change that. Only the lead from the gold plate should be on ground, the other lead should only touch the capacitor.

        • Sondertruck83

          Thank you for your response, no I check and it’s not touching ground. Yet the LEDs don’t light up.

    • Jimmy from Kipkay’s Team

      5V 1A. We will have that available in the store by tomorrow.

      • Sondertruck83

        That nice, my power source is a cheap so I think that a good idea 🙂 But for the european people like me, should not provide, if necessary, an adapter ?

  • ilikegoat

    Why doesnt the copper wire come with the kit?

    • Stephanie Ann Rosales

      Originally the beginner kit was going to be implemented with an ATtiny85, much smaller than the ATmega8 and less costly too! When testing with the ATtiny85 however, the whole program was running super sloow so we decided to go with the ATmega8 for beginner and hobbyist kits and unfortunately had to boot out the copper wire as we assumed it might be a material most consumers have. The ground and power rails can be also be implemented with stray resistor leads or by just ensuring the solder joints touch each other if you choose to do it without a rail.

  • lahren1

    Hi, I dont have a plug near my fron door, so I was wondering what kind and how many batteries to use to power it.

    • joseph scalisi

      i’d enjoy this aswell

    • Stephanie Ann Rosales

      Hi Lahren1! The Atmega8 operates between 2.7V and 5.5V, so when using batteries the optimal solution would be to get a 9V battery with a 5V voltage regulator to avoid damaging the chip. If you try smaller batteries in series the voltage regulator still needs at least 6V to operate correctly, and by using batteries that are less than 5.5V the whole component may not work correctly at all if the motor is drawing too much current.

      • Aaron Hung

        Why does the Hobbyist kit have 2x Barell jacks? CAn the hobbyist servo also operate off just 5v 1a?

        I have a usb charger, its 5.3v 1000mah, will that work?

  • lahren1

    Hey kipkay,

    As I’ve been navigating your site, I have noticed lots of other tabs opening as I go from link to link on your site. I was wondering if it is me, or if you have added ads for extra money.

    Thank you,
    lahren1

    • lahren1

      Never mind, I checked for viruses on my computer and found 2.

  • aiden

    i cant get my copper wire sodered on,very hard please help

    • Lavoz24

      Aiden, I suggest you first melt solder onto the first and last hold of the PCB where you are going to place the wire, then just go and reheat the solder with the wire on it so the copper can wrap around it and hold it in place or you can just bend the wire on the corners and place them in the holes and solder them as if,you were soldering a part.

  • Lavoz24

    As I’ve stated before in an earlier post. For those of you who want to solder a copper rail but don’t have a copper rail or enough money to buy copper wire, I suggest you use the copper wire from a coax cable. The wire you have from your satellite or cable company. I’m certain 95% of us here have some somewhere collecting dust. For those that don’t. All you need is a dollar and about a dime for tax,lol. Go to the dollar store and buy coax cable($1 for a 3ft piece,not bad IMO),strip it and use the wire. IF for some reason you don’t have $1, you could use the copper wire from an old phone or phone wire. Yes they are thin but you could just roll them together and consider it “stranded” wire like the one sold at radio shack.
    Hope I helped a few fellow SuperFans with this dilemma.
    Oh BTW, if you also don’t happen to have wire either you could use speaker wire,an old cord from a fan or lamp or even from a car. I’m certain everyone here has something they haven’t used in over a year collecting dust that has all the wires you would need for this and any other project.

  • Mitchell

    Does anyone know if an arduino is needed for the hobbyist kit? is it possible to program the keypad without the arduino

    • Stephanie Ann Rosales

      Hi Mitchell, the hobbyist kit Atmega8 chip is already programmed to have the keypad, all you have to do is put it together and connect the dataline to the right pin. If you wanted to implement the Piezo element or make any other changes then an arduino could be used to over-write the chip, but other than that it is good to go =)

  • Mitchell

    also how do you connect the various components (such as the keypad) to the arduino

  • Guest

    Got it to work!! MAD EXCITED! Cant wait to put it to the test!

  • CrazyRican93

    Got it to work!! MAD EXCITED! Cant wait to put it to the test!!

  • Mrb

    I hooked up a 6volt, 1.2 amp power source to the Popsi lock kit (beginner kit). I was happy that the green led came on. However, the piezo doesn’t respond when “knocked” on. Adjusting the potentiometer did not cause the yellow led to light. Also, pressing the change code button did not cause the yellow or red led to light. I checked the connections, it appears none have been bridged. Any ideas? I would welcome any suggestions on what to check or try.

    • Stephanie Ann Rosales

      Are you able to upload a picture? It’s hard to tell what the problem would be, check to make sure the polarity for the yellow and red LEDS are correct! Also make sure the data-line is going to the right pin.

      • Mrb

        We checked all of the connections using the instructions as the guide. Everything seems to be in the correct place. Putting the LEDs together causes all of the LEDs to light indicating correct polarity there. I’ll include a photo from top and bottom. My son was excited just to be able to solder all of the connections and have the led light up. This is his first time soldering. Thank you for the earlier reply. 🙂

        • Mrb

          I hope you can make out where the leads go to

          • Stephanie Ann Rosales

            Hey Mrb, are the solder joints at M18 and M17 touching each other? It looks like they are from the picture but its a bit blurry when I zoomed in. Also the other capacitor pin coming out of R14 looks like it might be touching pin4 of the op-amp. Check if when plugged in is anything getting hot?

          • Jay

            Ever figure out why it wasn’t working, I’m having the same issue.

  • joseph scalisi

    the green light comes on, and when i press the button some things happen (it changes to the yellow and red) but it doesn’t respond to my knocks. the potentiometer won’t do anything either

    • Stephanie Ann Rosales

      Hey Joseph, that might mean that the dataline is not connected properly for the Atmega8. I would check that or check the to make sure the pot pins are connected properly too. If tapping directly on the piezo element doesn’t produce a yellow blink either then that means ATmega8 is not receiving any data at all.

      • joseph scalisi

        now i’ve found out that if i touch the pin next to the data pin on the atmega, it’ll count as a knock, i’ve since gotten the servo to move this way, anything else?

      • joseph scalisi

        nevermind, i figured it out, thanks for your help :3

        • Stephanie Ann Rosales

          Awesome! =)

        • Jay

          What was the issue? I’m going through this myself

  • aidan

    please tell me where to find the diagrame

  • aidan

    i didnt get the led cube and i heve hobbyest

    • Jimmy from Kipkay’s Team

      Hey Aidan, you would have to email support at kipkaykits

  • aidan

    wou people realy tik me off please send cube and anwser where to find the diagrame

    • Lavoz24

      Aidan, if you click on monthly videos and scroll down you’ll see where it has the DIY led cube. Schematics and all.

  • Perryplatypus915

    You make it look so easy. I ended up ruining it and salvaging the parts xD

  • Eddie

    Where can I get the power supply to power up the circuit? Can anybody give me some input please!

  • Chad Morris

    Hey kipkay where do you get the copper wire you always use?

    • Jimmy from Kipkay’s Team

      I get them from my store! 😛

  • Karan Dedhia

    How do you make the the Popsi lock arm with screws not paper clips

    • Jimmy from Kipkay’s Team

      You would need a drill or dremel. A pen or screwdriver won’t work because the Popsicle wood has a tendency to shred vs a clean hole with a drill.

  • Aaron Hung

    If I have the hobbyist Kit Servo, Can I connect it to the Beginner circuit and have it function as the beginner servo would?

    Second, Could someone explain the schematic to me? What does GND mean, “ATmega8 (pin7 of op-amp) etc?

    • Jimmy from Kipkay’s Team

      Yes absolutely. GND is ground.

      • Jimmy from Kipkay’s Team

        If you want to know how to read a schematic, you should google it or watch our video on schematics.

  • Aaron Hung

    If I have the hobbyist Kit Servo, Can I connect it to the Beginner circuit and have it function as the beginner servo would?

    Second, Could someone explain the schematic to me? What does GND mean, “ATmega8 (pin7 of op-amp) etc?

    • Stephanie Ann Rosales

      Hi there! If you connect the hobbyist servo with the beginner circuit, it is not going to function as well because the hobbyist kit servo takes too much current. You would need another power supply in order to implement a better servo.

      GND means ground, which shares the same line for the negative terminal of the power supply. All black wires are for ground and red wires for power =).

  • Jay

    Got the kit today, it’s my sons 1st electronics kit. can someone tell me where I can get the schematics for this build.
    Thanks, Jay

    • Stephanie Ann Rosales

      Hey Jay! Schematics are in the “Overview” tab.

      • Jay

        Found them, Thanks for the reply

  • handballnut

    How do you build the popsicle stick part?I get the first part where you hot glue them to the PCB, but you didn’t really explain how to make the second part, and I am stuck! HELP!

    • Jimmy from Kipkay’s Team

      What do you mean?

  • Jay

    I accidentally switched the 100k resistor with the 1M resistor. Will it still work? I really don’t want to rework them.

    • Jay

      Anyone ?

      • Jay

        Nevertheless I had to switch them back

        • Jimmy from Kipkay’s Team

          Usually it won’t work that way – because circuits are designed specifically to work with accurate resistances.

  • Kole Knudsen

    Is there actual instructions?

  • Jay

    Finally got it together, but I get no green light and the Orange one blinking in a pattern. Any help is greatly appreciated. Thanks

    • Jay

      The green led was bad.

      • Jimmy from Kipkay’s Team

        Replacements = support at kipkaykits 🙂 We’ll replace anything that goes crazy

  • Jay

    Now the piezoelectric is not working. (Won’t register any knocks). I’ve tried adjusting pot but nothing. Help please

    • Jimmy from Kipkay’s Team

      You’ll have to check the circuit and see if everything is working. When the LEDs are working, that means it’s ready to go. But since there is no LEDs up, there is probably something wrong between the piezo and opamp

  • Karan Dedhia

    When I solder two wires do the wires have to touch when I solder or I can solder with the wires not touching

    • Joshua Post

      It is best if both wires are touching, so they are both hot when you apply the solder. If they aren’t hot, you’ll end up with a cold solder joint where it may look connected, but not very well.

      How are you trying to solder? Is there a particular aspect you are struggling with?

      • Karan Dedhia

        Thanks it worked better when I joined the two wires together it was a bad connection when I didn’t touch together thanks for replying

  • Karan Dedhia

    Anyone there

  • Karan Dedhia

    Please help

  • Karan Dedhia

    Anyone

  • Karan Dedhia

    Come on

  • Donald C

    Was not entirely sure what I was going to do with this kit, since I do not have a dead bolt where this could be set up, But I saw your recent video on Youtube with the Geocache Puzzle Box and thought that would be a cool idea to mod this project. Thinking of using a few of the keypad buttons and couple LEDs to make the actual puzzle. To make the puzzle fair, I would choose a date in history people ‘should’ know, like the founding of Plymouth Plantation, and having them enter the year. You would enter the first digit and one of the LEDs would light up, then the next and so on. If you get a number incorrect then it will reset. Once the Year is entered correctly it will unlock. Anyways, this is my idea to use this months kit. For the most part I think the biggest issue is figuring out a way to have it stay powered. Not sure if I will have the time to go out and replace the batteries as often as it needs. I’ll post updates as I progress on it though. 😀

    • Joshua Post

      Call the cache “Batteries not included” and just leave some bare wires or a terminal to have people connect to as part of the cache.

  • ilikegoat

    Can I use a line of solder in place of the copper wire?

    • Stephanie Ann Rosales

      Yes! a line of solder will do just fine instead of the copper wire.

  • Karan Dedhia

    Hi, I was just looking at the video what type of power cord do we need to give power to the hobbyist Popsi lock kit.

  • Karan Dedhia

    Please someone send me a link or someothig

  • Karan Dedhia

    Please help

  • Karan Dedhia

    How can I give the hobbyist Popsi lock power with out using an outlet could I use batteries or something

    • Stephanie Ann Rosales

      HI Karan, our original design was going to be used with batteries but we found that it would not be as functional since it needs to stay on constantly to unlock/lock the door. As long as you use it on a door that wouldn’t lock you out of the house that would be ideal. You’ll want to use a 9V battery with a voltage regulator to get it down to 5V and a few diodes to do this. I’ll post the part of the schematic that was cut out: Also for testing purposes a 6V battery would work, but may damage the chip since the max operating voltage is 5.7V

      • Karan Dedhia

        Thanks it was very helpful

  • Karan Dedhia

    Someone please help

  • sparkymccloud

    The directions for the servo are for the biginner kit. Where are the directions for the hobbiest kit?

  • Arturo

    How can i load the codes to my keypad and my servo? i had the hobbyist kit help please

  • J.P.

    Am I missing something or is there no official information in the build about what the power source for the beginner kit should be? I need the easiest/cleanest battery option… 9v batter with 5v regulator as described below sounds a little messy… is there really no better option?

    • Jimmy from Kipkay’s Team

      Hey JP, our standard is 5V – we use 5v for all our builds when it comes to getting hooked up to a power source. Sometimes we use 9V but that’s only if it’s battery-related. I hope that helps you out!

  • abcd

    do i need to program the microcontroller if i buy it on my own ? if yes can u pls pls pls pls give me the code?and what is plugged in the barrel jack? what is it’s name? i hope u will help .thank u

    • You can find the code under the code tab! We like our source open and included code for the beginner and hobbyist (if you want the keypad). For the barrel jack you just need a a 5V DC 1A wall adapter power supply.

      • abcd

        hello kipkay but it is given that it is code for arduino plus can u make a video on how to program an atmega 8 i know u will help. tnx a lot . p.s pls pls pls pls help!!!!!!

      • abcd

        hello kipkay but it is given that it is code for arduino plus can u make a video on how to program an atmega 8 i know u will help. tnx a lot . p.s pls pls pls pls help!!!!!!

      • abcd

        hello kipkay but it is given that it is code for arduino plus can u make a video on how to program an atmega 8 i know u will help. tnx a lot . p.s pls pls pls pls help!!!!!!

        • The code is the same, the arduino is made of an Atmega8 with other components which makes us able to make kits without needing an arduino for every single one! That would be expensive. When you have an Atmega8 chip you’ll need to make sure it is bootloaded first and then you can pop into the socket of the Arduino.

  • abcd

    do i need to program the microcontroller if i buy it on my own ,if yes pls pls pls give me the code. tnx a lot

  • abcd

    do i need to program the microcontroller if i buy it on my own ,if yes pls pls pls give me the code. tnx

  • abcd

    hey guys can i use a 5v battery instead of the barrel jack thingy? pls pls pls pls help

    • That may be hard to come by but it is do-able! Just make sure the voltage doesn’t go over 5.7V.

  • Jon Perez

    How long is the order suppose to process?

    • Jimmy from Kipkay’s Team

      It should take only 3-5 days to get to you Jon.

  • Amine Ghenai

    Have a question for the step 60.
    It says to put it the barrel jack in T16 T14, but in the photo, it’s in T18 T16, what should I do?

    • Joshua Post

      The locations aren’t hard fixed, so just move it to wherever you would like it, and go from there.

  • Amine Ghenai

    I used a 5v battery but it doesn’t work, I looked at all the other composants, and they’re fine … plz help me!!

  • Amine Ghenai

    can someone help me plz, I have done all the steps mentionned, but there’s no green light when I turn it on !!

    and what does that mean : ”The motor pins are now connected. Be sure when plugging in the motor that brown matches with ground (the black wire), red matches with power (the red wire), and yellow matches with the data wire (blue wire).”

    • Joshua Post

      Just means that you need to match up the servo wires with the appropriate wires from your project.

      • Amine Ghenai

        So it’s more adressed to the hobbiest kit than the begginer kit?

  • Amine Ghenai

    is a 4,5 volt battery enough ?

    • Joshua Post

      May not. Do you have access to a 5volt power adapter. I’ve managed to borrow them from random devices around the house when in a pinch. Just check the output label on the power brick.

      • Amine Ghenai

        Thanks for the reply, no I don’t have an 5 volt adapter, i’ll try to see with my firends if they can get me one! Are you good with that project? I may need yout help ’cause mine isn’t working very well :$

  • Allison leaver

    I put together this kit using the video and we plugged it into power and nothing happened. We checked the continuity and that was all good. Any ideas what I should do next to try to make it work? I’m using it for my science fair project for school in a couple of weeks and I really want to make it work.

    • Amine Ghenai

      I have EXACTLY the same problem, I thought maybe I plugged something wrong, so I restarted the project, but it’s not working. I’ll show my project to my teacher tomorow, maybe he can help me, if he does, I will tell you what he said

  • Jared

    When I turn min on the yellow light is always on I tried turning the pot and nothing happens can someone help me

  • Dima T

    Is there a way to make it so that instead of activating a servo you could have this activate a light or some LED’s?

    • Joshua Post

      You could if you have a way to reprogram the chip. The way it ships to you, it is designed to activate the servo to a certain position and then stops. By updating the code just to set an output pin to be high or low, it could turn on some LEDs or something else, but you would need code modifications.

      • Dima T

        Thank!

    • David Fries

      Yes, these are programmable microcontrollers, you can change the source code, but will need some separate hardware to flash the update. If you want some ideas, the Infrared Controlled Switch would show how to hookup a brighter LED through a transistor.

  • Gaige Kerns

    Can you Use Different resistors for different voltages on the Key pad?

    • David Fries

      It depends on which you change and with what resistor values. What are you trying to do with a change?

  • Gaige Kerns

    The 4.7 K to 10K, I just finished and Im about to try it out

    • David Fries

      You might have to do the math and change the analog read voltage ranges to detect the buttons.

  • Gaige Kerns

    Can you post the a changed code that would be able to turn an LED on instead of turning the servo

    • David Fries

      That’s left as an exercise for the reader, it should be an easy enough change, you’re toggling the output between high and low instead of a PWM output. I don’t have this kit and even if I did I wouldn’t be to test it without your build.

  • Gaige Kerns

    Ok and the Key Pad didn’t work I am not a perfect Soldering master but im well enough and Im sure I did it Right. Im gonna try it again and order some buttons (I didn’t buy this kit, I just have the extra stuff)

    • David Fries

      You should use a multimeter and check the voltage values you get for each button held. If everyone is a unique value, then you might just need to update the code for the values you are getting, as opposed to the original values.

      • Gaige Kerns

        It wasn’t the code at all. I used the read Analog Code and nothing came up on the serial Monitor So I’m thinking I messed up on the circuit

  • scott

    do we need two 5v power adapters for hobbyists kit?

    • David Fries

      Shouldn’t, if you received two power plugs, then one is just an extra.

  • scott

    We bought the popsilock hobbyist kit. I understand two 5v power adapters are needed for the motor that comes with the hobbyist kit, but I don’t know how to connect both of them to the motor. Can anyone one help?
    Although we have the hobbyist kit, we don’t have time to build the keypad and would rather just hook up the more powerful motor that it comes with directly to the beginner kit design so that we can open the deadbolt with a less complicated system. is that possible? How do we do that?.

    • David Fries

      I didn’t build this kit, but there’s no reason for two 5V power adapters that I’m aware of, why are you thinking it would need two?

      As for the second question you’re in luck, the keypad is optional see HOBBYIST BUILD under the PIEZO tab. “(To implement the servo control core/piezo element refer to the beginner instructions.)”

  • JEPHTHAH David

    please i just got my popsicle doorlock kit. i followed the schematic and did everything right.but unfortunately it didnt work. out of furstration when desoldering it to start all over i damaged the variable resistor and the small ic connector socket . please kip can i get a printed pcb of the schematic so i can just solder the components directly and the two component that was damaged.what will the cost be for me and how soon can i get it ?

  • CSC

    how do you program a micro controller? are arduinos the only way? and if so, how?
    And is there an advance version of this tutorial?

    • David Fries

      In general programming a microcontroller involves writing software (or modifying an example), compiling it to binary, and loading that on the microcontroller. All of those steps are beyond this kit’s intention of how to assemble the kit with an already programmed microcontroller.
      As far as I’m aware the microcontrollers that come with these kits contain the arduino boot loader allowing these to be programmed using serial which would let you use a compatible arudio. I use avrdude software on the computer to control a USB Tiny ISP based programmer. Either way you’ll need software to compile a program to load on them.

      Your kit should have contained a barrel connector, you’ll need a 5V power adapter with a matching barrel connector on it with matching polarity.

  • CSC

    how do you connect power to the lock……

  • Dly736

    Is there a way to change the keypad code in the hobbyist kit? I know the beginner one has that momentary switch, but its not on the hobbyist one.

    • David Fries

      It’s under the CHECK LIST AND USAGE, # is the button to press, see the “To test changing entry code:” for the rest.