A card reader for contact IC cards

By designing a double-sided card slot and interface chip, double-sided insertion compatibility of contact IC cards is achieved, solving the problems of single-sided card insertion and short circuits in metal materials in existing technologies, thus improving user convenience and system stability.

CN224536514UActive Publication Date: 2026-07-21SUNMI INTELLIGENT TECH (ZHEJIANG) CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
SUNMI INTELLIGENT TECH (ZHEJIANG) CO LTD
Filing Date
2025-09-04
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Most existing contact IC card readers can only accept cards from one side, and when a metal IC card is inserted, a short circuit can easily occur, making it impossible to read or write normally, which limits the application scenarios and market promotion.

Method used

Design a double-sided card holder and interface chip. By setting two rows of signal pins and a shared detection pin, combined with a spring-triggered detection mechanism, the contact IC card can be inserted on both sides. A chip select and electrical isolation mechanism is established between the main control chip and the interface chip to automatically switch the interface chip to avoid short circuits.

Benefits of technology

It achieves double-sided insertion compatibility of contact IC cards, improves user operation convenience and system fault tolerance, avoids the short circuit risk of metal IC cards, and ensures stable read and write operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224536514U_ABST
    Figure CN224536514U_ABST
Patent Text Reader

Abstract

The application provides a card reader for a contact IC card. The card reader comprises a master control chip, a double-sided card seat, a first interface chip and a second interface chip. The double-sided card seat comprises a set of shared detection pins, including a first detection pin and a second detection pin with different initial voltage levels. When an IC card is inserted into the card seat, the voltage level of the first detection pin is converted to be the same as that of the second detection pin. The interface chip confirms the insertion of the IC card based on the voltage level change of the first detection pin and informs the master control chip. When any interface chip fails to interact with the IC card, the master control chip switches another interface chip to interact with the IC card. The interface chip has an electrical isolation structure controlled by a chip selection, so that the input port of the interface chip not selected by the chip selection and the corresponding card end interface are in an electrical isolation state. The card reader supports double-sided card insertion and realizes reading and writing of various contact IC cards including metal materials, thereby reducing card reading failure caused by short circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of card reader technology, and more particularly to a card reader for contact IC cards. Background Technology

[0002] Currently, most contact IC card readers on the market only support single-sided card reading. Users must insert the metal contact side of the contact IC card in a specific orientation to achieve normal read and write operations. Even the few readers that support double-sided card insertion have circuit designs that directly output a 7816 interface signal from the main control chip and connect it to the front and back rows of pins in the card slot. This allows reading and writing when a plastic contact IC card is inserted, but when the contact IC card substrate is made of metal, it causes a short circuit between the two rows of pins, preventing normal operation of the card. Therefore, there is an urgent need for a contact IC card reader that is compatible with different materials and does not require distinguishing between the front and back of the card to solve the above problems. Summary of the Invention

[0003] In view of this, this application discloses a card reader for contact IC cards, which supports double-sided card insertion and achieves stable reading and writing of various contact IC cards, including those made of metal, while effectively avoiding card reading failures caused by short circuits.

[0004] The card reader includes a main control chip, at least two interface chips, and a double-sided card slot. The at least two interface chips include a first interface chip and a second interface chip. The double-sided card slot includes two rows of opposing signal pins and a set of shared detection pins. The set of shared detection pins includes a first detection pin and a second detection pin with different initial levels. When a contact IC card is inserted into the double-sided card slot, the level of the first detection pin changes to be the same as the level of the second detection pin. The first interface chip or the second interface chip confirms the insertion of the contact IC card based on the level change of the first detection pin and outputs a card insertion detection signal to the main control chip. The main control chip is connected to both the first interface chip and the second interface chip to switch to the other interface chip to interact with the contact IC card when the signal interaction between either interface chip and the contact IC card fails. Both the first interface chip and the second interface chip are provided with an electrical isolation structure controlled by chip select to ensure that the input port of the interface chip that is not chip selected is electrically isolated from the card interface in that interface chip.

[0005] Optionally, the initial level of the first detection pin is a first level, and the initial level of the second detection pin is a second level, with the first level being greater than the second level; when the contact IC card is inserted into the double-sided card slot, an electrical path is formed between the first detection pin and the second detection pin, so that the first detection pin switches from the first level to the second level.

