loading
Hi guys, I bring a new instructable for arduino, the control access with password, 4x4 keypad and a servo.

We will use the Password and Keypad librarie for arduino, besides using the servo library, but this project can also be modified by changing the servo, a motor reley or motor stepper, or any other ideas ...

This project can be used in different cases, for doors, Servo action, etc.. Here is the link of the video on youtube to see how it works, then explain step for the armed : D

Step 1: The Parts for the Project

We will need this parts for the proyect:

Arduino UNO or similar ($29.95)
http://www.sparkfun.com/products/11021

Servo motor - Large ($12.95)
http://www.sparkfun.com/products/9064

KEYPAD 4X4 (or similar) ($7.79)
http://www.ebay.com/itm/DATA-KEYPAD-4X4-BLACK-BLACK-KEYS-4-4-Switch-Key-x-/270347954381?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item3ef1fe68cd#ht_2720wt_1037

Proto Board  ($9.58)
http://www.olimex.cl/product_info.php?currency=USD&products_id=170&product__name=Proto_Board_Bread_board

Breadborad jumper wire pack ($10.59)
http://www.olimex.cl/product_info.php?cPath=21_138&products_id=872&product__name=Breadborad_jumper_wire_pack

Four resistor of 910 ohm

One resistor of 1k





Step 2: Preparing the Keypad

Well, now we must put the resistors,remember the potion of the pins of the keypad.

Output pins of keypad:

1 pin = col 1
2 pin = col 2
3 pin = col 3
4 pin = col 4

5 pin = row 1
6 pin = row 2
7 pin = row 3
8 pin = row 4

(look at the second image)

Now they must put three 910 ohm resistors on pin 1, 2 and 3 of the keypad, then put in the arduino digital pins of the NEXT form:

pins keypad  |  pins arduino
---------------------------------------
          1           |           8
          2           |           7
          3           |           6
          4           |           9        
          5           |           5
          6           |           4
          7           |           3
          8           |           2

Step 3: Preparing the Servo

You need put the servo of the next form :

Step 4: Connecting the LEDs

You need put Accepted LED (green) and Denied LED (red) in this way:

Step 5: (UPDATE) and Now, the Programming

You need this libraries:

Password librarie

Keypad librarie

Well, this is the code for arduino, you only need to change that write in bold and put your password.

And this is my new instructable, enjoy it :D

¡ Good luck !

