Terminal equipment and power supply voltage output method

By integrating the MCU, power module and level conversion module, automatic identification of the smart card operating voltage and signal level matching are achieved, solving the problems of rising hardware costs and security, and improving the market competitiveness and reliability of terminal equipment.

CN120654722APending Publication Date: 2025-09-16SHANGHAI QINYUN ELECTRONIC TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510796062.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing terminal devices require an additional external crystal oscillator when reading and writing smart cards, which increases hardware costs, affects market competitiveness, and poses security and stability risks.

Method used

It uses an integrated MCU, power module and level conversion module. The power module automatically identifies and adjusts the smart card operating voltage, and the level conversion module ensures signal level matching, reducing dependence on external components.

Benefits of technology

It reduces production costs, improves the accuracy and reliability of smart card reading and writing, enhances system stability and security, and prevents data leakage and card damage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120654722A_ABST
    Figure CN120654722A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of terminal equipment, and discloses terminal equipment and a power supply voltage output method, which realize automatic identification and adaptation of the working voltage of an intelligent card by integrating an MCU (Microprogrammed Control Unit), a power supply module and a level conversion module, effectively solve the problem that the hardware cost is increased due to the arrangement of a decryption chip and a plug-in crystal oscillator in the prior art, and improve the reliability of the intelligent card. Required working voltage can be flexibly provided for intelligent cards with different voltage specifications, and communication signal level matching between the MCU and the intelligent cards is ensured through the level conversion module, so that the reading and writing accuracy and reliability are improved. In addition, according to the scheme, the circuit design is simplified, the production cost is reduced, and the market competitiveness of the terminal equipment is enhanced. Meanwhile, by reducing dependence on external components, stability and safety of the system are improved, safety risks such as data leakage, card damage or hostile attack caused by abnormal power supply can be prevented, and continuous and reliable work of the intelligent card under various environmental conditions is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of terminal equipment, and in particular to a terminal equipment and a power supply voltage output method. Background Art

[0002] In the practical application of smart cards, such as IC cards, their power supply must meet strict security and stability requirements. Security requirements aim to prevent security risks such as data leakage, card damage, or malicious attacks caused by power supply anomalies. Stability requirements ensure that smart cards can operate continuously and reliably under various environmental conditions, avoiding read and write errors or card malfunctions caused by voltage fluctuations and other issues.

[0003] Currently, mainstream smart cards on the market have three different operating voltage specifications: 5V, 3V, and 1.8V. Smart cards with different operating voltages are suitable for different application scenarios and device requirements, providing diverse options for various smart card applications.

[0004] Existing terminal devices, such as financial POS terminals, rely on dedicated internal IC card decryption chips to read and write IC cards. These chips come in a variety of types, with common ones including the MH1235H and CA730. While these chips may differ in performance, functionality, and compatibility, their core function is to facilitate data communication and instruction parsing between the terminal device and the IC card.

[0005] Specifically, the MCU main control 100 in the terminal device accurately provides the required operating voltage for the IC card 300 through the IC card decryption chip 200. After providing the appropriate operating voltage, the MCU main control 100 also completes the data read and write operations on the IC card 300 through the IC card decryption chip 200, ensuring that the information in the IC card 300 can be read or written accurately. Figure 1 shown.

[0006] However, this existing technical solution has a significant drawback. In addition to the decryption chip itself, it also requires an external crystal oscillator, which increases hardware costs. This higher cost not only increases the manufacturing cost of the terminal device but may also affect the product's market competitiveness to a certain extent.

[0007] Therefore, there is a need to improve the existing technology.

[0008] The above information is presented as background information only to assist with an understanding of the present disclosure and is not a determination or admission that any of the above may be applicable as prior art with respect to the present disclosure. Summary of the Invention

[0009] The present invention provides a terminal device and a power supply voltage output method to solve the problems existing in the prior art.

[0010] To achieve the above object, the present invention provides the following technical solutions:

[0011] In a first aspect, the present invention provides a terminal device for reading and writing a smart card, comprising an MCU, a power module and a level conversion module; wherein,

[0012] One end of the power module is connected to the MCU, and the other end is connected to the smart card, and is used to output different voltages to the smart card in ascending order under the control of the MCU until the output voltage reaches the operating voltage of the smart card, thereby establishing a communication connection between the MCU and the smart card;

[0013] One end of the level conversion module is connected to the MCU, and the other end is connected to the smart card, and is used to achieve level matching of signals when communicating between the MCU and the smart card under the control of the MCU.