[0006] Optionally, the first detection pin is connected to the power supply voltage through an impedance element so that the initial level of the first detection pin is a first level; the second detection pin is grounded so that the initial level of the second detection pin is a second level.

[0007] Optionally, the card reader for contact IC cards also includes a spring disposed inside the double-sided card holder; when the contact IC card is inserted into the double-sided card holder, the contact IC card abuts against the spring, causing the spring to move between the first detection pin and the second detection pin and connect to the first detection pin and the second detection pin respectively to form an electrical path.

[0008] Optionally, the main control chip includes a first GPIO interface, a second GPIO interface, a third GPIO interface, and a standardized IC communication interface. The first GPIO interface is connected to the chip select port of the first interface chip, and the second GPIO interface is connected to the chip select port of the second interface chip, enabling the main control chip to select either the first or second interface chip based on a card reading operation. The third GPIO interface is connected to the detection ports of both the first and second interface chips to receive card insertion detection signals. The standardized IC communication interface is connected to the input ports of both the first and second interface chips, and reads contact IC cards through the card-side interface of the corresponding interface chip when the corresponding interface chip is not in an electrically isolated state.

[0009] Optionally, the standardized IC communication interface is the 7816 interface.

[0010] Optionally, at least one of the at least two interface chips is powered on when the card reader is working.

[0011] Optionally, the first interface chip corresponds to the card reading path when the metal contacts of the contact IC card are inserted with the card inserted facing upwards.

[0012] Optionally, when the main control chip automatically selects the second interface chip to perform a card reading operation on the contact IC card, and the card reading operation also fails, the main control chip records the failure information and reports the error to the user. The error report includes controlling the card reader to generate an alarm and / or uploading the failure information to the server.

[0013] Alternatively, the substrate material of the contact IC card can be metal, plastic, or paper.

[0014] In summary, the card reader for contact IC cards disclosed in this application has at least the following beneficial effects:

[0015] (1) By setting two rows of signal pins and a common detection pin, combined with the spring-triggered detection mechanism, the contact IC card can be inserted into either side at will, which improves the user's operational convenience.

[0016] (2) By establishing a chip select mechanism between the main control chip and multiple interface chips, and automatically switching to another interface chip when card reading fails, reliable reading and writing of contact IC cards is ensured and the fault tolerance of the system is improved.

[0017] (3) By using the electrical isolation design of the interface chip when it is not selected, the risk of short circuit when a metal IC card is inserted is effectively prevented, thus making it compatible with contact IC cards of different materials such as metal, plastic, and paper.

[0018] (4) By setting up a GPIO interface and a standardized IC communication interface in the main control chip, the chip select control of the interface chip and the processing of the card insertion detection signal are realized. At the same time, the stability and performance of communication can be improved by using the 7816 interface. Attached Figure Description

[0019] The accompanying drawings used in the description of the embodiments of this application are briefly introduced below.

[0020] Figure 1 The diagram shows a circuit schematic of a contact IC card reader according to an embodiment of this application.

[0021] Figure 2 The diagram illustrates an operation flowchart of a contact IC card reader according to an embodiment of this application.

[0022] Figure 3 A schematic diagram of a contact IC card is shown. Detailed Implementation

[0023] To more clearly illustrate the technical solutions of the embodiments of this application, the specific implementation methods of this application will be described below with reference to the accompanying drawings. The accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without creative effort. Adjustments and improvements made without departing from the concept of this application are all within the protection scope of this application.

[0024] To keep the drawings simple, only the parts related to the corresponding embodiments are shown schematically in each figure, and they do not represent the actual structure of the product. In addition, to make the drawings simple and easy to understand, some parts with the same structure or function are only shown schematically in some figures, and there may actually be more or fewer parts with the same structure or function.

[0025] In this application, unless otherwise expressly specified and limited, ordinal numbers, such as "first," "second," etc., are used only to distinguish and describe related objects, and should not be construed as indicating or implying the relative importance or order between related objects; furthermore, they do not represent the quantity of related objects. "Multiple" includes two or more, and other quantifiers are similar. " / " is used to describe the relationship between related objects, indicating an "or" relationship between them. "And / or" is used to describe the relationship between related objects, including any combination relationship between them, such as "a and / or b" including: "a alone," "b alone," or "a and b." "One or more" or "at least one" of multiple objects refers to any object or any combination of multiple objects, such as "one or more of a1, a2, a3" or "at least one of a1, a2, a3" including: "a1 alone," "a2 alone," "a3 alone," "a1 and a2," "a1 and a3," "a2 and a3," or "a1, a2 and a3."

