A card reader device and an automatic switching system based on RS485 and Wiegand dual protocols
By employing a detachable structure and an RS485/Wiegand automatic switching system, the problems of complex maintenance and insufficient flexibility in protocol switching of card reader devices are solved, enabling convenient maintenance and adaptability to multiple scenarios, and ensuring the stability and real-time performance of data transmission.
Patent Information
- Application Number
- CN202521104102.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2026-07-14
- Estimated Expiration
- 2035-05-30
AI Technical Summary
Existing card reader devices have a fixed structure, are complex to maintain, are prone to damage to interface components, are difficult to adapt to communication needs in multiple scenarios, lack flexibility in protocol switching, and are susceptible to interference that can lead to data packet loss or response delays.
The design incorporates a detachable card reader structure and an automatic switching system based on both RS485 and Wiegand protocols. It supports RS485 and GPIO interfaces, automatically identifies and switches communication protocols, and employs differential signals and interrupt mechanisms to improve anti-interference capabilities and response speed.
It enables convenient maintenance, supports multiple application scenarios, reduces maintenance costs, ensures the stability and real-time performance of data transmission, adapts to long-distance and high-response requirements, and reduces the risk of system failure.
Smart Images

Figure CN224501276U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of card reader technology, specifically to a card reader device and an automatic switching system based on RS485 and Wiegand dual protocols. Background Technology
[0002] Existing card reader devices mostly adopt a fixed structure design with a tightly sealed outer shell, which requires the entire circuit board to be disassembled for maintenance or replacement, making the operation complicated and easily damaging the interface components.
[0003] In addition, traditional card readers typically only support a single communication protocol, making it difficult to adapt to the needs of multiple scenarios. For example, in long-distance industrial control scenarios, the stable communication capability of RS485 is required, while in access control systems, the low-latency response of the Wiegand protocol is needed.
[0004] While existing technologies offer protocol switching solutions, they rely on external control equipment or manual intervention, lacking flexibility and being susceptible to interference during the switching process, leading to data loss or response delays. Utility Model Content
[0005] This utility model aims to at least partially solve one of the technical problems in the related art. Therefore, one object of this utility model is to provide a card reader device, comprising: a card reader and a circuit board;
[0006] The card reader consists of a bottom shell and a top shell, which are detachably connected to facilitate installation or removal.
[0007] The bottom shell has a receiving cavity, and the circuit board is disposed in the receiving cavity;
[0008] The top shell is provided with a screen, multiple buttons and a card swiping area. The multiple buttons are arranged at equal intervals, and the screen, multiple buttons and the card swiping area are connected to the circuit board.
[0009] Preferably, the top of the bottom shell is provided with embedding grooves on both sides, and the top and both sides of the embedding grooves are connected.
[0010] Preferably, the bottom sides of the top shell are provided with elastic fasteners, the fasteners are V-shaped and correspond to the embedded grooves.
[0011] Preferably, the bottom shell has at least four positioning grooves, which are respectively located at the corners of the bottom shell.
[0012] Preferably, springs are provided in the positioning grooves.
[0013] Preferably, the bottom of the top shell is provided with a sealing plate, the sealing plate is corresponding to the receiving cavity, and the bottom of the sealing plate is provided with at least four positioning posts, which are respectively located at the corners of the sealing plate, and the positioning posts are corresponding to the positioning grooves.
[0014] A handover system based on automatic handover of RS485 and Wiegand dual protocols includes:
[0015] A hardware module that supports RS485 communication interface and GPIO interface, wherein the RS485 interface is adapted to Civintec proprietary protocol and the GPIO interface is adapted to Wiegand protocol.
[0016] The card reader is configured to simultaneously listen to the input data of the RS485 interface and the GPIO interface in idle mode, and automatically switch to the corresponding output interface for data transmission according to the received protocol type.
[0017] Preferably, the automatic switching logic includes:
[0018] When the RS485 interface receives data conforming to the Civintec protocol format, the RS485 output mode is activated, and subsequent data is output through the RS485 interface.
[0019] When the GPIO interface detects an input signal in the Wiegand protocol format, it activates the Wiegand output mode and switches the GPIO interface to output mode to transmit data.
[0020] Preferably, after completing the data output of the current protocol, the card reader automatically resets the RS485 interface and GPIO interface to idle mode and re-enters the dual-interface input listening state.
[0021] Preferably, the RS485 interface supports long-distance communication up to 900 meters and uses differential signal transmission to improve anti-interference capability;
[0022] The GPIO interface achieves instant response to data input through an interrupt receiving mechanism, with a response delay of no more than 1 millisecond.
[0023] The above-described solution of this utility model has at least the following beneficial effects:
[0024] The bottom and top shells are detachable, which allows users or technicians to maintain or replace the circuit boards inside the bottom shell. The detachable structure improves the maintenance efficiency of the card reader.
[0025] The hardware module simultaneously monitors RS485 (Civintec protocol) and GPIO (Wiegand protocol) inputs, automatically activating the corresponding output interface based on the protocol type. It supports stable long-distance communication (RS485 up to 900 meters) and instant response (Wiegand latency ≤1ms), covering diverse scenarios such as industrial control and smart access control. After protocol switching, it automatically resets to idle monitoring mode to avoid interface conflicts. RS485 adopts a differential signal anti-interference design, while Wiegand ensures data real-time performance through an interrupt mechanism. The two protocols operate independently without interference.
[0026] Additional aspects and advantages of this invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this utility model or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this utility model. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0028] Figure 1 This is a schematic diagram of the structure of the card reader device provided in this embodiment of the utility model;
[0029] Figure 2 This is a schematic diagram of the bottom shell provided in an embodiment of the present utility model;
[0030] Figure 3 yes Figure 2 Enlarged view of part A;
[0031] Figure 4 This is a schematic diagram of the top shell provided in an embodiment of the present invention;
[0032] Figure 5 This is a system framework diagram of a switching system based on automatic switching between RS485 and Wiegand dual protocols provided in this embodiment of the utility model;
[0033] Figure 6 This is a flowchart illustrating the dual-protocol implementation in this embodiment of the utility model.
[0034] Explanation of icon numbers:
[0035] 1. Card reader; 2. Circuit board;
[0036] 101. Bottom shell; 102. Top shell; 103. Receiving cavity;
[0037] 1011, Embedded groove; 1012, Positioning groove; 1013, Spring;
[0038] 1021. Screen; 1022. Buttons; 1023. Card reader area; 1024. Fastener; 1025. Sealing plate; 1026. Positioning post.
[0039] The realization of the purpose, functional features, and advantages of this utility model will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0040] The embodiments of this utility model are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this utility model, and should not be construed as limiting this utility model. All other embodiments obtained by those skilled in the art based on the embodiments of this utility model without inventive effort are within the scope of protection of this utility model.
[0041] In the description of this utility model, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "circumferential", "radial", etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this utility model and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this utility model.
[0042] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this utility model, "a plurality of" means two or more, unless otherwise explicitly specified.
[0043] In this utility model, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this utility model according to the specific circumstances.
[0044] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0045] The card reader device of the present invention will now be described in detail with reference to the accompanying drawings.
[0046] Please see Figures 1-4 In this embodiment, the device includes a card reader 1 and a circuit board 2. The card reader 1 consists of a bottom shell 101 and a top shell 102, which are detachably connected for easy installation or removal. The bottom shell 101 has a receiving cavity 103, and the circuit board 2 is disposed in the receiving cavity 103. The top shell 102 has a screen 1021, multiple buttons 1022, and a card swiping area 1023. The multiple buttons 1022 are evenly spaced, and the screen 1021, multiple buttons 1022, and card swiping area 1023 are connected to the circuit board 2. The bottom shell 101 and the top shell 102 are detachable, which allows users or technicians to maintain or replace the bottom shell 101 and the top shell 102 by means of the circuit board 2 in the bottom shell 101. The detachable structure improves the maintenance efficiency of the card reader 1.
[0047] The aforementioned circuit board 2 has communication methods such as Bluetooth connection and Wi-Fi connection.
[0048] In this embodiment, the bottom shell 101 has two sides of the top of the bottom shell 101 respectively provided with an embedding groove 1011, and the top and sides of the embedding groove 1011 are through-connected; the bottom of the top shell 102 has two sides of the bottom provided with elastic fasteners 1024, the fasteners 1024 are V-shaped and correspond to the embedding grooves 1011.
[0049] When the fastener 1024 is inserted into the insertion groove 1011, the outer end of the fastener 1024 abuts against the top of the insertion groove 1011, so that the top plate is fixed on the bottom shell 101. When it is necessary to remove the top shell 102, simply press or push the outer end of the fastener 1024 so that the outer end of the fastener 1024 moves towards the other end inward, and then the top shell 102 can be removed from the bottom shell 101.
[0050] The V-shaped elastic fastener 1024 and the through-type insert groove 1011 are designed to lock or separate the housing without tools by pressing, which greatly improves the efficiency of disassembly and assembly and reduces maintenance costs. The through-type insert groove 1011 provides sufficient space to ensure that the fastener 1024 is accurately aligned during assembly and avoids structural damage caused by deviation. The elastic deformation characteristics of the V-shaped fastener 1024 can generate a continuous clamping force after locking, which effectively prevents the housing from accidentally loosening due to vibration or external impact.
[0051] In this embodiment, the bottom shell 101 is provided with at least four positioning grooves 1012, which are respectively located at the corners of the bottom shell 101; springs 1013 are respectively provided in the positioning grooves 1012; the bottom of the top shell 102 is provided with a sealing plate 1025, which corresponds to the receiving cavity 103; the bottom of the sealing plate 1025 is provided with at least four positioning posts 1026, which are respectively located at the corners of the sealing plate 1025, and the positioning posts 1026 correspond to the positioning grooves 1012.
[0052] When the top shell 102 and the bottom shell 101 are installed, the positioning pin 1026 is inserted into the positioning groove 1012, and the positioning pin 1026 compresses the spring 1013 in the positioning groove 1012. Then the fastening part 1024 of the top shell 102 is embedded in the embedding groove 1011. When the top shell 102 needs to be removed, after the fastening part 1024 of the top shell 102 moves away from the fixing groove, the compressed spring 1013 lifts the top shell 102 so that the top shell 102 can quickly detach from the bottom shell 101.
[0053] The positioning groove 1012 inside the bottom shell 101, combined with the spring 1013 and the positioning post 1026 of the top shell 102, provides cushioning during assembly through the elastic deformation of the spring 1013, avoiding hard contact that could damage the circuit board 2 or the interface. The positioning grooves 1012 distributed at the four corners and the positioning post 1026 form a multi-point fixation, ensuring the vertical alignment accuracy between the top shell 102 and the bottom shell 101, preventing poor sealing or interface misalignment caused by misalignment. The design of the sealing plate 1025 and the positioning post 1026 ensures that a sealed space is formed after the top shell 102 and the bottom shell 101 are closed, effectively preventing external contaminants such as dust and liquid from entering the receiving cavity 103 and extending the service life of the circuit board 2.
[0054] Please see Figures 5-6 A switching system based on automatic switching between RS485 and Wiegand dual protocols includes: a hardware module supporting RS485 communication interface and GPIO interface, wherein the RS485 interface is adapted to Civintec proprietary protocol and the GPIO interface is adapted to Wiegand protocol; the card reader is configured to simultaneously listen to the input data of RS485 interface and GPIO interface in idle mode, and automatically switch to the corresponding output interface for data transmission according to the received protocol type;
[0055] The system integrates both RS485 (supporting Civintec proprietary protocol) and GPIO (supporting Wiegand protocol) interfaces, enabling the card reader to adapt to both long-distance industrial communication and high real-time access control scenarios. This eliminates the need for additional equipment or manual configuration, significantly improving the device's versatility. For example, in a factory environment, the 900-meter stable communication capability of RS485 can be used to transmit sensor data, while in an access control system, the Wiegand protocol enables instant response to card swipe signals (delay ≤1ms), meeting diverse application needs.
[0056] In idle mode, the system simultaneously listens to dual protocol inputs and automatically activates the corresponding output interface according to the protocol type of the input signal (Civintec or Wiegand). This avoids the delay issues of manual switching or external control in traditional solutions. The automatic switching logic is directly responded to by the hardware module, reducing the software processing layers and ensuring the real-time performance and accuracy of data transmission. For example, the access control card swipe signal can trigger the unlocking command immediately.
[0057] The RS485 interface uses differential signal transmission, supports full-duplex / half-duplex modes, and is suitable for industrial environments with severe electromagnetic interference. The Wiegand interface responds directly to level changes through an interrupt reception mechanism, avoiding bus contention issues and ensuring real-time processing of high-priority tasks (such as emergency access control). After protocol switching, it automatically resets to an idle listening state to avoid interface occupancy conflicts and reduce the risk of system failure.
[0058] In this embodiment, the automatic switching logic includes: when the RS485 interface receives data conforming to the Civintec protocol format, the RS485 output mode is activated, and subsequent data is output through the RS485 interface; when the GPIO interface detects an input signal in the Wiegand protocol format, the Wiegand output mode is activated, and the GPIO interface is switched to output state to transmit data.
[0059] The automatic switching logic detects the protocol format of the input data (Civintec or Wiegand) in real time to ensure that the corresponding interface is activated only when the conditions are met, avoiding accidental triggering or protocol conflicts. For example, in industrial scenarios, the RS485 interface only responds to long-distance commands of the Civintec protocol, while in access control scenarios, the Wiegand interface only processes card swipe signals, achieving protocol isolation and precise adaptation. No manual intervention or external control is required during the switching process, and the user operation is completely imperceptible, improving the level of system automation.
[0060] The output interface is activated only when valid protocol data is detected, and remains in an idle listening state at other times to reduce unnecessary power consumption. By dynamically allocating hardware resources (such as the GPIO interface only switching to output state in Wiegand mode), redundant occupation of the interface is avoided, and hardware utilization is improved.
[0061] When RS485 output mode is enabled, the interface maintains full-duplex / half-duplex communication, supports data retransmission mechanism, ensures the integrity of long-distance transmission, and Wiegand output mode directly drives external devices (such as access controllers) through level pulses to avoid protocol parsing delay.
[0062] It supports seamless switching in mixed protocol environments. For example, in smart buildings, the same card reader can simultaneously process environmental sensor data using the RS485 protocol and access control card swipe signals using the Wiegand protocol, meeting the needs of multi-tasking in parallel. The switching logic is compatible with protocol extensions from different manufacturers, and only the protocol recognition rules need to be adjusted to adapt to new protocols (such as OSDP), without the need for hardware modification, thus reducing upgrade costs.
[0063] In this embodiment, after completing the data output of the current protocol, the card reader automatically resets the RS485 and GPIO interfaces to idle mode and re-enters the dual-interface input listening state. This automatic reset mechanism ensures that the card reader immediately resets the RS485 and GPIO interfaces to idle listening state after completing the current protocol data transmission, guaranteeing that the system is always in a "standby" state and can seamlessly respond to the next round of input signals. For example, in an access control system, after a card swipe operation is completed, the card reader can restore its dual-protocol listening capability within 200ms, avoiding delays in subsequent operations due to interface occupancy.
[0064] The interface is only activated during data transmission and automatically releases hardware resources upon completion (e.g., disabling the RS485 driver circuit or GPIO output status), reducing unnecessary power consumption. Real-world testing shows that compared to solutions that continuously occupy the interface, overall power consumption is reduced, making it particularly suitable for battery-powered or low-power scenarios.
[0065] A reset mechanism forces the interface to return to its initial state, avoiding interface conflicts caused by protocol switching remnants (such as simultaneous signal output from RS485 and Wiegand). For example, in industrial control scenarios, a reset operation can eliminate the risk of bus contention and ensure the stability of long-distance communication.
[0066] The reset logic is implemented using a hardware state machine, avoiding delays or errors that may be caused by software reset, improving system reliability, eliminating the need for manual intervention in the interface reset process, reducing operational complexity, and making it particularly suitable for distributed deployment scenarios (such as multi-node card readers in smart buildings). This mechanism adapts to different protocol extension requirements (such as adding the OSDP protocol), requiring only adjustment of reset timing parameters without modifying the hardware architecture, thus reducing upgrade costs.
[0067] In this embodiment, the RS485 interface supports long-distance communication up to 900 meters and uses differential signal transmission to improve anti-interference capability; the GPIO interface achieves instant response to data input through an interrupt receiving mechanism, with a response delay of no more than 1 millisecond.
[0068] The RS485 interface supports long-distance communication up to 900 meters and employs differential signal transmission technology to effectively suppress electromagnetic interference and signal attenuation. In industrial environments, large parks, and other scenarios, even with strong electromagnetic interference or complex wiring conditions, it can still maintain a low bit error rate, ensuring reliable transmission of equipment status data and sensor information.
[0069] The GPIO interface directly responds to input signals via an interrupt reception mechanism, with data latency strictly controlled to within 1 millisecond (compliant with ISO / IEC 14443 standard). This makes it suitable for scenarios with extremely high real-time requirements, such as access control systems and security equipment. For example, a card swipe signal can instantly trigger a door lock opening command, avoiding user waiting or operational delays.
[0070] The RS485 differential signal design cancels common-mode noise, and can resist the influence of strong interference sources such as industrial motors and frequency converters within a communication distance of 900 meters, thus improving the communication success rate; the interrupt mechanism of the GPIO interface avoids bus contention issues, ensuring the timely processing of high-priority tasks (such as emergency alarm signals), and significantly improving the system's fault tolerance.
[0071] Dual protocol capability enables the device to simultaneously cover the needs of long-distance communication (RS485) and short-distance high-speed response (Wiegand). For example, in smart buildings, RS485 transmits environmental monitoring data, while Wiegand handles access control card swiping, resulting in efficient resource allocation. The interrupt mechanism only activates the GPIO interface when data arrives, and the power consumption is close to zero when idle, extending the battery life of battery-powered devices.
[0072] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0073] The above description is only a preferred embodiment of the present utility model and does not limit the patent scope of the present utility model. All equivalent structural transformations made under the inventive concept of the present utility model using the contents of the present utility model specification and drawings, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present utility model.
Claims
1. A card reader device, characterized in that, include: Card reader and circuit board; The card reader consists of a bottom shell and a top shell, which are detachably connected to facilitate installation or removal. The bottom shell has a receiving cavity, and the circuit board is disposed in the receiving cavity; The top shell is provided with a screen, multiple buttons and a card swiping area. The multiple buttons are arranged at equal intervals, and the screen, multiple buttons and the card swiping area are connected to the circuit board.
2. The card reader device according to claim 1, characterized in that, The bottom shell has two embedding grooves on its top sides, and the top and sides of the embedding grooves are connected.
3. A card reader device according to claim 2, characterized in that, The bottom sides of the top shell are respectively provided with elastic fasteners, the fasteners are V-shaped and correspond to the embedded grooves.
4. A card reader device according to claim 1, characterized in that, The bottom shell is provided with at least four positioning grooves, which are respectively located at the corners of the bottom shell.
5. A card reader device according to claim 4, characterized in that, Springs are installed in the positioning grooves.
6. A card reader device according to claim 5, characterized in that, The bottom of the top shell is provided with a sealing plate, which corresponds to the receiving cavity. The bottom of the sealing plate is provided with at least four positioning posts, which are respectively located at the corners of the sealing plate, and the positioning posts correspond to the positioning grooves.
7. An automatic switching system based on RS485 and Wiegand dual protocols applied to the card reader device according to any one of claims 1-6, characterized in that, include: A hardware module that supports RS485 communication interface and GPIO interface, wherein the RS485 communication interface is adapted to Civintec proprietary protocol and the GPIO interface is adapted to Wiegand protocol; The card reader is configured to simultaneously listen to the input data of the RS485 communication interface and the GPIO interface in idle mode, and automatically switch to the corresponding output interface for data transmission according to the received protocol type.
8. The automatic switching system based on RS485 and Wiegand dual protocols according to claim 7, characterized in that, The automatic switching logic includes: When the RS485 communication interface receives data conforming to the Civintec protocol format, the RS485 output mode is activated, and subsequent data is output through the RS485 communication interface. When the GPIO interface detects an input signal in the Wiegand protocol format, it activates the Wiegand output mode and switches the GPIO interface to output mode to transmit data.
9. An automatic switching system based on RS485 and Wiegand dual protocols according to claim 8, characterized in that, After completing the data output of the current protocol, the card reader automatically resets the RS485 communication interface and GPIO interface to idle mode and re-enters the dual-interface input listening state.
10. The automatic switching system based on RS485 and Wiegand dual protocols according to claim 7, characterized in that, The RS485 communication interface supports long-distance communication up to 900 meters and uses differential signal transmission to improve anti-interference capability. The GPIO interface achieves instant response to data input through an interrupt receiving mechanism, with a response delay of no more than 1 millisecond.