[0014] Furthermore, in the terminal device, the power module includes a power supply, a power circuit, a first MOS transistor control circuit, and a second MOS transistor control circuit;

[0015] One end of the power circuit is connected to the power supply, and the other end is connected to the smart card, for outputting voltage to the smart card;

[0016] One end of the first MOS transistor control circuit is connected to the MCU, and the other end is connected to the power circuit, and is used to be turned on or off under the control of the MCU to adjust the output voltage of the power circuit;

[0017] One end of the second MOS tube control circuit is connected to the MCU, and the other end is connected to the power circuit, and is used to be turned on or off under the control of the MCU to coordinately adjust the output voltage of the power circuit.

[0018] Furthermore, in the terminal device, the power supply circuit includes a power supply chip U1, a first inductor L1, a first resistor R1, a second resistor R2, a first capacitor C1, a second capacitor C2, a third capacitor C3 and a fourth capacitor C4;

[0019] The VIN pin of the power chip U1 is connected to the power supply, the GND pin of the power chip U1 is grounded, the SW pin of the power chip U1 is connected in series with the first inductor L1 and then serves as an output pin connected to the smart card, and the FB pin of the power chip U1 is connected to the first MOS transistor control circuit and the second MOS transistor control circuit respectively;

[0020] One end of the first resistor R1 is connected between the first inductor L1 and the smart card, and the other end is connected to the FB pin of the power chip U1;

[0021] One end of the second resistor R2 is connected to the FB pin of the power chip U1, and the other end is grounded;

[0022] The first capacitor C1 is connected between the SW pin and the BST pin of the power chip U1;

[0023] One end of the second capacitor C2 is connected between the first inductor L1 and the smart card, and the other end is connected to the FB pin of the power chip U1;

[0024] One end of the third capacitor C3 is connected between the first inductor L1 and the smart card, and the other end is grounded;

[0025] One end of the fourth capacitor C4 is connected to the VIN pin of the power chip U1, and the other end is grounded;

[0026] The EN pin of the power chip U1 is connected between the fourth capacitor C4 and the VIN pin of the power chip U1 .

[0027] Furthermore, in the terminal device, the resistance of the first resistor R1 is 100kohm;

[0028] The resistance of the second resistor R2 is 50kohm.

[0029] Furthermore, in the terminal device, the first MOS transistor control circuit includes a first MOS transistor Q1, a third resistor R3 and a fifth resistor R5;

[0030] The S electrode of the first MOS transistor Q1 is grounded, the D electrode of the first MOS transistor Q1 is connected in series with the third resistor R3 and then connected to the FB pin of the power chip U1, and the G electrode of the first MOS transistor Q1 is connected to the MCU as a 3V_EN enable pin;

[0031] The fifth resistor R5 is connected between the S electrode and the G electrode of the first MOS transistor Q1.

[0032] Furthermore, in the terminal device, the resistance of the third resistor R3 is 50kohm.

[0033] Furthermore, in the terminal device, the second MOS transistor control circuit includes a second MOS transistor Q2, a fourth resistor R4 and a sixth resistor R6;

[0034] The S electrode of the second MOS transistor Q2 is grounded, the D electrode of the second MOS transistor Q2 is connected in series with the fourth resistor R4 and then connected to the FB pin of the power chip U1, and the G electrode of the second MOS transistor Q2 is connected to the MCU as a 5V_EN enable pin;

[0035] The sixth resistor R6 is connected between the S electrode and the G electrode of the second MOS transistor Q2.

[0036] Furthermore, in the terminal device, the resistance of the fourth resistor R4 is 18.7 kohm.

[0037] In a second aspect, the present invention provides a method for outputting a power supply voltage, which is applied to the terminal device provided in the first aspect above, and the method includes:

[0038] S10, the MCU controls the power module to output a voltage to the smart card;

[0039] S20, the MCU detects whether the output voltage is the operating voltage of the smart card each time the power module outputs a voltage; if so, execute step S30; if not, execute step S40;

[0040] S30, the MCU supplies power to the smart card at a fixed operating voltage of the smart card to establish a communication connection between the MCU and the smart card;

[0041] S40: The MCU controls the power module to output a voltage higher than the previous output voltage to the smart card, and returns to execute S20 until the voltage output by the power module reaches the operating voltage of the smart card.

[0042] Furthermore, in the power supply voltage output method, the step S20 includes:

[0043] S21, the MCU activates the RST line each time the power module outputs voltage, and detects whether the RST line is pulled low; if so, execute step S22, if not, execute step S23;

[0044] S22. Determine that the voltage output by the power module is the operating voltage of the smart card;