[0026] A contact IC card is a card with an embedded integrated circuit chip that stores, retrieves, and exchanges information by contacting the metal contacts of a card reader. Common types of contact IC cards include credit cards, bank cards, health insurance cards, access control cards, and transportation cards, widely used in financial payments, medical insurance, identity authentication, and public transportation. The card body of a contact IC card typically consists of a substrate and metal contacts covering it. The substrate material varies, with plastic being the most common, but metal and paper cards also exist. With the promotion of high-end customized cards and cards made of different materials, the use of metal and paper contact IC cards is gradually increasing in the market.

[0027] Users can read and write IC cards using contact IC card readers. Most existing contact IC card readers only support single-sided card insertion, requiring users to insert the card in the correct orientation (i.e., with the metal contacts facing the correct side) to complete the read / write operation. If the card is inserted incorrectly, not only will the reading fail, but it may also damage the contact IC card and the reader, causing inconvenience to the user. To improve ease of use, some existing IC card readers support double-sided card insertion. A typical design of these readers is to directly output a 7816 interface signal from the main control chip to the two rows of pins on the double-sided card slot, thus enabling electrical connection with the main control chip regardless of whether the card is inserted in the correct orientation.

[0028] However, this circuit design has significant limitations. When users use metal contact IC cards, the direct connection between the two rows of pins on the double-sided card slot can easily cause a short circuit, preventing the card from being properly recognized and read / written. This defect limits existing double-sided card readers to cards with non-metallic substrates, restricting the application scenarios and market promotion of such devices.

[0029] Therefore, in view of the shortcomings of the prior art, the core technical concept of this application is to provide a card reader for contact IC cards. This card reader can support double-sided card insertion and, through the chip select and electrical isolation mechanism of the interface chip, effectively avoid short circuit problems caused by metal cards, thereby being compatible with contact IC cards of various materials such as metal, plastic, and paper, and realizing stable read and write operations for IC cards of different materials.

[0030] The following description is in conjunction with the accompanying drawings.

[0031] Figure 1 This diagram illustrates a circuit schematic of a contact IC card reader according to an embodiment of this application. Please refer to... Figure 1 The card reader includes a main control chip (i.e., the MCU in the figure), at least two interface chips, and a double-sided card socket (i.e., the double-sided IC card socket in the figure). The at least two interface chips include a first interface chip (i.e., IC card interface chip 1 in the figure) and a second interface chip (i.e., IC card interface chip 2 in the figure). The double-sided card socket includes two rows of opposing signal pins (i.e., RST1, CLK1, IO1, and VCC1 and RST2, CLK2, IO2, and VCC2 in the figure) and a common set of detection pins. The common set of detection pins includes a first detection pin (i.e., SW2 in the figure) and a second detection pin (i.e., SW1 in the figure) with different initial levels. When contact... When an IC card is inserted into the double-sided card slot, the level of the first detection pin is converted to be the same as the level of the second detection pin. The first interface chip or the second interface chip confirms the insertion of the contact IC card based on the level change of the first detection pin and outputs a card insertion detection signal to the main control chip. The main control chip is connected to the first interface chip and the second interface chip respectively, and is used to switch to the other interface chip to interact with the contact IC card when the signal interaction between the two interface chips fails. Both the first interface chip and the second interface chip are provided with an electrical isolation structure controlled by chip select, so that the input port of the interface chip that is not chip selected is electrically isolated from the card end interface in the interface chip.

[0032] In the card reader provided in this application embodiment, the main control chip can be as follows: Figure 1The microcontroller unit (MCU) shown can also be other controllers with logic operation and peripheral control capabilities, such as digital signal processors (DSPs), system-on-a-chip (SoC) controllers, and application-specific integrated circuits (ASICs). This application's protection of the main control chip is not limited to MCUs; any controller capable of performing interface chip selection, signal detection, and data processing functions can be used as the main control chip in this application.

