ETC AP5

P IC
ap
l
ation’s
AP5 – Electronic Lock
Farnell Order code 120-108
1
2
15
3
B0/INT
B1
A4/TMR0
B2
B3
B4
PIC16F84
B5
B6
B7
C2
100nF
C1
100pF
6
7
8
9
10
11
12
13
1
2
3
1k
Q1
BC237B
R4
4k7
R5
PASS FAIL
4k7
PROGRAM
U1
Q2
BC237B
5
VSS
4.5V BATTERY
OSC2
R3
SW1
SW2
SW3
3
2
1
1
U2
OSC1
A0
A1
A2
A3
1k
D1
LED
2
16
MCLR
R2
1
4
17
18
1
2
2
6k2
J1
IC1
1
2
R1
VDD
14
Circuit Diagram
D2
LED
Board Layout
Assembly
Insert the components as shown, ensuring the
PIC is correnctly inserted. Check the board for
solder bridges and dry joints before applying
power. Leds should be inserted with the
longer lead to the + symbol on the drawing.
The battery holder is best inserted with the
pins passed through the top of the board,
soldered and then gently folded under the
board and finally attached with the doublesided pad supplied.
J1 – Connections to customer circuit.
Operation
The Alarm has two modes of operation – program and run. Initial coding is achieved by placing
the header link onto the 2 pins at (U1). This will activate the program mode. Remove the link
before the digits are entrered. Six digits are required to be entered. This is acheived by
depressing the the push buttons in a sequence, i.e. 1, 2, 3, 1, 2, 3; 1, 2, 3, 3, 2, 1, etc, or any
combination you wish. As each digit is entered, the pass light will flash once. On completion of
the 6th number, the pass light will flash for a few seconds. The PIC will move into a sleep mode
and will be woken by a button press. If the user enters 6 correct digits, the green light will stay
on for 2 seconds. If an incorrect code is entered, the red light will illuminate. The transistors
can be used to drive electronic locks or alarms.
To change to code, replace the link header. Enter the new code. The red light will flash. (This
indicates the original code has been removed). Enter the new code again. On completion the
green light will flash. Remove the link header.
The software is self explanitory and should not be difficult to follow. Modifications to the code
could be to change the number of codes, add a timeout delay or a lockout for greater than a
preset consecutive errors.
Moving on from here
If you wish to learn more about the PIC, there are a number of books on the subject which will
assist.
Beginners Guide the the PIC
PIC Cookbook Vol 1
PIC Cookbook Vol 2
Farnell order code AD31
Farnell order code DT76
Farnell order code VQ59
The minimum hardware needed to get started is the PIC Start Plus programmer (Farnell order
code 704-740) which is supplied with it’s own development environment – MPLAB. From there
you could branch out to an ICEPIC In Circuit Emulator which speeds up development time.
The software on the disk is in a text format which can be printed from any wordprocessor
package or DOS EDIT.
Parts List
The kit should contain the following items. If there is a shortage, please contact your supplier in
the first instance.
Part Description
Capacitor 100pF
Capacitor 100nF 63v
Single row header plug
Miniature closed jump link
Red LED
Green LED
Resistor - 1K
Resistor - 4K7
Resistor - 6K2
Adhesive foam pad
Push buttons
BC237B Transitor
PCB mounted battery box
Diskette
IC
Printed circuit board
Quantity Circuit reference
1
1
1
1
1
1
2
2
1
1
3
2
1
1
1
1
C1
C2
U1
U1
D2
D1
R2, R3
R4, R5
R1
-SW1 - SW3
Q1, Q2
U2
-IC1
--
EMC Directive
This product is manufactured in small quantities and has not been tested for compliance with
any EMI/EMC regulations (e.g., CE in Europe, FCC in the U.S). Bluebird Electronics does not
market or recommend this product for use in applications that would require documented
compliance with such regulations. If compliance is required in your application, you must
assume that this product does not comply, unless your testing shows otherwise.
By installing and using this product, you accept responsibility for any and all consequences of
non-compliance with applicable standards. Bluebird Electronics is not responsible for any
special, incidental, or consequential damages resulting from any breach of warranty, or under
any legal theory, including lost profits, downtime, goodwill, damage to or replacement of
equipment or property, and any costs or recovering, reprogramming, or reproducing of data
associated with the use of the hardware or software described herein.
Bluebird Electronics
Suite 2, Townsend Barn,
Poulshot, Devizes. SN10 1SD
Tel +44 (0) 1380 827 080
Fax +44 (0) 1380 827 082
internet www.bluebird-electronics.co.uk
email info@bluebird-electronics.co.uk
10/01