[0045] S23: Determine that the voltage output by the power module is not the operating voltage of the smart card.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] The present invention provides a terminal device and a power supply voltage output method, which realize automatic identification and adaptation of the operating voltage of the smart card by integrating an MCU, a power module and a level conversion module, and effectively solves the problem of increased hardware costs caused by the provision of a decryption chip and an external crystal oscillator in the prior art. The terminal device can flexibly provide the required operating voltage for smart cards of different voltage specifications, and ensure the matching of the communication signal levels between the MCU and the smart card through the level conversion module, thereby improving the accuracy and reliability of smart card reading and writing. In addition, the solution simplifies circuit design, reduces production costs, and enhances the market competitiveness of the terminal device. At the same time, by reducing dependence on external components, the stability and security of the system are improved, which helps to prevent security risks such as data leakage, card damage or malicious attacks caused by power supply anomalies, and ensures the continuous and reliable operation of the smart card under various environmental conditions.

[0048] The present invention has other features and advantages that will be apparent from or will be described in detail in the accompanying drawings and the following detailed description incorporated herein, which together serve to explain certain principles of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0050] Figure 1 This is a schematic diagram of the functional modules of a terminal device in the prior art;

[0051] Figure 2 This is a schematic diagram of functional modules of a terminal device provided in the first embodiment of the present invention;

[0052] Figure 3 This is a functional module diagram of a power supply module provided in Embodiment 1 of the present invention;

[0053] Figure 4 1 is a schematic diagram of the circuit principle of the power supply circuit provided in the first embodiment of the present invention;

[0054] Figure 5 This is a schematic diagram of the circuit principle of the first MOS transistor control circuit provided in the first embodiment of the present invention;

[0055] Figure 6 1 is a schematic diagram of the circuit principle of the second MOS transistor control circuit provided in the first embodiment of the present invention;

[0056] Figure 7 This is a flow chart of a method for outputting a power supply voltage provided in the second embodiment of the present invention.

[0057] Reference numerals:

[0058] MCU main control 100, IC card decryption chip 200, IC card 300;

[0059] MCU 1, power module 2, level conversion module 3, smart card 4;

[0060] Power supply 21 , power supply circuit 22 , first MOS transistor control circuit 23 , second MOS transistor control circuit 24 . DETAILED DESCRIPTION

[0061] In order to explain in detail the possible application scenarios, technical principles, specific solutions that can be implemented, and the purpose and effects of this application, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of this application and are therefore only examples and are not intended to limit the scope of protection of this application.

[0062] References to "embodiments" herein mean that the specific features, structures, or characteristics described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the word "embodiment" in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or relevance to other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the various technical features mentioned in the embodiments can be combined in any manner to form a corresponding implementable technical solution.

[0063] Unless otherwise defined, the technical terms used herein have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms herein is only for describing specific embodiments and is not intended to limit this application.

[0064] In the description of this application, the term "and / or" is used to describe a logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and both A and B exist. In addition, the character " / " in this document generally indicates that the objects before and after are in a logical "or" relationship.

[0065] In this application, terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual quantity, priority or sequence relationship between these entities or operations.

[0066] Without further limitations, in this application, the words "include", "comprise", "have" or other similar expressions used in the sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those defined elements, but also other elements not explicitly listed, or elements inherent to such process, method or product.

[0067] In this application, expressions such as "greater than," "less than," and "exceed" are understood to exclude the number itself; expressions such as "above," "below," and "within" are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times," unless otherwise specifically limited.

[0068] In the description of the embodiments of the present application, the space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, it should not be understood as a limitation on the embodiments of the present application.

[0069] Unless otherwise expressly specified or limited, in the description of the embodiments of the present application, the terms "installed", "connected", "connected", "fixed", "set", etc. used should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integrated setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For those skilled in the art of the present application, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0070] Example 1

[0071] Please refer to Figure 2 The embodiment of the present invention provides a terminal device for reading and writing a smart card 4 (such as an IC card, a PSAM card, a SIM card, etc.), comprising an MCU 1, a power module 2 and a level conversion module 3; wherein,

[0072] The power module 2 plays a crucial role in the entire terminal device. One end is tightly connected to the MCU 1, and the other end is directly connected to the smart card 4. Under the precise control of the MCU 1, the power module 2 has the ability to adjust the output voltage, outputting different voltages to the smart card 4 in ascending order. This process is a gradual trial and error process. The power module 2 continuously adjusts the output voltage until the output voltage exactly matches the operating voltage required by the smart card 4. Once the smart card 4 receives a power supply that matches its operating voltage, the communication connection between the MCU 1 and the smart card 4 is successfully established, laying the foundation for subsequent communication, namely data reading and writing operations. This function of automatically identifying and adapting to the operating voltage of the smart card 4 greatly improves the versatility and flexibility of the terminal device, enabling it to adapt to a variety of smart cards 4 with different voltage specifications.