[0033] A card reader includes at least two interface chips, in Figure 1 The card reader consists of a first interface chip and a second interface chip. In some extended implementations, the card reader may also include a third and a fourth interface chip as redundancy, taking over the function of either the first or second interface chip in case of failure. For example, when the main control chip determines that the first interface chip has failed, it can schedule the third interface chip to replace it; when the main control chip determines that the second interface chip has failed, it can schedule the fourth interface chip to replace it. These redundant interface chips are structurally and functionally identical to the first and second interface chips, primarily serving as emergency backups. During normal operation, only the first and second interface chips need to be used. This improves the reliability and stability of the card reader.

[0034] The double-sided card slot includes two rows of oppositely arranged signal pins. Figure 1 In the specific example shown, these signal pins include a reset pin (RST), a clock pin (CLK), input / output pins (IO), and a power supply pin (VCC). The RST pin receives a reset signal from the interface chip to initialize the contact IC card. The CLK pin receives a clock signal from the interface chip, providing a timing reference for the contact IC card's operation. The IO pin serves as a data line, enabling data exchange between the contact IC card and the interface chip. The VCC pin provides power to the contact IC card. Through the coordination of these four types of signal pins, the normal power supply, timing, and data communication of the contact IC card can be achieved.

[0035] The double-sided card slot also includes a set of shared detection pins, namely a first detection pin and a second detection pin, and the two have different voltage levels in the initial state. Figure 1 In the circuit, the first detection pin SW2 is connected to the power supply voltage by default through a pull-up resistor, thus maintaining a high level; the second detection pin SW1 is grounded, therefore it is at a low level. When a contact IC card is inserted into the double-sided card slot, the level of the first detection pin switches to the same low level as the second detection pin. Except... Figure 1In addition to the structure shown, other detection mechanisms can be used to achieve level changes in some alternative embodiments. For example, a photoelectric switch can be used to detect card insertion and trigger a level toggling of the first detection pin; or a Hall sensor can be used to detect card insertion and control the first detection pin to conduct; or a micro switch can be used to detect card insertion and connect the first detection pin to the second detection pin. Regardless of the detection method used, as long as the level of the first detection pin changes from high to low, it can be determined that a card has been inserted.

[0036] Once any interface chip detects a change in the level of the first detection pin, it can confirm the insertion of the contact IC card and output a card insertion detection signal to the main control chip. Figure 1 In the embodiment shown, after the interface chip detects a level change through its PRSEN pin, it drives the INT pin of the chip to output an interrupt signal to the GPIO interface of the main control chip (the GPIO at the bottom in the figure) to realize the notification of the card insertion event.

[0037] The electrical connection between the input port of the interface chip and the card interface is controlled by a chip select signal. Electrical connection between the input port and the card interface occurs only when the interface chip is selected by the main control chip; otherwise, they are electrically isolated. For example, in the interface chip, at least one switching element (e.g., a semiconductor switching element such as a MOSFET) is provided between the input port and the card interface as an electrical isolation structure. The chip select signal serves as the control signal for the switching element (e.g., input to the gate of the MOSFET) to control the switching element's on and off states. Through this electrical isolation mechanism, even if the user inserts a metal contact IC card, if one side of the interface chip's pins short-circuits due to the metal substrate, the other side of the interface chip continues to operate normally, thus achieving stable card reading of metal cards. This feature ensures the reader's compatibility with cards of different materials (other materials such as plastic and paper can also be used with the reader of this application), avoiding the signal short-circuit problem present in the prior art.

[0038] Figure 2 This document illustrates an operation flowchart of a contact IC card reader according to an embodiment of this application. Please refer to... Figure 2 When the main control chip automatically selects the second interface chip to perform a card reading operation on the contact IC card, and the card reading operation also fails, the main control chip records the failure information and reports the error to the user. The error report includes controlling the card reader to generate an alarm and / or uploading the failure information to the server.

[0039] The entire operation process is as follows. First, the main control chip determines whether a contact IC card is inserted into the double-sided card slot. When a card is detected, the main control chip defaults to selecting the first interface chip, which then performs the card reading operation. If the card reading is successful, the current card reading operation ends; if the card reading fails, the main control chip disables the chip selection of the first interface chip and simultaneously enables the chip selection of the second interface chip, thus switching to the second interface chip to continue performing the card reading operation.

[0040] After the second interface chip is selected, the main control chip again determines whether the card reading was successful. If the card reading is successful, the current card reading operation ends; if the card reading fails, the main control chip records the failure information and sends an error message to the user. The error message may include: uploading the failure information to the server via the communication module, and / or controlling the card reader to generate an alarm, such as issuing an audible alert via a buzzer or a notification via an indicator light.

