introduction
Currently, IC card attendance system has been used by many enterprises, but using IC card attendance has its inherent defects. For example, an employee can bring someone else's IC card and punch in for someone else, which cannot achieve the real purpose of attendance. Based on computer serial port technology and biometric technology, the biological characteristics of the human body can be used for identity recognition to develop attendance software suitable for daily management.
This system consists of two parts: attendance machine and fingerprint attendance management. It uses fingerprint template as a symbol for identity verification and uses the uniqueness of fingerprints to completely eradicate false phenomena in attendance, effectively eliminating human factors in attendance management, fully reflecting the fairness of attendance management, and avoiding unnecessary personnel disputes. This system provides enterprises with scientific and reliable attendance management methods, saving a lot of manpower and financial resources, and is the best attendance mode for enterprises to reflect their modern management.
1 System Model and Functional Introduction
This fingerprint attendance system consists of two parts: fingerprint attendance management and attendance machine, as shown in Figure 1. The attendance machine consists of a fingerprint acquisition head, a single-chip microcomputer, a power supply, and a shell. The computer and the attendance machine are connected and communicated through an RS-232 data line.
(1) Employee information management. Including functions such as entering, modifying, deleting, and querying employee information.
(2) Data management. As attendance data continues to increase, the database capacity continues to increase, which increases the overhead of data processing. We export temporarily unused data from the database to reduce the database capacity and increase the data processing speed; when this data is needed, it will be imported into the database.
(3) Rule setting: Setting of some rules in the attendance system, such as attendance rule setting, reward and punishment rule setting, communication rule setting, attendance rules for designated employees, etc.
(4) Employee work arrangements. Set specific work arrangements for employees as the basis for processing attendance data.
(5) Process attendance data. Compare the employee's work schedule data with the employee's actual attendance data, and determine the attendance result (normal, late, early leave, absenteeism, etc.) based on the attendance rules. Then, determine the employee's actual salary over a period of time based on the reward and punishment rules.
(6) Shift management. By designating different working hours as different shifts, you can easily arrange shifts for employees.
(7) System maintenance. System management functions include user rights management, password modification, help, etc.
(8) Communication management. The attendance machine communicates with the computer serial port through the RS-232 data line. Before an employee clocks in, he or she needs to log his or her fingerprint into the attendance machine to form a fingerprint template, i.e. fingerprint template collection; only when the attendance machine recognizes the employee's fingerprint template can it record the current employee's attendance time and form an attendance record. For the attendance machine to communicate with the computer, it is necessary to set up the attendance machine and connect the attendance machine to the computer before uploading attendance data, uploading fingerprint templates, and downloading fingerprint templates.
2 Communication data format
2.1 Format of attendance records
An attendance record occupies 7 bytes and its format is shown in Table 1.
Table 1 Format of an attendance record
The employee number occupies 2 bytes and stores hexadecimal numbers. For example, the employee number 1234 is converted into a decimal number of 12×256+34=3106.
2.2 Format of the attendance record package
An attendance record packet occupies 184 bytes and has the format of ! + (record 0)...(record l9) + retransmission flag + checksum + !.
The retransmission flag indicates whether the record packet is a retransmitted record packet, 0 for normal, 1 for retransmission, that is, the value of this byte is 1 only when the record packet is retransmitted; checksum: the XOR value of all bits in the record packet (except this byte), occupying 1 byte.
2.3 Fingerprint Template Package
A fingerprint template package occupies 812 bytes and has the format of { + fingerprint template + checksum + }.
The fingerprint template occupies 809 bytes and its format is shown in Table 2.
Table 2 Format of a fingerprint template
[page]
3 Communication Implementation
3.1 Communication Settings
The steps for connecting the computer to the attendance machine are as follows, and the process is shown in Figure 2.
(1) Before communication, set the baud rate, data bit, check bit, and select the serial port for the attendance machine.
(2) The computer sends an online communication command to the attendance machine and starts the timer response timeout.
(3) When the attendance machine receives the online command, if the online connection is allowed, it replies to the computer with a response allowing the online connection.
(4) If the computer receives a response from the attendance machine, the connection is successful. If the computer does not receive a response from the attendance machine within the waiting time, it is considered a timeout, and the computer resends the connection command and returns to execute (2). If the computer timeout occurs more than three times, the connection is considered a failure.
Figure 2 Computer attendance machine online flow chart
3.2 Upload attendance records
The steps for uploading the attendance records in the attendance machine to the computer are as follows, and the process is shown in Figure 3.
(1) The computer sends a command to upload attendance records to the attendance machine.
(2) After receiving the command, the attendance machine compares the total number of attendance records with the number of attendance records that have been uploaded. If the total number of attendance records is equal to the number of attendance records that have been uploaded, it indicates that there are no new attendance records, and a no new attendance record response is sent to the computer; if the total number of attendance records is greater than the number of attendance records that have been uploaded, it indicates that there are new attendance records that have not been uploaded, and the 20 new attendance records are combined into a data packet (as described in Section 2.2) and the data packet is sent to the computer. If the remaining attendance records are less than 20, each byte of the insufficient part is set to 255.
(3) The computer receives the data packet and checks whether it is an attendance record packet.
(4) If it is an attendance record package, verify the record package; if it is not an attendance record package, re-execute (1).
(5) If the verification is correct, save each attendance record to the database; if the verification is incorrect, re-execute (1).
(6) If the data is saved successfully, go to (1) and upload the remaining attendance records until all attendance records are uploaded; if the data is saved incorrectly, go to (1) and re-execute. Re-execute (1) in steps (4), (5), and (6) up to three times. If it happens more than three times, it is considered that the uploading of attendance records has failed.
Figure 3 Flowchart for uploading attendance records
3.3 Upload fingerprint template
In order to back up the employee's fingerprint template, the fingerprint template stored in the attendance machine is uploaded to the computer and saved in the database.
The steps for uploading fingerprint templates are as follows, and the process is shown in Figure 4.
Figure 4: Uploading fingerprint template process
(1) The computer sends a command to upload the fingerprint template to the attendance machine.
(2) After receiving the command, the attendance machine determines whether to allow uploading of fingerprint templates based on the current status of the attendance machine (whether it is in use). If the transmission of fingerprint templates is not allowed now, a non-permit response is sent to the computer. If it is allowed, it determines whether all fingerprint templates have been sent. If so, a transmission completion response is sent to the computer. Otherwise, a fingerprint template upload permission response is sent to the computer, and then the fingerprint template is sent.
(3) The computer takes corresponding actions according to the response received from the attendance machine. If a non-permit response or a complete transmission response is received, the communication ends; if a permission response is received, the computer prepares to receive the fingerprint template.
(4) Determine whether the received fingerprint template is correct
(5) If correct, save the fingerprint template to the database; if incorrect, go to (1) and execute again.
(6) If the fingerprint template is successfully saved to the database, go to (1) to prepare to upload the next fingerprint template until all fingerprint templates are uploaded; if the fingerprint template fails to be saved to the database, go to (1) and re-execute. In steps (5) and (6), re-execute (1) up to three times. If it happens more than three times, it is considered that the fingerprint template upload has failed.
4 Conclusion
This paper describes the functions of each part of the fingerprint attendance system, and describes the communication data format and communication process in detail. This fingerprint attendance system integrates biometrics, mechatronics, software, optics and other technologies, and is specially developed for attendance management in human resource management.
Previous article:Design of Alcohol Content Detector Based on Single Chip Microcomputer
Next article:Design of campus self-guided tour device based on C51 single chip microcomputer
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [micropython] BLE function is officially added to ESP32
- [RVB2601 Creative Application Development] 3. RGB three-color breathing light of RVB2601
- Several classic FPGA verification books
- FPGA learning experience - matrix keyboard
- Welcome the moderator "天意无罪" to take office~~
- Task stack overflow detection mechanism in FreeRTOS
- GaN RF Circuits and Applications
- How to quickly learn to use a chip?
- Lei Jun lost the 1 billion bet with Dong Mingzhu. It seems that the typhoon still can't blow up the pigs.
- The pad is 0.3mm/center distance is 0.5mm and the wire cannot come out