[0073] The level conversion module 3 is also an indispensable key component of the terminal device, with one end connected to the MCU 1 and the other end connected to the smart card 4. Under the control of the MCU 1, the level conversion module 3 undertakes the important task of achieving signal level matching during communication between the MCU 1 and the smart card 4. Because the MCU 1 and the smart card 4 may use different level standards for signal transmission, if level conversion is not performed, it may cause signal transmission errors or improper recognition. Through precise circuit design and signal processing technology, the level conversion module 3 can monitor and adjust the level of the communication signal in real time, ensuring that the signal emitted by the MCU 1 can be accurately received by the smart card 4, and the signal fed back by the smart card 4 can also be correctly interpreted by the MCU 1. This function effectively guarantees the accuracy and reliability of communication between the MCU 1 and the smart card 4, avoiding data reading and writing errors caused by level mismatch.

[0074] In summary, the terminal device proposed in the embodiment of the present invention achieves automatic identification and flexible adaptation to the operating voltage of the smart card 4 by highly integrating the MCU 1, power module 2, and level conversion module 3. This innovative design effectively solves a prominent problem existing in the prior art. In the prior art, in order to realize the read and write functions of the smart card, a dedicated decryption chip and an external crystal oscillator are usually required, which not only increases the complexity of the hardware circuit but also leads to a significant increase in hardware costs. The terminal device of the embodiment of the present invention cleverly avoids this drawback. Without the need for an additional decryption chip and an external crystal oscillator, the read and write functions of the smart card 4 are realized through the integration of three relatively low-cost modules.

[0075] The advantages of this terminal device lie not only in cost savings but also in its superior performance. It automatically adjusts the output voltage according to the voltage specifications of smart cards 4, providing a precise and stable operating power supply for the smart cards 4. Furthermore, the precise matching of the level conversion module 3 ensures high-quality transmission of communication signals between the MCU 1 and the smart card 4, significantly improving the accuracy and reliability of reading and writing to the smart card 4. Furthermore, this integrated design significantly simplifies the circuit structure, reducing the number of components and wiring complexity, thereby effectively lowering production costs and enhancing the terminal device's market competitiveness.

[0076] More importantly, this solution significantly improves the stability and security of the system by reducing reliance on external components. In the prior art, the addition of external components often introduces more potential failure points, increasing the risk of system anomalies. However, the terminal device of the embodiment of the present invention reduces the use of external components, reduces the probability of system failure due to external factors, and helps prevent security risks such as data leakage, card damage, or malicious attacks caused by power supply anomalies. Whether in normal use environment or complex harsh environment, this terminal device can ensure that the smart card 4 works continuously and reliably, providing strong technical support for the widespread application of smart card technology.

[0077] Please refer to Figure 3 In one implementation of this embodiment, the power module 2 is composed of multiple key components, including a power supply 21, a power circuit 22, a first MOS tube control circuit 23 and a second MOS tube control circuit 24.

[0078] The power circuit 22 is designed as the core component of the power module 2 and is responsible for providing the required voltage to the smart card 4. One end of the power circuit 22 is connected to the power source 21 to receive power input; the other end is connected to the smart card 4 to output the appropriate voltage to the smart card 4. This design ensures that the power circuit 22 can establish a stable voltage transmission path between the power source 21 and the smart card 4.

[0079] The first MOS transistor control circuit 23 and the second MOS transistor control circuit 24 play a crucial role in the power module 2. One end of each of these control circuits is connected to the MCU 1, and the other end is connected to the power circuit 22. Under the precise control of the MCU 1, the first MOS transistor control circuit 23 and the second MOS transistor control circuit 24 can be turned on or off as needed, thereby adjusting the output voltage of the power circuit 22. This adjustment mechanism allows the power module 2 to flexibly adapt to the operating voltage requirements of different smart cards 4.

[0080] Specifically, the coordinated operation of the first MOS transistor control circuit 23 and the second MOS transistor control circuit 24 enables the power module 2 to precisely control the output voltage of the power circuit 22. Through control signals from the MCU 1, these two MOS transistor control circuits accurately adjust the output voltage of the power circuit 22 to match the operating voltage required by the smart card 4. This design not only improves the adaptability and flexibility of the power module 2 but also ensures that the smart card 4 can operate stably at the optimal operating voltage.