[0041] Therefore, the operation process of this application, through automatic switching of the interface chip, enables users to perform normal card reading operations regardless of whether the contact IC card is inserted correctly or incorrectly, avoiding the inconvenience of users having to identify the card insertion direction in existing technologies. Simultaneously, the error reporting mechanism when two card reading attempts fail effectively alerts the user to card abnormalities or incompatibilities, improving the system's intelligence and user experience.

[0042] like Figure 3 The diagram illustrates a contact IC card according to an embodiment of this application. The contact IC card includes metal contacts, a substrate, and an integrated circuit disposed within the substrate. It should be noted that the substrate material of the contact IC card in this application can be not only common plastic or paper materials, but also metal materials. Specifically, a metal substrate means that both sides of the IC card are made of metal, i.e., the entire substrate is made of metal.

[0043] In existing technologies, although some card readers can read contact IC cards with partial metal decorations or partial metal layers under certain conditions, when the IC card is made entirely of metal, the metal substrate can easily cause short circuits between signal pins, preventing normal reading and writing. This application addresses this by implementing a chip select and electrical isolation mechanism between the interface chip and the main control chip. This prevents signal short circuits even when the inserted contact IC card is entirely of metal, thus enabling stable reading and writing of all-metal contact IC cards. This differs from existing technologies that have limited support for metal cards.

[0044] In some embodiments of this application, the first interface chip corresponds to the card reading path when the contact IC card is inserted with the metal contacts facing upwards. The main control chip defaults to selecting the first interface chip for card reading operations. Thus, when a user inserts the IC card with the metal contacts facing upwards as is common practice, the card reading operation can be completed directly without switching interface chips. Since most users in the market have already developed the habit of inserting cards with the metal contacts facing upwards when using contact IC card readers, the above design can improve card reading efficiency and response speed, and enhance the user experience.

[0045] Through the above design, this application not only supports double-sided card reading and writing of common contact IC cards made of plastic and paper materials, but also achieves compatibility with all-metal contact IC cards. In existing technologies, because the two rows of signal pins of a double-sided card holder are often directly connected in parallel, short circuits can easily occur when an all-metal IC card is inserted, thus preventing read and write operations. This application, through chip select control and electrical isolation mechanisms of the interface chip, avoids the formation of an electrical path between the unselected interface chip and its card interface, thereby effectively solving the short circuit problem caused by the insertion of all-metal cards, enabling normal reading and writing even for contact IC cards with all-metal substrates.

[0046] Furthermore, by combining the structural design of the double-sided card slot with the automatic switching mechanism of the interface chip, this application ensures that users can complete normal card reading operations regardless of the orientation in which they insert the contact IC card. For users, there is no longer a need to distinguish the front and back of the card, improving ease of use; for the system, it can automatically switch to the backup interface chip to continue trying when card reading fails, thus significantly improving the success rate and reliability of card reading. Therefore, this application has significant advantages over existing technologies in terms of compatibility, ease of use, and system stability.

[0047] In some embodiments of this application, the initial level of the first detection pin is a first level, and the initial level of the second detection pin is a second level, where the first level is greater than the second level. When a contact IC card is inserted into the double-sided card slot, an electrical path is formed between the first and second detection pins, causing the first detection pin to switch from the first level to the second level. For example, the first detection pin is connected to the power supply voltage through an impedance element to make its initial level the first level; the second detection pin is grounded to make its initial level the second level. The first level can also be referred to as a high level, and the second level as a low level.

[0048] Please continue to refer to this. Figure 1 Impedance elements can be, for example, high-resistance resistors (such as...). Figure 1(The 10 kΩ resistor is shown in the diagram). When no IC card is inserted into the reader, the first detection pin remains high and the second detection pin remains low. When an IC card is inserted, the first and second detection pins form a path, connecting them. Since there is almost no impedance between them, the level of the first detection pin changes from high to low after connection. The PRSEN pin of either the first or second interface chip detects the level change of the first detection pin, thus confirming that an IC card has been inserted into the reader.

[0049] In some embodiments of this application, the card reader for contact IC cards further includes a spring (not shown in the figure) disposed inside the double-sided card holder; when the contact IC card is inserted into the double-sided card holder, the contact IC card abuts against the spring, causing the spring to move between the first detection pin and the second detection pin and connect to the first detection pin and the second detection pin respectively to form an electrical path.

