-
2022-09-16 16:00:09
DEMO90121DA is an RFID access control show
Features and advantages
Independent RFID reader of battery power supply
10 $ bom cost target
Low power consumption (average 400ua)
Optimize the shape, convenient for integration
Application
Narcissus no access control
Short -range radio frequency recognition terminal
Order Informationpart number description
Demo90121da RFID access control show
Demo90121da is a RFID transceiver IC MLX90121 based on RFID transceiver IC MLX90121 All -inclusive non -contact door access example. Once settled, it can detect and read the ISO14443A card, and can light red or green LED through the software configuration.As an independent application running on the battery, considering the rapid response time, the current consumption is optimized. In order to prove the high integratedness allowed by MLX90121, the shape size is minimized. The goal of Demo90121DA's material list is to set the cost of $ 10 per component for 1,000 modules.
The complete schematic diagram, material list, and layout are attached to this document for easy development. The source code of the firmware is based on the FW90121 library and can be found on the CD-ROM attached to Demo90121DA. The device is based on the ISO14443A RFID standard, but the software library makes it easy to adjust the firmware to use other ISO protocols.
This document includes the rapid startup instructions, describes the performance of the demonstration, and explains its hardware and software. We can regard this file as the starting point of building our own access control system, and to meet their specific requirements by adjusting their functions and performance.
Related Melexis products
MLX90121–13.56MHz transceiver
Introduction
You bought a DEMO90121DA. Thank you for choosing Melaces. The show is a non -contact access control solution based on the MLX90121. This file contains the description of the function and performance of this show.
All the necessary hardwares are provided in the box, and the microcontroller on the board has been programmed with the same firmware as the firmware on the CD. You only need to insert the cable, and then in one or moreWhen the label card is close to the antenna, check the status of the LED.
If you want to start development based on this demonstrator, you can find all information on this document and CD, such as schematic diagrams, circuit board layout, component list, firmware source (C code), and related application descriptions. Please note that all these materials are provided to support the use of related Melexis products. Unless particularly agreed, Melexis does not allow copying, circulating or storage for any other types of use on the data carrier in any way.
Box content
You will find the following components in the box.
1 RFID card reader board
1 antenna board
[ 123]
3 label cards
9V battery and battery cable
[ 123] 1 CD
delivered by a firmware and documentation includes the complete documentation of Demo90121DA hardware and firmware, user manual, data table MLX90121, firmware source code (written in C, Flavor AVR GCC), hexadecimal files, circuit board schematic diagrams (ORCAD 9.2 file), circuit board layout (Gerber file), circuit board material list
1 user manual (paper) -This
1 box of content (paper)Connection
The first step is the connection component. Connect the antenna to the RFID card reader board (3 needle connector). Connect the cable (2) of the card reader to the card reader. Plug the battery into the battery connector of the cable.
Working principle
Once connected, this show is allowed to use several functions, which are usually used in RFID accessible equipment. The principle is the unique identifier (UID) based on the ISO14443A tag.
Demonstration program can store multiple UIDs. All cards stored in the device can open the door. Each card is associated with specific access rights, main keys, or effective keys. The only maximum card level (main key) (it can only be a card with the main key key) that can transfer the right to open the door to the card that obtains the second access level (valid key) in this way Essence
The device can be re -initialized. In this way, you can change the card with the primary key and delete all other cards from the valid key card list. When the module is powered or reset through the reset button, the module starts to initialize the stage:
If there is no label within the reading range of the antenna, there is no change in configuration. UIDs that previously stored in memory will be retained.
If there is a mark, the device will read its UID, store it and associates with the main secret rights, and delete other UIDs from the memory.
if there are two or more tags, the configuration will not change. UIDs that previously stored in memory will be retained.
This device can be used as an instance of the battery power supply access control system, optimizing power consumption. Therefore, this device is mainly run under low -power mode, and its label detection function has not been opened. Without labels, the device returns at a low power. In contrast, it starts RFID communication and door access functions.
Function and purpose
System initialization
Place a card on the antenna. Press the Demo90121DA button 1 (reset), check whether the LED D3 and the subsequent D2 start to flash quickly (microcontroller register the No. 1 tag card as the main card)
Open the door
This is this this The device performs this operation in 3 steps: label detection, open ISO14443A communication, read and check UID. Near any type of card near antenna. LED D2 and D3 will light up at the same time, indicating that the label is detected. If the card meets ISO14443A, D2 will flash once alone. In the opposite situation, nothing happens. If the card has any access rights (the main key or effective key), then D3 will flash once alone, which means that the card is recognized as a valid card. In another case, no more things will happen.
Transfer use right
Place the card (card A) with the main key permissions and another card (card B) near the antenna. LED D2 and D3 will light up at the same time (detected), and then D2 flashes twice (two ISO14443A cards), and then D3 flickered twice (two valid code stored in microcontroller memory). This means that the right to open the door is transferred from card A to card B. Card B UID is added as an effective key card 1.
Observation results
1. The range of reading of theDemo90121DA is about 10 cm.
2. Tag detection is achieved by changing the strong load of the antenna field (a period of about 300ms or longer). Therefore, the LED D2 and D3 flashed together, indicating that the magnetic field changes. The object near the antenna may generate label detection instructions
3. When one or more ISO14443 label cards are already in the field, the label detection indicator D2 will flash, indicate the detected number: If there is only one Card, flash once; If two cards are detected, it flashes twice, and so on.
4. In order to reduce the excessive coupling between the tag cards, when nearly two or more label cards reach the antenna, a little fan.
5. The effective label code is stored in the non -volatile memory of the DEMO90121DA microcontroller, so the code will not be lost after power failure.
6. The average current consumption is ~ 0.4mA (antenna load is unchanged).
Hardware
Overview
DEMO90121DA is built around MLX90121 radio frequency identification front end and 8 -bit micro -controller Atmel Atmega8. MLX90121 handles the air interface during transmission and receiving. It generates a high -frequency magnetic field through the E -power drive to drive an antenna, and is modulated according to the protocol and command generated by the single -chip microcomputer. It has a demodulation from the answer and provides digital signals to microcontrollers. ATMEGA8 operation protocol and application software. The board has three interfaces, one for door opening mechanism, a SPI interface for UC programming and a debug connector. It is embedded in the reset button, clock and power management functions, which can be powered from battery.
The radio frequency part
emission
MLX90121 integrates an E -Class drive that can provide up to 200MW power for the antenna. Class E driver (TX pins) is connected to the antenna through a resonant load and an adapter circuit. In order to choose to connect to a variety of different antennas for users, the transceiver output is matched with 50 u0026#525; impedance. Adaptive impedance consists of L2, C6 (resonant load), CV2, C8, L4, L3, C10, CV1 (impedance adapter). In order to obtain the best performance, it is necessary to adjust the adaptive circuit. The tuning operation starts from adjusting CV2 to obtain the maximum amplitude. Once CV2 is fixed, CV1 can be adjusted. Any 13.56MHz antenna that can be matched with 50 u0026#525;. However, it should be paid attention to its quality coefficient, which must be between 10 and 25. If the impedance of an antenna is not 50 u0026#525;, the capacitor C9 is used to match the output. When the antenna is placed in its final position, it must be adjusted, because near metal components (including wires) can cause its characteristics to change in free air. For some prompts to build antenna, see the 13.56MHz RFID system and antenna design guide.
The front desk
Receives to complete through the R1 resistor, and the resistor connects the MLX90121 receiver to the antenna. Its value can be ranging from 1K u0026#525; to 4.7k u0026#525; this depends on the opposite modulation amplitude and reading distance. In this example, the best compromise scheme was given 2.2K u0026#525; When using other valuesMust be particularly careful. If the R1 is too large, the DC bias and reverse modulation signals seen by the receiver are not enough to receive correctly. If R1 is too small, DC bias will make the receiver input saturated.
The modulation depth
10 u0026#525; the resistor R2 fixed the 10%modulation index for the ISO14443B communication. When using the ISO14443A card, the R1 resistor is by -the -way transistor is bypass. In the case of OOK, the resistor can be retained here or not installed.
Micro controller
Connected to MLX90121
Micro controller controls MLX90121, manage clock signals, and interfaces RFID functions with application (that is, door lock mechanism) interface. Port D is used to connect MLX90121 through signal CK, DSync, DOUT, DIN, RTB, and Mode.
Clock
A 13.56MHz quartz crystal oscillator is connected between PB6 and PB7 to produce clocks. The resistor R12 is used to attenuate the fast transients generated by the clock connection between the MLX90121 and the ATMEGA8.
Awakening cycle
In order to reduce power consumption, the microcontroller alternately uses dormant and wake -up mode. This cycle is generated by RC circuits consisting of R16 and C21 connected to PD3. The time constant given by RC enables interruption (int) after about 280ms. The accuracy is given by the tolerance of R16 and C21.
Planning and development
Micro controller can be programmed on the ship with the SPI interface. This serial interface is associated with sufficient hardware and software to allow read and write access to all memory blocks of the microcontroller. This is very useful for firmware updates or changes to meet specific requirements.
Code size
The firmware used in Demo90121DA requires ATMEGA8's 5.2K byte program flash memory. The microcontroller Atmega8 can be replaced by other compatible Atmel models, which has different characteristics and prices.
Power
DEMO90121DA embedded 5V regulator, so at least 6V DC voltage supply is required. Use a diode behind the power connector to protect the circuit board from reverse voltage.
MLX90121 has three sets of power supply feet (power and ground), corresponding to three main modules: digital modules, transmitter modules, and receiver modules. To reduce noise, it is important to separate the power cord carefully. Therefore, the connection method of the power pins is as follows:
-D digital block power pins VSS2 and VDD2 are connected to the number of microcontrollers, respectivelyThe word is connected to the main+5V of the main+5V;
-At the power pins of the transmitter to the TX ground (VSS1) and VDD1 through the filter circuit (L1, C7, and C1), and the main+5V Insulation;
-The receiver is powered by another filter (L5, C11) to the RX ground layer (VSS3), and VDD3 is powered by the main+5V.
The reference clock block of MLX90121 is connected to the transmission block, so the components at the pin XIN and XOUT should be placed on the same connector (GND U TX).
Micro controller has two sets of different power pins, digital power supply (GND UC and main+5V) and analog power supply (GDN_ADC and AVCC pins) through filters (L6, C18) Essence
The time of about 0.98%of the microcontroller is in a wake -up state, and the transmitter has a time of 0.25%in a wake -up state. The measured average power supply current is lower than 0.41mA.
Two layers of PCB have multiple ground layers, which are connected to each other through the downs that can be replaced by some small -value resistors (under 0805) to reduce noise transmission between different functional blocks: [123 123 ]
ClockThe only clock source reference is a 13.56MHz quartz resonant connected to the microcontroller. In order to reduce the number of components and the material list, XTAL is shared, and the clock output PB7 from the micro -controller is fed to the clock to enter XIN.
Interface
The interface of the microcontroller and the ""external world"" also has other components: SPI interface that can be used for microcontroller programming, reset switch for system initialization, for developer verification The debug connector of the firmware changes and the functional interfaces consisting of 2 LEDs and 2 digital level input are used for two position sensors (limiters 1 and limiter 2) and a low -power digital level output (locking motor) Essence
Developers should add a sufficient power buffer to drive the door lock motor or electromagnet.
firmware
Structure
provides the main label programming, anti -collision processing and label detection for the firmware developed by Demo90121DA as the basic service function of the door lock application. The following flowchart shows the main structure of the firmware:
After calling or. Its ID is stored in memory. This will become the ID of the application of the application. If there is no mark in the field, the code stored before is still valid, including the main code.
Once completed, the firmware enters the main loop. Measure the RSSI level and store it with the microCompared with the benchmark in the controller memory, there are labels in the detection field. Without any labels, the system will enter the dormant mode within the time period of the RC circuit connected to the PD3. If a tag is in the field, it starts a list according to the ISO14443A protocol (see Figure 10) and read all ID (identification code) that responds to its request. (See Figure 9)
If there is only one effective label on the scene, the microcontroller will issue a door opening order. If there are multiple effective marks in the field, but without the main marker, they will be ignored and goalkeeper will not open. (See Figure 9)
If the main marker is detected with other tags (ISO14443A), the firmware will register all code as a valid code and reset all the previous valid code. In order to prevent the wrong redefining effective code, this registration depends on the status of the two limited device: the door lock and press the door handle. If there is only the main marker in the field, the list is kept in the original and the door opening command is sent. (See Figure 9)
In order to reduce the success rate of code scanning hackers, the door lock can be turned on without only one effective label on the scene. This is also applicable to the main label. The door -to -door limit switch condition restricted the firmware access door opening function, and only one effective label appeared on the scene. (See Figure 9)
After the hardware reset, you can remove the list of all valid code and redefine the main marker code. (See Figure 11)
Observation:
-A valid label code can reach up to 12 bytes (96 digits).
-The algorithm can be modified according to the specific needs of the target application.
The long sleep time of about 300ms is based on hardware (see Figure 12): a RC circuit connected to the PIN Int1 (ATMEGA8) RC circuit discharges from VDD to the input level, thereby triggering a trigger a trigger a trigger one Interrupt (see Figure 12).
In order to reduce the power consumption of the device, we adopted the power loss mode of the microcontroller. All the clocks stopped, and only the door dogs were running. Watching dogs will be reset at the end of the main loop, and it will be reset after a long period of delay.
Practical information
The firmware of Demo90121DA is based on FW121 library. (FW90121: Fixedware description) This library provides the ISO15693 and ISO14443 protocol functions as a specific command to control the EEPROM of MLX90121, addressing its internal registers and reading/writing Atmel microcontroller. During power -on or reset, the microcontroller IO port, timer, ADC and door dog, and MLX90121 transceiver register configuration to ISO1 described in the MLX90121 data table4443A protocol.
The firmware was developed by GCC under AVRSTUDIO4. The firmware can use the SPI interface to be connected to the STK500, STK300, AVRISP MKII module or a SPI interface of similar modules to a microcontroller, and drives by appropriate software (AVR Studio, Ponyprog2000, etc.). FW_DA21_14A.C and FW_DA21_14A.H contain the prototype of the GCC code and function of the firmware. H describes hardware (input, output pins, etc.). File FW_DA21_14A.APS is the AVR Studio 4 project file.
Power consumption
DEMO90121DA is designed for battery power, so the current consumption is optimized. The following figure (Figure 13) shows a typical current consumption change in a cycle (loop).
The average current consumption is about 0.41mA. Using a 1000mAh battery can achieve 100 days of autonomy. Of course, this value depends on the number of access events and is deeply affected by the consumption of door lock mechanical devices. When selecting the RSSI threshold (DVRSSI parameter), you should be particularly careful. If its value is too small, the noise will make the device start a resource booking attempt without label.
As shown in the table, MLX90121 is mostly in the state of power off (T1 §288MS). If the RSSI signal has not changed from the previous ring, the transmitter will be turned on in a short period of time, and then the micro controller puts the MLX90121 in the power off state. If the RSSI signal changes significantly, the MLX90121 sends a resource book command, and then enters the power -off mode (T4 increases to tens of milliseconds). The microcontroller will continue to check the inventory results, and finally open the door lock, or store the new code in EEPROM.
Use four alkaline AA batteries to provide 10 drivers a day for application board DEMO90121DA (ISO14443A label card via 13.56MHz magnetic field). The voltage change is shown in Figure 14.
Conclusion
DEMO90121DA is a small, economic and efficient access control module based on Melexis 13.56MHz transceiver MLX90121. For those developers who want to build their own systems to meet their specific needs, it can also be regarded as a advanced starting point.
The software library FW121 facilitates the software development of the MLX90121 transceiver. Programmers can use advanced commands to communicate with MLX90121. In this way, they can concentrate the upper -level functions of micro -controllers and applications.