[0081] In summary, the design of the power module 2 in this embodiment, by integrating the power supply 21, power circuit 22, first MOS transistor control circuit 23, and second MOS transistor control circuit 24, achieves automatic adaptation and precise control of the operating voltage of the smart card 4. This design not only improves the performance and reliability of the terminal device but also reduces the complexity and cost of the overall system by reducing reliance on external components. Therefore, this embodiment provides an efficient, reliable, and cost-effective smart card power supply solution.

[0082] Please refer to Figure 4 In one implementation of this embodiment, the power circuit 22 includes a power chip U1, a first inductor L1, a first resistor R1, a second resistor R2, a first capacitor C1, a second capacitor C2, a third capacitor C3 and a fourth capacitor C4;

[0083] The power chip U1 serves as the core component of the power circuit 22. Its VIN pin is connected to the power supply 21 to receive input from the power supply 21; its GND pin is grounded, forming the circuit's reference point. The SW pin of the power chip U1, connected in series with the first inductor L1, serves as an output pin connected to the smart card 4, providing the required voltage to the smart card 4. The FB pin of the power chip U1 is connected to the first MOS transistor control circuit 23 and the second MOS transistor control circuit 24, respectively, to receive control signals from the MCU 1, enabling precise control of the output voltage of the power circuit 22.

[0084] One end of the first resistor R1 is connected between the first inductor L1 and the smart card 4, and the other end is connected to the FB pin of the power chip U1, used to set the output voltage of the power chip U1. One end of the second resistor R2 is connected to the FB pin of the power chip U1, and the other end is grounded, used to provide a feedback signal to help the power chip U1 stabilize the output voltage.

[0085] The first capacitor C1 is connected between the SW and BST pins of the power chip U1 to stabilize the switch node voltage of the power chip U1 and reduce voltage fluctuations. One end of the second capacitor C2 is connected between the first inductor L1 and the smart card 4, and the other end is connected to the FB pin of the power chip U1 to further stabilize the output voltage. One end of the third capacitor C3 is connected between the first inductor L1 and the smart card 4, and the other end is grounded to filter out high-frequency noise in the output voltage. One end of the fourth capacitor C4 is connected to the VIN pin of the power chip U1, and the other end is grounded to filter out low-frequency noise in the input power supply.

[0086] The EN pin of the power chip U1 is connected between the fourth capacitor C4 and the VIN pin of the power chip U1 to control the enable state of the power chip U1. When the EN pin receives a valid enable signal, the power chip U1 starts working and provides a stable voltage output to the smart card 4.

[0087] In summary, the design of the power supply circuit 22 in this embodiment achieves precise control and stable output of the operating voltage of the smart card 4 by carefully selecting and laying out key electronic components such as the power supply chip U1, the first inductor L1, the first resistor R1, the second resistor R2, the first capacitor C1, the second capacitor C2, the third capacitor C3 and the fourth capacitor C4.

[0088] Please refer to Figure 5 In one implementation of this embodiment, the first MOS transistor control circuit 23 includes a first MOS transistor Q1, a third resistor R3 and a fifth resistor R5;

[0089] The first MOS transistor Q1 plays a crucial role in this circuit. Its source (S) is directly grounded to provide a stable reference potential. Its drain (D) is connected in series with a third resistor, R3, to the feedback pin (FB) of power chip U1. This design regulates the output voltage of power chip U1 by controlling the conduction state of the first MOS transistor Q1. The gate (G) of the first MOS transistor Q1 serves as the 3V_EN enable pin, connected to MCU 1 and receiving control signals from MCU 1 for precise control of the first MOS transistor Q1.

[0090] The fifth resistor R5 in this circuit connects the source (S) and gate (G) of the first MOS transistor Q1, forming a pull-down circuit. This configuration ensures that when there is no control signal from MCU 1, the gate voltage of the first MOS transistor Q1 is pulled down to ground potential, thereby keeping the MOS transistor in the off state and preventing the output voltage of the power chip U1 from being accidentally changed.

[0091] Through this carefully designed circuit configuration, the first MOS transistor control circuit 23 can accurately adjust the output voltage of the power chip U1 according to the control signal of the MCU 1 to meet the operating voltage requirements of the smart card 4. This design not only improves the adaptability and flexibility of the power module 2, but also ensures that the smart card 4 can operate stably at the optimal operating voltage, thereby improving the performance and reliability of the terminal device.

[0092] In summary, the design of the first MOS transistor control circuit 23 in this embodiment realizes automatic adaptation and precise control of the operating voltage of the smart card 4 by integrating the first MOS transistor Q1 , the third resistor R3 and the fifth resistor R5 .