[0050] In addition to achieving electrical connection between the first detection pin and the second detection pin through a spring contact structure, the card reader of this application can also use other detection methods to identify the card insertion status.

[0051] For example, card insertion can be detected by a photoelectric sensor; when a contact IC card is inserted into the double-sided card slot, the photoelectric sensor is blocked, triggering the circuit to flip the level of the first detection pin from high to low. Alternatively, card insertion can be detected by a Hall sensor; when a contact IC card enters the card slot, the magnetic element attached to the card triggers the Hall sensor, connecting the first and second detection pins. Yet another example is the detection of card insertion by a microswitch; when a contact IC card is inserted into the card slot, it pushes the microswitch contacts to close, thus forming an electrical path between the first and second detection pins.

[0052] Regardless of the detection method used, as long as the level of the first detection pin can be changed from high to low when the contact IC card is inserted, it can be detected by the interface chip, thus confirming the insertion of the contact IC card. After detecting the level change, the interface chip outputs an interrupt signal to the GPIO interface of the main control chip through its INT pin, ensuring that the main control chip can be notified of the card insertion event immediately.

[0053] Through the above design, this application can be compatible with a variety of card insertion detection schemes, which not only improves the flexibility and scalability of the detection method, but also allows for the selection of appropriate detection methods according to the design requirements and cost requirements of different products in practical applications, thereby enhancing the adaptability and productization capability of the card reader.

[0054] In some embodiments of this application, at least one of the at least two interface chips is powered on when the card reader is working.

[0055] This allows for timely recognition of contact IC cards inserted into the double-sided card slot. For example, both the first and second interface chips can be powered on simultaneously, enabling immediate card insertion detection regardless of the insertion orientation. However, in most applications, only one interface chip needs to be powered on for detection; the other chip is powered on and participates in the card reading operation only when needed, controlled by the main control chip. This approach not only ensures proper card insertion recognition but also reduces overall system power consumption and improves the reader's energy efficiency.

[0056] Furthermore, in some preferred embodiments, the interface chip that is powered on by default is the first interface chip, and this interface chip corresponds to the card reading path when the contact IC card is inserted with the metal contacts facing upwards. Since users are generally accustomed to inserting contact IC cards with the metal contacts facing upwards, powering on the interface chip by default and selecting this interface chip can directly complete the card reading operation in most cases without switching interface chips, thereby improving the system's response efficiency and user experience.

[0057] Please refer to some embodiments of this application. Figure 1 The main control chip includes a first GPIO interface (the GPIO interface at the top of the diagram), a second GPIO interface (the GPIO interface in the middle of the diagram), a third GPIO interface (the GPIO interface at the bottom of the diagram), and a standardized IC communication interface. The first GPIO interface is connected to the chip select port of the first interface chip, and the second GPIO interface is connected to the chip select port of the second interface chip, allowing the main control chip to select either the first or second interface chip based on a card reading operation. The third GPIO interface is connected to the detection ports of both the first and second interface chips to receive card insertion detection signals. The standardized IC communication interface is connected to the input ports of both the first and second interface chips, and reads contact IC cards through the card-side interface of the corresponding interface chip when they are not electrically isolated. For example, the standardized IC communication interface is a 7816 interface.

[0058] It should be noted that the main control chip typically only has one 7816 interface. Therefore, the input ports of both the first and second interface chips must be connected to this single 7816 interface. In this architecture, the chip select pin of the interface chip plays a crucial role, controlling the connection between the card-side interface and the input port to achieve electrical isolation. When the main control chip selects the first interface chip, its input port is connected to its card-side interface, allowing it to read and write the inserted contact IC card, while the second interface chip remains electrically isolated. If the first interface chip fails to read the card, for example, if the user inserts a metal contact IC card with the metal side facing the first interface chip, causing a short circuit between its signal ports, the main control chip can disable the chip select of the first interface chip and switch the chip select signal to the second interface chip. During this process, the input port of the first interface chip remains isolated from its card-side interface. Even if a short circuit occurs, it will not affect the normal operation of the 7816 input port, thus ensuring that the second interface chip can still complete normal reading and writing of the contact IC card.

