Electronic Locking-controller of Radio Frequency IC Card
Affiliated technical field
The utility model relates to a kind of electric lock control device, belongs to electronic technology field.
Background technology
In recent years, because the needs of public security and management, public corridor generally adopted electric control burglar-proof door, generally used common tapered end, and the user needs corresponding key, opens electric control lock.For the user, safety has improved, but has also brought the trouble of unblanking simultaneously.
At present, RF IC card has been widely used in access control system, the public transport payment system, and highway toll collection system, and the medical insurance system or the like.But, because application system development person is numerous, the developer often sets up data structure and password separately, exists different application systems need issue separately RF IC card in RF IC card is used.For example, public transport distribution public transport RF IC card, the meal RF IC card is sold in unit dining room distribution, access control system distribution gate inhibition RF IC card.The user need carry multiple card, and is very inconvenient.
Summary of the invention
The purpose of this utility model provides a kind of electronic lock controlled device, adopts the RF IC card (as the public transport RF IC card) of other system, after electronic lock controlled device is provided with, promptly can be used as the key that opens the door, and opens electric control lock.Because the Mifare RF IC card is widely used, RF IC card of the present utility model is at the Mifare RF IC card.
The technical scheme that its technical problem that solves the utility model adopts is: utilize each RF IC card to have the card sequence number of 12 16 systems that solidified by producer, have readable can not the change, and be unique, not reproducible characteristic.State is being set, and control program of the present utility model reads in, preserves above-mentioned card number, and then this RF IC card is effective key card.The utility model is preserved the card sequence number of a plurality of RF IC cards, and above-mentioned RF IC card is effective key card.The utility model depends on the capacity of EEPROM of the present utility model for the capacity of key card, and the EEPROM of general 4KBYTE can preserve the card number of 256 RF IC cards.In normal operating conditions, control program reads in card number, the card number comparison of the RF IC card of preserving with EEPROM, and comparison result is as the foundation of unblanking.
The utility model and existing RF IC card gate control system are in the difference of technical scheme: control program of the present utility model is provided with the utility model by the sequence number that reads RF IC card, makes this RF IC card become key card; And the RF IC card gate control system of prior art finishes that by the memory cell of RF IC card being carried out write operation customization being set, and makes this RF IC card become key card.
The utility model comprises shell, wiring board.Single-chip microcomputer (MCU) is arranged, RF IC card base station ic, antenna, electrically-erasable memory (EEPROM), RS232 asynchronous communication interface circuit, output driving circuit, power connection, out splice going splice on the wiring board.The program storage (ROM) of single-chip microcomputer (MCU) has the control program code, comprise: the program code of reading the sequence number of RF IC card, sequence number is deposited in the program code of EEPROM, read the program code of eeprom content, the program code of sequence number comparison, the program code of comparison result output.
The utility model is installed on the door of electric control lock, and output of the present utility model links to each other with electric control lock input contact.After powering up, single-chip microcomputer (MCU) promptly moves control program.When setting/operating switch is in the state of setting, the RF IC card base station ic is read in the control program circulation, enter the antenna workspace if any RF IC card, control program is carried out the program code of the sequence number of Card Reader, carry out the program code of reading eeprom content then, read content and the program code that blocks the sequence number comparison.The comparison failure will block the program code that sequence number deposits EEPROM in; Compare successfully, inoperation waits for that card leaves.Like this, originally the card of existing record is no longer handled, and the sequence number of originally unwritten card deposits EEPROM in.
When setting/operating switch in running order, program cycle is read the RF IC card base station ic, enter the antenna workspace if any RF IC card, control program is carried out the program code of the sequence number of Card Reader, carry out the program code of reading eeprom content then, read content and the program code that blocks the sequence number comparison, the program code of comparison result output waits for that card leaves.Like this, the card of existing record is carried out unlock operation, do not carry out unlock operation there being registration card originally.
The utility model can link with the PC serial ports, and PC is carried out corresponding signal procedure, and the utility model is carried out the program code of RS232 asynchronous communication, uploads/download eeprom content.Like this, to processings of can filing of the card number of EEPROM storage, to the card removal correspondence of calcellation content at EEPROM.
Because technical development, RF IC card has been made various ornament shapes, and the user can conveniently add in the application of the present utility model.
In sum, the utility model compared with prior art has following advantage:
1) the utility model can use the RF IC card of existing other application system, need not issue special RF IC card, only utilizes the existing RF IC card resource of user, has reduced cost.
2) adopt the utility model, the user need not carry card more, uses more convenient.
3) the utility model does not take any resource of RF IC card, the original application system of RF IC card is not had any influence.
4) adopt the utility model,, can open a passage lock by a plurality of RF IC cards, can open a plurality of passage locks by a RF IC card through being provided with.Be fit to management to public corridor.
5) adopt the utility model can break away from upper PC, finish the operating process that is provided with and works, be easy to use.
6) the utility model does not have write operation to RF IC card, and compatible good, it is more convenient that working service is set.
Description of drawings
Below in conjunction with drawings and Examples the utility model is further specified.
Fig. 1 is a system architecture block diagram of the present utility model.
Fig. 2 is the circuit board figure of the utility model embodiment.
Fig. 3 is a program code block diagram of the present utility model.
Fig. 4 is the flow chart that is provided with of the present utility model.
Fig. 5 is a workflow diagram of the present utility model.
1 is single-chip microcomputer among the figure, and 2 is base station ic, and 3 is dual-mode antenna, 4 is electrically-erasable memory (EEPROM), 5 is serial line interface, and 6 for output drives, and 7 are setting/function switch, 8 is the program code of Card Reader sequence number, 9 for the card sequence number deposits the program code of EEPROM in, and 10 for reading the program code of eeprom content, and 11 read the program code of content and the comparison of card sequence number for EEPROM, 12 is that 13 is the program code of RS232 asynchronous communication with the program code of comparison result output.
The specific embodiment
Among the embodiment illustrated in figures 1 and 2, single-chip microcomputer (1) connects base station ic (2) with bus mode, by the read-write to each function register of base station ic (2), realizes the monitoring of RF IC card, the operation of reading sequence number.Base station ic (2) links to each other with dual-mode antenna (3), realizes the interface to RF IC card.The I/O mouth of single-chip microcomputer (1) links to each other with EEPROM (4), realizes the operation of single-chip microcomputer (1) to EEPROM (4) by the program code of reading, deposit in EEPROM.The serial i of single-chip microcomputer (1)/O mouth links to each other with serial line interface (5), and the operation of the program code by the RS232 asynchronous communication realizes the interface of single-chip microcomputer (1) and host computer.The I/O mouth of single-chip microcomputer (1) drives (6) with output and links to each other, by the operation with the program code of comparison result output, realization unlock operation.
Please refer to Fig. 3, single-chip microcomputer (1) comprises functional modules such as CPU, RAM, ROM, I/O, be solidified with program code among the ROM, comprise the sequence number of Card Reader program code (8), will block the program code (9) that sequence number deposits EEPROM in, program code (10), the EEPROM that will read eeprom content reads content and the program code (11) of card sequence number comparison, the program code (12) with comparison result output, the program code (13) of RS232 asynchronous communication.
Fig. 4 is the flow chart that the program code of setting up procedure is carried out.Single-chip microcomputer (1) is through initialization procedure, detect setting/operating switch (7), be in the state of setting (14), program cycle is read RF IC card base station ic (15), enter antenna workspace (16) if any RF IC card, control program is carried out the program code (17) of the sequence number of Card Reader, carries out the program code (18) of reading eeprom content then, reads content and the program code (19) that blocks the sequence number comparison.The comparison failure will block the program code (20) that sequence number deposits EEPROM in; Compare successfully, inoperation EEPROM only does sound prompting (21), waits for that card leaves (22), enters the done state (23) of setting up procedure, restarts program circuit.Like this, originally the card of existing record is no longer handled, and the sequence number of originally unwritten card deposits EEPROM in.
Fig. 5 is the flow chart that the program code of operate as normal is carried out.Single-chip microcomputer (1) is through initialization procedure, detect setting/operating switch (7), in running order (24), program cycle is read RF IC card base station ic (25), enter antenna workspace (26) if any RF IC card, control program is carried out the program code (27) of the sequence number of Card Reader, carry out the program code (28) of reading eeprom content then, read content and the program code (29) that blocks the sequence number comparison, the program code (30) of comparison result output, wait for that card leaves (31), enter the done state (32) of process, restart this process.Like this, the card of existing record is carried out unlock operation, do not carry out unlock operation there being registration card originally.
The program code of the utility model embodiment is based on modularized design.Host computer (PC) can link to each other with the RS232 serial ports of the utility model embodiment by the RS232 mouth.Host computer (PC) operation dedicated management program, the program code operation of the RS232 asynchronous communication of the utility model embodiment, data upload host computer (PC) among the EEPROM is by above-mentioned dedicated management routine processes.The data that pass under the above-mentioned dedicated management program of program code (13) acceptance of the RS232 asynchronous communication of the utility model embodiment deposit among the EEPROM.This process is finished to the calcellation process of RF IC card or to the another kind of setting up procedure of eeprom content.