[0093] Please refer to Figure 6 In one implementation of this embodiment, the second MOS transistor control circuit 24 includes a second MOS transistor Q2, a fourth resistor R4 and a sixth resistor R6;

[0094] In this circuit design, the second MOS transistor Q2 plays a crucial role. Its source (S) is directly grounded, providing a stable zero-potential reference point for the circuit. The drain (D) of the second MOS transistor Q2 is connected in series with the fourth resistor R4 and then to the feedback pin (FB) of the power supply chip U1. This configuration allows the output voltage of the power supply chip U1 to be adjusted by controlling the conduction and cutoff of the second MOS transistor Q2, thereby meeting the different operating voltage requirements of the smart card 4. The gate (G) of the second MOS transistor Q2 serves as the 5V_EN enable pin, connected to the MCU 1 to receive control signals from the MCU 1, enabling precise control of the second MOS transistor Q2.

[0095] The sixth resistor R6 in this circuit connects the source (S) and gate (G) of the second MOS transistor Q2, forming a pull-down circuit. This configuration ensures that when no control signal is received from MCU 1, the gate voltage of the second MOS transistor Q2 is pulled down to ground potential, thereby keeping the MOS transistor in the off state and preventing unexpected interference with the output voltage of the power chip U1.

[0096] Through this carefully designed circuit configuration, the second MOS transistor control circuit 24 can accurately adjust the output voltage of the power chip U1 according to the control signal of the MCU 1 to meet the operating voltage requirements of the smart card 4. This design not only improves the adaptability and flexibility of the power module 2, but also ensures that the smart card 4 can operate stably at the optimal operating voltage, thereby improving the performance and reliability of the terminal device.

[0097] In summary, the design of the second MOS transistor control circuit 24 in this embodiment realizes automatic adaptation and precise control of the operating voltage of the smart card 4 by integrating the second MOS transistor Q2 , the fourth resistor R4 and the sixth resistor R6 .

[0098] Taking the voltage specifications of the smart card 4 as 5V, 3.3V, and 1.8V as an example, in this embodiment, the resistance of the first resistor R1 is 50kohm, the resistance of the second resistor R2 is 50kohm, the resistance of the third resistor R3 is 50kohm, and the resistance of the fourth resistor R4 is 18.7kohm.

[0099] When the 3V_EN enable pin is pulled low and the 5V_EN enable pin is pulled low, the first MOS transistor Q1 and the second MOS transistor Q2 are both cut off. At this time, the first resistor R1 is 100kohm and the second resistor R2 is 50kohm. At this time, the output voltage is 1.8V;

[0100] When the 3V_EN enable pin is pulled high and the 5V_EN enable pin is pulled low, the first MOS tube Q1 is turned on and the second MOS tube Q2 is turned off. At this time, the first resistor R1 is 100kohm, the second resistor R2 is 50kohm and 50kohm is connected in parallel (i.e., the third resistor R3), which is 25kohm. At this time, the output voltage is 3V;

[0101] When the 3V_EN enable pin is pulled low and the 5V_EN enable pin is pulled high, the first MOS tube Q1 is turned off and the second MOS tube Q2 is turned on. At this time, the first resistor R1 is 100kohm, the second resistor R2 is 50kohm, and 18.7kohm is connected in parallel (i.e., the fourth resistor R4), which is 13.6kohm. At this time, the output voltage is 5V.

[0102] When a smart card 4 is connected, the power module 2, under the control of the MCU 1, prioritizes outputting a 1.8V voltage. If the communication test fails, the supply voltage is adjusted to 3V after a period of time. If this fails again, it is adjusted to 5V. During this process, if communication succeeds at a certain voltage, the supply voltage is maintained at that voltage. If the 5V, 3V, or 1.8V states all fail to recognize the card, the card is considered unrecognized.

[0103] Although this application frequently uses terms such as MCU and power module, the use of other terms is not excluded. These terms are used solely to more conveniently describe and explain the essence of the present invention; interpreting them as any additional limitations is contrary to the spirit of the present invention.

[0104] Example 2

[0105] Please refer to Figure 7, is a flow chart of a method for outputting a power supply voltage provided in the first embodiment of the present invention, which is applied to the terminal device provided in the first embodiment. The method specifically comprises the following steps:

[0106] S10. The MCU controls the power module to output a voltage to the smart card.

[0107] It should be noted that in this step, the MCU starts to control the power module to provide an initial voltage to the smart card. This voltage is a preset, low default starting voltage used to start the smart card power supply and identification process.

[0108] S20. Each time the power module outputs a voltage, the MCU detects whether the output voltage is the operating voltage of the smart card; if so, execute step S30; if not, execute step S40.

[0109] It should be noted that in this step, the MCU monitors the voltage output by the power module and checks whether it matches the operating voltage required by the smart card. This is a critical detection process used to determine whether the smart card can operate normally at this voltage.

[0110] S30: The MCU supplies power to the smart card at a fixed operating voltage of the smart card to establish a communication connection between the MCU and the smart card.

[0111] It's important to note that in this step, once the power module's output voltage is confirmed to match the smart card's operating voltage, the MCU will continue to supply power at that voltage and attempt to establish a communication connection with the smart card. This step is crucial for establishing stable communication and ensures that the smart card can correctly respond to MCU commands.

[0112] S40: The MCU controls the power module to output a voltage higher than the previous output voltage to the smart card, and returns to execute S20 until the voltage output by the power module reaches the operating voltage of the smart card.

[0113] It's important to note that during this step, if the current output voltage doesn't match the smart card's operating voltage, the MCU instructs the power module to increase the output voltage and retest. This process repeats until the appropriate operating voltage is found. This gradual voltage increase ensures that the smart card is activated within a safe voltage range, preventing damage to the smart card due to excessive voltage.

[0114] Through these steps, the present invention provides a systematic method for automatically detecting and adapting the operating voltage of a smart card, thereby ensuring optimal smart card operation while improving the compatibility and reliability of terminal devices. This method not only simplifies the power management process but also reduces reliance on external components, thereby reducing overall system complexity and cost.

[0115] In one implementation of this embodiment, the S20 includes:

[0116] S21. Each time the power module outputs voltage, the MCU activates the RST line and detects whether the RST line is pulled low; if so, execute step S22; if not, execute step S23.

[0117] It should be noted that during this step, the MCU checks whether the smart card is responding by activating the RST (reset) line. The RST line is typically used to initialize or reset the smart card. The MCU monitors the state of the RST line to determine whether the smart card has detected power and is ready.

[0118] If the RST line is pulled low, this usually indicates that the smart card has detected power and has reset, ready to communicate. If the RST line is not pulled low, the smart card may not be detecting the correct power supply or there may be another problem.

[0119] S22: Determine that the voltage output by the power module is the operating voltage of the smart card.

[0120] It should be noted that in this step, if the MCU detects that the RST line is pulled low, it will confirm that the voltage currently output by the power module is the operating voltage required by the smart card. This means that the smart card has been successfully initialized and is ready for data communication.

[0121] Once the voltage is confirmed to be correct, the MCU will proceed to the subsequent steps, such as establishing a communication connection and exchanging data.

[0122] S23: Determine that the voltage output by the power module is not the operating voltage of the smart card.

[0123] It should be noted that during this step, if the MCU detects that the RST line is not pulled low, it will confirm that the voltage output by the current power module is not the operating voltage required by the smart card. This may mean that a higher voltage needs to be tried, or there may be other problems with the smart card.

[0124] The MCU will record that the current voltage setting has failed, and prepare to instruct the power module to output a higher voltage in S40, and then re-execute step S20 to perform another test.

[0125] Through these detailed steps, this embodiment provides a detailed method for detecting and confirming the operating voltage of a smart card, ensuring that the smart card operates at the correct voltage, thereby improving the reliability and compatibility of terminal devices. This method helps reduce the risk of smart card communication failure or damage caused by voltage mismatch.

[0126] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concepts of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.

Claims

1. A terminal device for reading and writing a smart card (4), characterized in that: It includes an MCU (1), a power module (2) and a level conversion module (3); wherein, One end of the power module (2) is connected to the MCU (1), and the other end is connected to the smart card (4), and is used to output different voltages to the smart card (4) in order from low to high under the control of the MCU (1) until the output voltage reaches the operating voltage of the smart card (4), so as to establish a communication connection between the MCU (1) and the smart card (4); One end of the level conversion module (3) is connected to the MCU (1), and the other end is connected to the smart card (4), and is used to achieve level matching of signals when communicating between the MCU (1) and the smart card (4) under the control of the MCU (1).