how to add 16x2 lcd<br>pleasse help me.. thanks
<p>i want to control 360 servo such that when you press A1 the srvo rotate 60 degrees and A2 it rotate 120 and so on<br>i tried using many codes but none of them is working probably <br>the code is this<br>#include &lt;Keypad.h&gt;</p><p>#include &lt;Servo.h&gt;</p><p>Servo myservo; </p><p>int pos = 0; </p><p>const byte ROWS = 4; //four rows</p><p>const byte COLS = 4; //four columns</p><p>//define the cymbols on the buttons of the keypads</p><p>char hexaKeys[ROWS][COLS] = {</p><p> {'1','2','3','A'},</p><p> {'4','5','6','B'},</p><p> {'7','8','9','C'},</p><p> {'*','0','#','D'}</p><p>};</p><p>byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad</p><p>byte colPins[COLS] = {5, 4, 3, 2}; //connect to the column pinouts of the keypad</p><p>//initialize an instance of class NewKeypad</p><p>Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); </p><p>void setup(){</p><p> Serial.begin(9600);</p><p> myservo.attach(10); </p><p>}</p><p>void loop(){</p><p> int position;</p><p> char customKey = customKeypad.getKey();</p><p> if (customKey){</p><p> Serial.println(customKey);</p><p> }</p><p> if(customKey=='1'){</p><p> // myservo.write(pos);</p><p> myservo.write(60); // Tell servo to go to 90 degrees</p><p>delay(3000); </p><p> }</p>
Will u please tell me
Use of resitors in this project
<p>Hello, can i want to connect 2 continuous rotational servos with 4*4 keypad, the keypad determine the angle each servos goes to<br>could you help me with the code please?</p>
<p>its showing this error</p><p>what to do?</p>
<p>hi , where is theschematic project</p>
<p>Can you give me a sketch of keypad 4x4?</p>
<p>#include &lt;Keypad.h&gt;</p><p>const byte ROWS = 4;<br>const byte COLS = 4;<br>char keys[ROWS][COLS] = {<br> {'1', '2', '3', 'A'},<br> {'4', '5', '6', 'B'},<br> {'7', '8', '9', 'C'},<br> {'*', '0', '#', 'D'}<br>};<br>byte rowPins[ROWS] = {2, 3, 4, 5}; //connect to row pinouts<br>byte colPins[COLS] = {6, 7, 8, 9}; //connect to column pinouts</p><p>Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );</p><p>void setup() {<br> Serial.begin(9600);<br>}</p><p>void loop() {<br> char key = keypad.getKey();</p><p> if (key != NO_KEY) {<br> Serial.println(key);<br> }<br>}</p>
<p>it is saying there is no keypad.h</p>
<p>you problably dont have that library installed... download that library... then go to arduino's folder and put the library inside a folder called libraries</p>
<p>CODE?</p>
<p>How does it work if i have a 3x4 keypad is it the same but instead of using 8 pins i use 7 ?</p>
<p>you will have to redefine the keymap to fit your keypad</p>
<p>So if I want to make the arduino open a garage door when pushing the right password followed by &quot;A&quot; and turning on and off alarm by pushing the right password followed by &quot;B&quot;. Can anyone help me do that. Thank you in advance</p>
<p>Sup, i tried to make this for my own too but i have a small Problem. (First Project)</p><p>C:\Users\(Censored)\Desktop\Keypad_servo\keypad_password_servo_ v1.1\keypad_password_servo\keypad_password_servo.ino:5:23: fatal error: Password.h: No such file or directory</p><p> #include &lt;Password.h&gt; </p><p> ^</p><p>compilation terminated.</p><p>exit status 1</p><p>Fehler beim Kompilieren. (German: Failure)</p><p>Can you help me?</p>
<p>can somebody tell me what is the password?</p><p>i have me the circuit. but its not working without password</p>
<p>i can't find the code plzz help me</p>
I made it... Thanks a lot
can i use arduino mega?
Of course, you can!
<p>@<a href="https://www.instructables.com/member/camilo.n1012/" rel="nofollow"><strong>camilo.n1012</strong></a></p><p>do we have to use the resistors for the keyboard?</p>
No, keypad library uses internal pull up resistors
<p>I cant get it working,when I enter the password and press A nothing happens</p>
<p>Thanks </p>
<p>When I plug in my servo to my arduino it starts spinning without stopping. How do I fix this?</p>
<p>myservo.detach</p>
<p>can somebody please copy and paste the code into the comment section? I can't seem to access the zip file. I would love to make this but without the code it kinda impossible </p>
Hi, you can download the file from this link: http://goo.gl/ChO877
<p>Hi guy, I have just handmade a matrix keypad for arduino, I'll use that in control driver motor servo 250VAC. But it was noise when I put in the box a metal. It's mean it run, however I didn't pressed keypad. So how about I can filter noise?</p>
Hi, i don't understand your question on the issue, if you can be more explicit to help I'd appreciate. Regards !
<p>@camilo.n1012 , please when i write #include &lt;Keypad.h&gt; , the keypad word be in black not in red , and when i upload the code , the arduino does not recognize the keypad , is there any solution for that ?</p>
You may have problems with the address of the file, check in the folder &quot;/ libraries&quot; of Arduino IDE if the file.h is there. It should be in orange the code. If you follow the problem let me know and I give you another solution. Greetings !!
Where is the code of project ?
Hi, you can download the code from here: https://www.instructables.com/files/orig/FKM/G6W9/HYR3FXB9/FKMG6W9HYR3FXB9.zip
<p>seem it cannot be found...can you please give the right link?</p><p>your help is much apreciated.thank you</p>
<p>This is the new link: <a href="http://goo.gl/2Lo0fC" rel="nofollow">http://goo.gl/2Lo0fC</a></p><p>Good Luck !</p>
<p>donde va el password como lo meto porque si lo dejo en letras negras me da error</p>
<p>Hola ! El pasword lo defines en el mismo archivo .ino, en la variable &quot;Password password = Password( &quot;your_password&quot; );&quot;, ubicada en la linea 20 del codigo, de todos modos te dejo la imagen de muestra.<br>Saludos y &eacute;xito !</p>
<p>Sorry for not having answered the guys posts, but I had a problem with the mail.</p><p>The code already update, if they have more doubts, I can write to me mail camilo.nunez@cnf.cl or send a MP.</p><p>Regards !</p>
Camilo.n1012 the code needs to be updated
I can't get the password librarie
camilo.n1012, the code isn't updated and needs to be so that it will continue to work. Please update it soon. <br> <br>-Thanks
<p>The BYTE term seems to be invalid for Arduino 1.X<br><br>I am getting same error too. Please update this Instructable, thanks.</p>
I made one of this kind and when I was testing there was a power failure and I had to be out till I got my spare <strong>keys</strong>.
The BYTE term seems to be invalid for Arduino 1.X, what version did you use? <br>I'm trying to convert. Can you update this Instructable? or add updated code? <br>Thanks
could you use an ir remote insted of a keypad if possible a code too thanks.
Hi! Nice instructable! but the link to the password library doesn't work. here's correct: <br>http://playground.arduino.cc/Code/Password
Hi Sir we are making this arduino project and we would like to do it in a 3X4 keypad because there is no available 4x4. If we would order outside the country it will take much time. We would like to ask you if you a have a program of a 3x4 access controller we urgently need it. Thanks a lot it would be a big help for us. :)

About This Instructable

132,275views

298favorites

License:

More by camilo.n1012:Control Access of Arduino YÚN with MySQL, PHP5 and Python Access control with Arduino + Keypad 4x4 + Servo (UPDATE) Save data of temperature and humidity on MySQL with Arduino Uno and Wifly 
Add instructable to: