You are on page 1of 11

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

(http://cdn.instructables.com/FQH/O8NF/H4AGKE8L/FQHO8NFH4AGKE8L.LARGE.jpg)
About This Instructable
License:
49,235 views
187 favorites
(/member/camilo.n1012/)
camilo.n1012
(/member/camilo.n1012/)
Follow 43
(/id/Control-Access-of-
Arduino-YN-with-MySQL-PHP5-and-)
(/id/Save-data-of-
temperature-and-humidity-on-MySQL-wit)
More by camilo.n1012
keypad (/tag/type-id/category-technology/keyword-
keypad/)
Tags:
(/)
let's make
share what you make >
(/editInstructable/)
(/)
Explore (/tag/type-id/) Create (/about/submit.jsp) Contests (/contest/) Community (/community/) Login (/you/)

7474 datasheet
datasheets360.com/7474+datasheet
Distributors, Inventory and Pricing
Free Datasheet Downloads
Hobbyking R/c Store
Remove these ads by Signing Up (/account/gopro?
sourcea=removeads&nxtPgName=Access+control+with+Arduino+%2B+Keypad+4x4+%2B+Servo&nxtPg=/id/Access-control-with-
Arduino-Keypad-4x4-Servo/)
Step 1: The parts for the project
Related
See More (/tag/type-id/?q=)
0:00 / 1:01
Access control with Arduino + Keypad 4x4 + Servo
(http://cdn.instructables.com/FPO/UOQ4/H4AGKEAX/FPOUOQ4H4AGKEAX.LARGE.jpg)
password (/tag/type-id/category-
technology/keyword-password/)
arduino (/tag/type-id/category-technology/keyword-
arduino/)
servo (/tag/type-id/category-technology/keyword-
servo/)
Password access with
arduino (/id/Password-
access-with-arduino/)
by razvan_iycdi
(/member/razvan_iycdi/)
Arduino Resistor-less
keypad access control
(/id/Arduino-Resistor-
less-keypad-access-
control/)
Keyless Entry / Arduino
(/id/Keyless-Entry-
Arduino/)
by WWC (/member/WWC/)
Password Lock with
Arduino (/id/Password-
Lock-with-Arduino/)
by razvan_iycdi
(/member/razvan_iycdi/)
arduino+keypad+servo
control
(/id/arduinokeypadservo-
control/)
by raghvmahashabde
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
(http://cdn.instructables.com/FJV/TQXS/H4AFSW21/FJVTQXSH4AFSW21.LARGE.jpg)
(http://cdn.instructables.com/FU7/V559/H4AG5IAU/FU7V559H4AG5IAU.LARGE.jpg)
(http://cdn.instructables.com/FLS/SG31/H4AG04M0/FLSSG31H4AG04M0.LARGE.jpg)
(http://cdn.instructables.com/FFL/CGXF/H4I7VWJ2/FFLCGXFH4I7VWJ2.LARGE.jpg)
(http://cdn.instructables.com/FRT/UK3V/H4AGKEI2/FRTUK3VH4AGKEI2.LARGE.jpg)
(http://cdn.instructables.com/F87/SVHD/H4I7VWJ3/F87SVHDH4I7VWJ3.LARGE.jpg)
(http://cdn.instructables.com/FWJ/BBY8/H4AGKECG/FWJBBY8H4AGKECG.LARGE.jpg)
(http://cdn.instructables.com/FQ4/EZGF/H4AGLOWY/FQ4EZGFH4AGLOWY.LARGE.jpg)
(http://cdn.instructables.com/F6H/IEAR/H4AGKECE/F6HIEARH4AGKECE.LARGE.jpg)
(http://cdn.instructables.com/FP7/2UDO/H4AGLOYJ/FP72UDOH4AGLOYJ.LARGE.jpg)

(http://www.pinterest.com/pin/create/button/?
url=http%3A%2F%2Fwww.instructables.com%2Fid%2FAccess-
control-
with-
Arduino-
Keypad-
4x4-
Servo%2F&media=http%3A%2F%2Fcdn.instructables.com%2FFP7%2F2UDO%2FH4AGLOYJ%2FFP72UDOH4AGLOYJ.MEDIUM.jpg&description=P1010094.JPG)
Access control with Arduino + Keypad 4x4 + Servo by camilo.n1012
(/member/camilo.n1012/)
+ Collection I Made it!
Download (/id/Access-control-with-Arduino-Keypad-4x4-Servo/?download=pdf)
(/id/Access-control-with-Arduino-Keypad-4x4-Servo/?ALLSTEPS) 5 Steps (/id/Access-control-with-Arduino-Keypad-4x4-Servo/step5/And-now-the-programming/)
Favorite
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
(http://cdn.instructables.com/F58/UU5F/H4AGLPFY/F58UU5FH4AGLPFY.LARGE.jpg)
You need put the servo of the next form :
Step 4: Connecting the LEDs
(http://cdn.instructables.com/FBH/6XT8/H4AG5ICB/FBH6XT8H4AG5ICB.LARGE.jpg)
(http://cdn.instructables.com/FS5/MRVZ/H4AGLPG1/FS5MRVZH4AGLPG1.LARGE.jpg)
(http://cdn.instructables.com/FEL/DPCR/H4AGLPLW/FELDPCRH4AGLPLW.LARGE.jpg)
Next (/id/Access-control-with-Arduino-Keypad-4x4-Servo/step5/And-now-the-
programming/)
View All Steps (/id/Access-control-with-Arduino-Keypad-4x4-Servo/?ALLSTEPS)
Make Comment
(/member/r.raj936/)
12 months ago
Reply (CR2T7OJHGU2L3K2)
(/member/Edward_/)
1 year ago
Reply (CYIUZ8CHFD1E33E)
You need put Accepted LED (green) and Denied LED (red) in this way:
r.raj936 (/member/r.raj936/)
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 keys.
Edward_ (/member/Edward_/)
The BYTE term seems to be invalid for Arduino 1.X, what version did you use?
I'm trying to convert. Can you update this Instructable? or add updated code?
Thanks
(http://cdn.instructables.com/F47/40ZQ/H4AGLPM1/F4740ZQH4AGLPM1.LARGE.jpg)
Previous
(/member/nyatuv/)
1 year ago
Reply (CZKRFJYHFD173E8)
(/member/kjsrocks/)
1 year ago
Reply (C68DL5JHC9MI7H7)
(/member/matoran_nuparu/)
1 year ago
Reply (CIKSLVKHANAYFCV)
(/member/Verkyn/)
1 year ago
Reply (COWIGMJHABDGD4O)
(/member/tolstoyan/)
1 year ago
Reply (CR091WFH9T4IJCX)
(/member/tolstoyan/)
1 year ago
Reply (CLNPYIZH9T4IJCV)
(/member/Lectric+Wizard/)
1 year ago
Reply (CL38JJ6H4AGKGDE)
(/member/DiogoB13/)
1 year ago
Reply (C1M74SFH994X1NA)
(/member/hiphopapotomas/)
1 year ago
Reply (C6CR08CH7PDMAVS)
(/member/davila1/)
1 year ago
Reply (CH8HUOKH5TU9L3S)
(/member/camilo.n1012/)
1 year ago
Reply (CP9HZNSH5TUAWKF)
nyatuv (/member/nyatuv/)
can i use arduino mega?
kjsrocks (/member/kjsrocks/)
could you use an ir remote insted of a keypad if possible a code too thanks.
matoran_nuparu (/member/matoran_nuparu/)
Hi! Nice instructable! but the link to the password library doesn't work. here's correct:
http://playground.arduino.cc/Code/Password
Verkyn (/member/Verkyn/)
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. :)
tolstoyan (/member/tolstoyan/)
ralphlouietionghoy@ymail.com i forgot to attached my email tnx :)
tolstoyan (/member/tolstoyan/)
i need the codes for 4x3 wahahhahaha
nice instruction by thw way :)
i also dont know how to change the password? do i have to type my desire password
to the code? teach me!!! hahahah im new to arduino hehehe tnx :)
Lectric Wizard (/member/Lectric+Wizard/)
sorry ment 910 ohm resistor
DiogoB13 (/member/DiogoB13/) Lectric Wizard
hi, can u give some advice how to start
a timer when the password is true? im
trying but still cant( new at the arduino).
hiphopapotomas (/member/hiphopapotomas/)
Hello, How would the programming differ if a 4X3 keypad were used? I dont really
want mine to have the ABCD, but this is a great instructables.
Thanks, Austin
davila1 (/member/davila1/)
how do i change the password, by the way NICE TUTORIAL
camilo.n1012 (/member/camilo.n1012/) (author) davila1
Hi davila, to change the
password, please go to line 5 of
the code, which states Password
(/member/davila1/)
1 year ago
Reply (C9LU9GGH5Y9VFZE)
(/member/ElStevie/)
1 year ago
Reply (CXBPFG9H5W8ACB4)
(/member/camilo.n1012/)
1 year ago
Reply (C79MSPJH5TUAWKX)
(/member/tsoumelee/)
1 year ago
Reply (C0IVPS1H4VQE1E3)
(/member/camilo.n1012/)
1 year ago
Reply (CLZBXFMH58P2TNA)
(/member/electrodragon/)
1 year ago
Reply (CI4LVGAH4ZN4TWP)
(/member/camilo.n1012/)
1 year ago
Reply (CF7QHVVH4ZN53AR)
password = Password
("your_password"); . Good luck !
davila1 (/member/davila1/) camilo.n1012
thanks a lot keep doing this staff
ElStevie (/member/ElStevie/)
Hey Camilo, thanks for the instructable. But I can't seem to get it working. The Servo
(MG995) just goes on and off for a few seconds and then just off and nothing else
happens until I restart the Arduino. I'm using an Arduino Diecimila and a membrane
4x4 keypad.
Thanks!!
camilo.n1012 (/member/camilo.n1012/) (author) ElStevie
Hi Stevie, double check grades
you need for your project, if you
want that rotation is longer or
shorter you have to go to the
judgments myservo.write () and
set the required value. Tell me if
you have more problems. Good
Luck
tsoumelee (/member/tsoumelee/)
Hi, do you have a failsafe mode in the code (in case of a blackout)? Thanks!
camilo.n1012 (/member/camilo.n1012/) (author) tsoumelee
Hi, if you mean a fail-safe mode for
a apogan in the arduino code is
not very convenient, the best In
This case, is to put a batery and
connected to Arduino, if you have it
connected to AC power you put a
diode and put the battery.
Good luck
electrodragon (/member/electrodragon/)
nice project, but just want mention one thing, the key pad looks too big, get a
membrane one so you can stick it on the wall, like this
(http://www.electrodragon.com/?product=4x4-matrix-16-key-membrane-switch-
keypad-keyboard-new-for-arduinoavrpicarm), will be much nice look.
camilo.n1012 (/member/camilo.n1012/) (author) electrodragon
Hi, is a very good idea, just need
to change the keypad code and
change the position of the pins on
arduino and I can use a keyboard
membranous like this:
http://www.olimex.cl/product_info.php?
cPath=55_96&products_id=532&product__name=Teclado_de_Membrana_12_teclas_con_conector.
(/member/traisjames/)
1 year ago
Reply (C97U01VH4VQRHUV)
(/member/camilo.n1012/)
1 year ago
Reply (CKQXST0H4VQDEFA)
(/member/Lectric+Wizard/)
1 year ago
Reply (COM2YLWH4AGKGCZ)
(/member/camilo.n1012/)
1 year ago
Reply (CAE5D7FH4I7VXNZ)
If you need the code for a 4x3
keypad just tell me and publishes
:)
traisjames (/member/traisjames/)
What do you use to make the wiring diagrams?
camilo.n1012 (/member/camilo.n1012/) (author) traisjames
Hi, i use the Fritzing, you will
download here:
http://fritzing.org/download/
Lectric Wizard (/member/Lectric+Wizard/)
very usefull Instructable !! Just one question, should there be a 1k resistor fron
pin 4 of pad to pin 9 of Arduino ? Drawing shows no connection ...
camilo.n1012 (/member/camilo.n1012/) (author) Lectric Wizard
Hi, is not necessary to connect a
910 ohm resistor on pin 9 (col 4),
will read it anyway the pin. Good
luck :D
About Us
Who We Are (/about/)
Advertise (/advertise/)
Contact (/about/contact.jsp)
Jobs (/community/Positions-available-at-Instructables/)
Help (/community?categoryGroup=Help)
Find Us
Facebook (http://www.facebook.com/instructables)
Youtube (http://www.youtube.com/user/instructablestv)
Twitter (http://www.twitter.com/instructables)
Pinterest (http://www.pinterest.com/instructables)
Google+ (https://plus.google.com/+instructables)
Tumblr (http://instructables.tumblr.com)
Resources
For Teachers (/teachers/)
Artists in Residence (/group/air/)
Gift Pro Account (/account/give?sourcea=footer)
Forums (/community/)
Answers (/tag/type-question/?sort=RECENT)
Mobile
Download our new apps for iOS,
Android and Windows 8!
Android
(https://play.google.com/store/apps/details?
id=com.adsk.instructables)
iOS
(https://itunes.apple.com/app/instructables/id586765571)
Windows
(http://apps.microsoft.com/windows/en-
us/app/7afc8194-c771-441a-9590-
54250d6a8300)
Join our newsletter:
Terms of Service (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |
Privacy Statement (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) | Mobile Site (http://m.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
Join!
2014 Autodesk, Inc.
English enter email
Go Pro Today (/account/gopro?sourcea=footer)
We're Hiring! (/community/Positions-available-at-Instructables/)

You might also like