[0059] Therefore, by using a unified 7816 interface between the first and second interface chips, and employing chip select pins for electrical isolation, this application effectively avoids short-circuit problems caused by metal contact IC cards, improving system compatibility and security. Simultaneously, leveraging the control logic of the GPIO interface, the main control chip can flexibly implement chip select switching and card insertion detection, further enhancing the system's fault tolerance and card reading success rate. In contrast, while using GPIO to simulate the 7816 interface can theoretically achieve IC card communication, it presents significant challenges in terms of protocol timing and stability, and requires additional software implementation, which is detrimental to system performance and reliability. Therefore, using a main control chip with a standard 7816 interface is a superior choice and aligns with the implementation methods of mainstream IC card readers on the market.

[0060] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not described in detail or in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Furthermore, the above embodiments can be freely combined as needed.

Claims

1. A card reader for contact IC cards, characterized in that, It includes a main control chip, at least two interface chips, and a double-sided card slot, wherein the at least two interface chips include a first interface chip and a second interface chip; The double-sided card slot includes two rows of oppositely arranged signal pins and a set of shared detection pins. The set of shared detection pins includes a first detection pin and a second detection pin with different initial levels. When the contact IC card is inserted into the double-sided card slot, the level of the first detection pin is converted to be the same as the level of the second detection pin. The first interface chip or the second interface chip confirms the insertion of the contact IC card based on the level change of the first detection pin and outputs a card insertion detection signal to the main control chip. Furthermore, the main control chip is connected to the first interface chip and the second interface chip respectively, and is used to switch to the other interface chip to perform signal interaction with the contact IC card when the signal interaction between the interface chip and the contact IC card fails. Both the first interface chip and the second interface chip are provided with an electrical isolation structure controlled by chip select, so that the input port in the interface chip that is not chip selected is electrically isolated from the card end interface in the interface chip.

2. The card reader for contact IC cards according to claim 1, characterized in that, The initial level of the first detection pin is a first level, and the initial level of the second detection pin is a second level, wherein the first level is greater than the second level; When the contact IC card is inserted into the double-sided card slot, an electrical path is formed between the first detection pin and the second detection pin, so that the first detection pin switches from the first level to the second level.

3. The card reader for contact IC cards according to claim 2, characterized in that, The first detection pin is connected to the power supply voltage through an impedance element so that the initial level of the first detection pin is the first level; The second detection pin is grounded so that the initial level of the second detection pin is the second level.

4. The card reader for contact IC cards according to claim 2, characterized in that, It also includes a spring clip disposed inside the double-sided card holder; When the contact IC card is inserted into the double-sided card slot, the contact IC card abuts against the spring, causing the spring to move between the first detection pin and the second detection pin and connect to the first detection pin and the second detection pin respectively, so as to form the electrical path.

5. The card reader for contact IC cards according to claim 1, characterized in that, The main control chip includes a first GPIO interface, a second GPIO interface, a third GPIO interface, and a standardized IC communication interface; The first GPIO interface is connected to the chip select port of the first interface chip, and the second GPIO interface is connected to the chip select port of the second interface chip, so that the main control chip can select the first interface chip or the second interface chip based on the card reading operation. The third GPIO interface is connected to the detection ports of the first interface chip and the second interface chip respectively to receive the card insertion detection signal. The standardized IC communication interface is connected to the input ports of the first interface chip and the second interface chip respectively, and reads the contact IC card through the card end interface in the corresponding interface chip when the corresponding interface chip is not in an electrically isolated state.

6. The card reader for contact IC cards according to claim 5, characterized in that, The standardized IC communication interface is the 7816 interface.

7. The card reader for contact IC cards according to claim 1, characterized in that, At least one of the at least two interface chips is powered on when the card reader is working.

8. The card reader for contact IC cards according to claim 1, characterized in that, The first interface chip corresponds to the card reading path when the metal contacts of the contact IC card are inserted with the metal contacts facing upwards.

9. The card reader for contact IC cards according to claim 1, characterized in that, When the main control chip automatically selects the second interface chip to perform a card reading operation on the contact IC card, and the card reading operation also fails, the main control chip records the failure information and reports an error to the user. The error report includes controlling the card reader to generate an alarm and / or uploading the failure information to the server.

10. A card reader for contact IC cards according to any one of claims 1-9, characterized in that, The substrate material of the contact IC card is metal, plastic, or paper.