2. The terminal device according to claim 1, wherein: The power supply module (2) comprises a power supply (21), a power supply circuit (22), a first MOS tube control circuit (23) and a second MOS tube control circuit (24); One end of the power supply circuit (22) is connected to the power supply (21), and the other end is connected to the smart card (4), for outputting voltage to the smart card (4); One end of the first MOS tube control circuit (23) is connected to the MCU (1), and the other end is connected to the power supply circuit (22), and is used to be turned on or off under the control of the MCU (1) to coordinately adjust the output voltage of the power supply circuit (22); One end of the second MOS tube control circuit (24) is connected to the MCU (1), and the other end is connected to the power supply circuit (22), and is used for being turned on or off under the control of the MCU (1) to coordinately adjust the output voltage of the power supply circuit (22).

3. The terminal device according to claim 2, characterized in that The power supply circuit (22) includes a power supply chip U1, a first inductor L1, a first resistor R1, a second resistor R2, a first capacitor C1, a second capacitor C2, a third capacitor C3 and a fourth capacitor C4; The VIN pin of the power chip U1 is connected to the power supply (21), the GND pin of the power chip U1 is grounded, the SW pin of the power chip U1 is connected in series with the first inductor L1 and is connected to the smart card (4) as an output pin, and the FB pin of the power chip U1 is connected to the first MOS tube control circuit (23) and the second MOS tube control circuit (24) respectively; One end of the first resistor R1 is connected between the first inductor L1 and the smart card (4), and the other end is connected to the FB pin of the power chip U1; One end of the second resistor R2 is connected to the FB pin of the power chip U1, and the other end is grounded; The first capacitor C1 is connected between the SW pin and the BST pin of the power chip U1; One end of the second capacitor C2 is connected between the first inductor L1 and the smart card (4), and the other end is connected to the FB pin of the power chip U1; One end of the third capacitor C3 is connected between the first inductor L1 and the smart card (4), and the other end is grounded; One end of the fourth capacitor C4 is connected to the VIN pin of the power chip U1, and the other end is grounded; The EN pin of the power chip U1 is connected between the fourth capacitor C4 and the VIN pin of the power chip U1 .

4. The terminal device according to claim 3, characterized in that The resistance of the first resistor R1 is 100kohm; The resistance of the second resistor R2 is 50kohm.

5. The terminal device according to claim 4, characterized in that The first MOS tube control circuit (23) comprises a first MOS tube Q1, a third resistor R3 and a fifth resistor R5; The S pole of the first MOS tube Q1 is grounded, the D pole of the first MOS tube Q1 is connected in series with the third resistor R3 and then connected to the FB pin of the power chip U1, and the G pole of the first MOS tube Q1 is connected to the MCU (1) as a 3V_EN enable pin; The fifth resistor R5 is connected between the S electrode and the G electrode of the first MOS transistor Q1.

6. The terminal device according to claim 5, characterized in that The resistance of the third resistor R3 is 50 kohm.

7. The terminal device according to claim 6, characterized in that The second MOS transistor control circuit (24) comprises a second MOS transistor Q2, a fourth resistor R4 and a sixth resistor R6; The S pole of the second MOS tube Q2 is grounded, the D pole of the second MOS tube Q2 is connected in series with the fourth resistor R4 and then connected to the FB pin of the power chip U1, and the G pole of the second MOS tube Q2 is connected to the MCU (1) as a 5V_EN enable pin; The sixth resistor R6 is connected between the S electrode and the G electrode of the second MOS transistor Q2.

8. The terminal device according to claim 7, characterized in that The resistance of the fourth resistor R4 is 18.7 kohm.

9. A method for outputting a power supply voltage, applied to a terminal device according to any one of claims 1 to 8, characterized in that: The method comprises: S10, the MCU controls the power module to output a voltage to the smart card; S20, the MCU detects whether the output voltage is the operating voltage of the smart card each time the power module outputs a voltage; if so, execute step S30; if not, execute step S40; S30, the MCU supplies power to the smart card at a fixed operating voltage of the smart card to establish a communication connection between the MCU and the smart card; S40: The MCU controls the power module to output a voltage higher than the previous output voltage to the smart card, and returns to execute S20 until the voltage output by the power module reaches the operating voltage of the smart card.

10. The power supply voltage output method according to claim 9, characterized in that: The S20 includes: S21, the MCU activates the RST line each time the power module outputs voltage, and detects whether the RST line is pulled low; if so, execute step S22, if not, execute step S23; S22. Determine that the voltage output by the power module is the operating voltage of the smart card; S23: Determine that the voltage output by the power module is not the operating voltage of the smart card.

Citation Information

Patent Citations

  • Smart card reader

    CN102395980A

  • Testing card reader capable of automatically controlling voltage of power supplied to intelligent cards

    CN103699163A

  • Charging control method and system and card reader

    CN108110856A

  • Memory card

    CN1595442A

  • Smart card communication control circuit construction

    CN201229579Y