Switching circuit for double SIM cards of intelligent Internet of Things
By combining analog switch modules and 4G communication chips, dual SIM card switching is achieved using a single GPIO port, which solves the problems of high cost and high GPIO port occupancy in the existing technology, and is suitable for efficient communication of IoT devices.
Patent Information
- Application Number
- CN202420574001.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-22
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2034-03-22
AI Technical Summary
The existing dual SIM card switching technology is costly and occupies a large number of GPIO ports of the main control module, resulting in shortage of resources and making it difficult to achieve efficient dual SIM card switching in IoT devices.
The analog switch module is used to control the SIM card switching through the single GPIO port of the main control module, and the SGM7222YMS10/TR analog switch chip and the ML302 4G communication chip are used to realize efficient switching of the SIM card and save GPIO port resources.
It realizes low-cost and simple logic dual SIM card switching, and can be switched only with a single GPIO port, which is suitable for large-scale IoT device applications.
Smart Images

Figure CN221948175U_ABST
Abstract
Description
Technical Field
[0001] The utility model belongs to the technical field of Internet of Things, and in particular relates to a switching circuit of dual SIM cards of an intelligent Internet of Things. Background Art
[0002] With the development of industrial technology, industrial equipment has gradually been applied to various scenarios in the industrial field, especially in the field of Internet of Things technology. Among them, the widespread application of Internet of Things devices (such as from smart home devices to industrial sensors, to remote monitoring equipment) has put forward higher requirements on the reliability and continuity of the network. As the application of 4G in the field of Internet of Things (IoT) becomes more and more common, especially in scenarios requiring remote data transmission and device management, dual-card switching technology has also received more and more attention.
[0003] The application background of dual SIM card switching technology in the field of Internet of Things (IoT) is different from that in mobile communication devices, but it is equally important. It provides multiple advantages for IoT devices and ensures the stability and reliability of data transmission. At present, ordinary IoT cards require four control lines. Therefore, the existing dual SIM card switching is controlled by two switches, that is, one switch controls one SIM card. However, the above switching technology has the following shortcomings: the circuit cost is high, and it needs to occupy two GPIO ports of the main control, which easily leads to no GPIO ports available in the main control module when resources are tight. Based on this, how to provide a dual SIM card switching circuit with low cost and less GPIO ports occupied has become a problem to be solved urgently. Utility Model Content
[0004] The utility model aims to provide a dual SIM card switching circuit for an intelligent Internet of Things, so as to solve the problems of high cost and the need to occupy two GPIO ports of a main control in the prior art.
[0005] In order to achieve the above purpose, the utility model adopts the following technical solutions:
[0006] In a first aspect, a dual SIM card switching circuit for an intelligent Internet of Things is provided, comprising:
[0007] A main control module and an analog switch module, wherein a signal switching control terminal of the main control module is electrically connected to a signal selection terminal of the analog switch module, and a SIM card connection terminal of the analog switch module is respectively connected to a first SIM card and a second SIM card;
[0008] A mobile data communication module, wherein the first SIM card control line port of the mobile data communication module is electrically connected to the first SIM card and the second SIM card, and the second SIM card control line port of the mobile data communication module is also electrically connected to the analog switch module, for establishing a connection with the first SIM card or the second SIM card through the analog switch module.
[0009] Based on the above disclosed content, the dual SIM card switching circuit of the intelligent Internet of Things provided by the utility model is provided with an analog switch module and a mobile data communication module, wherein the signal selection end of the analog switch module is electrically connected to the signal switching control end of the main control module, and the SIM card connection end of the analog switch module is respectively connected to the two SIM cards, and at the same time, the first SIM card control line port of the mobile data communication module is electrically connected to the two SIM cards, and the second SIM card control line port of the mobile data communication module is also connected to the analog switch module; in this way, the analog switch module can switch the SIM cards through the high and low levels issued by the main control module; based on this, the utility model uses one analog switch module to switch two SIM cards, compared with the traditional technology, the cost is low, the logic is simple, and only one GPIO port of the main control module is needed to complete the switching of the SIM cards, which can save other GPIO ports, and therefore, it is very suitable for large-scale application and promotion.
[0010] In a possible design, the analog switch module uses an SGM7222YMS10 / TR analog switch chip.
[0011] In one possible design, the s pin of the SGM7222YMS10 / TR analog switch chip is electrically connected to the signal switching control end of the main control module, wherein the HSD1+ pin and HSD1- pin of the SGM7222YMS10 / TR analog switch chip are electrically connected to the first SIM card, and the HSD2+ pin and HSD2- pin of the SGM7222YMS10 / TR analog switch chip are electrically connected to the second SIM card.
[0012] In one possible design, the second SIM card control line port includes a SIM power line port and a SIM data line port, wherein the D+ pin of the SGM7222YMS10 / TR analog switch chip is electrically connected to the SIM power line port in the mobile data communication module, and the D- pin of the GM7222YMS10 / TR analog switch chip is electrically connected to the SIM data line port in the mobile data communication module.
[0013] In one possible design, the first SIM card control line port includes a clock line port and a reset line port, wherein the clock line port and the reset line port of the mobile data communication module are both electrically connected to the first SIM card and the second SIM card.
[0014] In a possible design, a level conversion circuit is provided between the signal transceiver end of the mobile data communication module and the signal transceiver end of the main control module.
[0015] In a possible design, the level conversion circuit includes: a MOS tube, a first resistor, a second resistor and a third resistor;
[0016] The source of the MOS tube is electrically connected to the signal transceiver end of the mobile data communication module and one end of the first resistor, wherein the gate of the MOS tube is electrically connected to one end of the second resistor, and the drain of the MOS tube is electrically connected to one end of the third resistor and the signal transceiver end of the main control module;
[0017] The other end of the first resistor and the other end of the second resistor are electrically connected to a first DC power supply respectively, the other end of the third resistor is electrically connected to a second DC power supply, and a voltage of the first DC power supply is lower than a voltage of the second DC power supply.
[0018] In a possible design, the resistance values of the first resistor and the third resistor are 4.7 kΩ, and the resistance value of the second resistor is 33 Ω.
[0019] In a possible design, the mobile data communication module uses an ML302 4G communication chip and its peripheral circuits.
[0020] In a possible design, the main control module uses an STM32H743VITx main control chip and its peripheral circuits.
[0021] Beneficial effects:
[0022] (1) The utility model adopts an analog switch module to switch between two SIM cards. Compared with the traditional technology, the utility model has low cost and simple logic. Only one GPIO port of the main control module is needed to complete the switching of SIM cards, which can save other GPIO ports. Therefore, the utility model is very suitable for large-scale application and promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A structural block diagram of a dual SIM card switching circuit for the smart Internet of Things provided by an embodiment of the utility model;
[0024] Figure 2 A specific circuit diagram of the main control module provided by the embodiment of the utility model;
[0025] Figure 3 A specific circuit diagram of a mobile data communication module provided by an embodiment of the utility model;
[0026] Figure 4 A specific circuit diagram of the analog switch module provided by the embodiment of the utility model;
[0027] Figure 5 A specific circuit diagram of the first SIM card provided by an embodiment of the utility model;
[0028] Figure 6 A specific circuit diagram of a second SIM card provided by an embodiment of the utility model;
[0029] Figure 7 A specific circuit diagram of a level conversion circuit provided by an embodiment of the utility model;
[0030] Figure 8 A specific circuit diagram of a power supply filter circuit provided in an embodiment of the utility model. DETAILED DESCRIPTION
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the utility model or the prior art, the utility model will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the utility model. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the utility model, but does not constitute a limitation of the utility model.
[0032] It should be understood that although the terms first, second, etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another unit. For example, a first unit can be referred to as a second unit, and similarly, a second unit can be referred to as a first unit without departing from the scope of the exemplary embodiments of the present utility model.
[0033] It should be understood that the term "and / or" that may appear in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" that may appear in this article describes another type of association object relationship, indicating that two relationships may exist. For example, A / and B can represent two situations: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this article generally indicates that the previous and next associated objects are in an "or" relationship.
[0034] Example:
[0035] See also Figures 1 to 8 As shown, the dual SIM card switching circuit of the smart Internet of Things provided in this embodiment may include, but is not limited to, a main control module, an analog switch module, a mobile data communication module, a first SIM card and a second SIM card; wherein, the signal switching control end of the main control module is electrically connected to the signal selection end of the analog switch module, and the SIM card connection end of the analog switch module is respectively connected to the first SIM card and the second SIM card; at the same time, in this embodiment, the first SIM card control line port of the mobile data communication module is electrically connected to the first SIM card and the second SIM card, and the second SIM card control line port of the mobile data communication module is also electrically connected to the analog switch module, so as to connect the connection with the first SIM card or the second SIM card through the analog switch module; in this way, the analog switch module can be controlled to connect the connection between the first SIM card or the second SIM card and the mobile data communication module through the signal switching control end of the main control module (which is a GPIO port), so as to select the first SIM card or the second SIM card to communicate with the external device.
[0036] Optionally, the following discloses one circuit structure of each of the aforementioned modules:
[0037] In this embodiment, the example main control module can be, but not limited to, a STM32H743VITx type main control chip and its peripheral circuits; meanwhile, the example mobile data communication module can be, but not limited to, a ML302 type 4G communication chip and its peripheral circuits; wherein the circuit diagrams of the two can be referred to in turn. Figure 2 and Figure 3 shown.
[0038] Next, the circuit structure of the analog switch module is disclosed as follows.
[0039] In specific applications, the analog switch module can be, but is not limited to, the SGM7222YMS10 / TR analog switch chip. Figure 4 , Figure 2 , Figure 3 , Figure 5 and Figure 6 As shown, the following is based on the aforementioned SGM7222YMS10 / TR analog switch chip to specifically explain its specific connection structure with the mobile data communication module and the main control module.
[0040] In a specific implementation, the s pin of the SGM7222YMS10 / TR analog switch chip (which serves as the signal selection end of the analog switch module) is electrically connected to the signal switching control end of the main control module (i.e., the 63rd pin of the STM32H743VITx main control chip), wherein the HSD1+ pin and the HSD1- pin of the SGM7222YMS10 / TR analog switch chip are electrically connected to the first SIM card (i.e., the HSD1+ pin is connected to the VCC pin of the first SIM card, and the HSD1- pin is connected to the IO pin of the first SIM card, see Figure 5 As shown), and the HSD2+ pin and HSD2- pin of the SGM7222YMS10 / TR analog switch chip are electrically connected to the second SIM card (similarly, they are also connected to the VCC pin and IO pin of the second SIM card, see Figure 6 shown).
[0041] Optionally, for example, the first SIM card control line port of the mobile data communication module includes a clock line port and a reset line port, and the second SIM card control line port includes a SIM power line port and a SIM data line port; accordingly, the D+ pin of the SGM7222YMS10 / TR analog switch chip is electrically connected to the SIM power line port in the mobile data communication module (i.e., the USIM1_VDD pin of the ML302 4G communication chip), and the D- pin of the GM7222YMS10 / TR analog switch chip is electrically connected to the SIM data line port in the mobile data communication module (i.e., the USIM1_DATA pin of the ML302 4G communication chip); at the same time, the clock line port (i.e., the USIM1_CLK pin of the ML302 4G communication chip) and the reset line port (the USIM1_RST pin of the ML302 4G communication chip) of the mobile data communication module are both electrically connected to the first SIM card and the second SIM card (see Figure 5 and Figure 6 As shown, the CLK pin and RST pin on the corresponding SIM card are connected).
[0042] Further, in this embodiment, for example, the CLK pin and the RST pin of the first SIM card and the second SIM card are connected through a fourth resistor (ie Figure 5 The resistors R1 and R2 in Figure 6 The middle resistor R3 and the resistor R4) are connected to the first SIM card control line port of the ML302 type 4G communication chip; similarly, the IO pins of the two are respectively connected through a fifth resistor ( Figure 5 The resistor R5 and Figure 6 The resistor R6 in the figure is used to connect the analog switch module.
[0043] In addition, in this embodiment, the CLK pin and the RST pin of the first SIM card are respectively grounded through a first capacitor (ie Figure 5 The capacitor C34 and the capacitor C32 in the first SIM card are connected, wherein the VCC pin of the first SIM card is electrically connected to one end of the second capacitor C30 and one end of the third capacitor C5, respectively, and the other ends of the second capacitor C30 and the third capacitor C5 are grounded respectively; of course, the circuit structure of the corresponding pins on the second SIM card is also the same, which will not be repeated here.
[0044] Thus, the SIM card switching principle of the entire switching circuit is as follows:
[0045] Pin No. 1 S of the SGM7222YMS10 / TR analog switch chip is controlled by the STM32H743VITx microcontroller and is directly connected to the GPIO pin of the microcontroller. The high and low levels of the output are used to control the switch to HSD1 or HSD2. The analog chip selects HSD1 when S=0 (low level) and selects HSD2 when S=1 (high level). The SIM line of the 4G wireless communication module ML302 is connected to the SIM card, and the traffic in the SIM card is required to connect to the network. Specifically, the SIM_CLK clock line and the SIM_RST reset line that do not need to be switched in the SIM line are directly connected to the pins of the two SIM cards, while the SIM_VDD power line and the SIM_DATA data line that need to be switched are connected to the D+ and D- pins of the analog switch, and are selected and switched through the output of the microcontroller. Based on this, an analog switch can be used to realize the switching of dual SIM cards.
[0046] In a specific implementation, since the voltages between the signal transceiver ends of the main control module and the mobile data communication module are inconsistent, in order to ensure normal communication between the two, this embodiment further provides a level conversion circuit between the signal transceiver end of the mobile data communication module and the signal transceiver end of the main control module.
[0047] Among them, the signal transceiver end of the mobile data communication module refers to the UART0_TXD pin and UART0_RXD pin of the ML302 type 4G communication chip; similarly, the signal transceiver end of the main control module refers to the 4G_UART_TX pin and 4G_UART_RX pin of the STM32H743VITx type main control chip, and in this embodiment, a level conversion circuit is respectively provided on the UART0_TXD pin and the UART0_RXD pin; of course, the circuit structures of the two level conversion circuits are the same, which will be described in detail below.
[0048] In a specific implementation, the level conversion circuit may include, but is not limited to: a MOS tube, a first resistor, a second resistor, and a third resistor, wherein the specific connection structure of the aforementioned electronic devices is:
[0049] See also Figure 7 As shown, the MOS tube ( Figure 7 The sources of Q5 and Q4 in the circuit are respectively electrically connected to the signal transceiver end of the mobile data communication module (the source of Q5 is connected to the UART0_TXD pin of the ML302 type 4G communication chip, and the source of Q4 is connected to the UART0_RXD pin of the ML302 type 4G communication chip) and one end of the first resistor (in Figure 7 In the embodiment, the source of Q5 is connected to one end of the resistor 19, and Q4 is connected to one end of the resistor R20), wherein the gate of the MOS tube is electrically connected to one end of the second resistor (see Figure 7 As shown, the drain of Q5 is connected to one end of the resistor R21, and the drain of Q4 is connected to one end of the resistor R22), and the drain of the MOS tube is electrically connected to one end of the third resistor and the signal receiving and transmitting end of the main control module (see Figure 7 In the embodiment, the drain of Q5 is connected to one end of the resistor R23 and the 4G_UART_TX pin of the STM32H743VITx main control chip, and the drain of Q4 is connected to one end of the resistor R24 and the 4G_UART_RX pin of the STM32H743VITx main control chip); at the same time, the other end of the first resistor and the other end of the second resistor are respectively electrically connected to the first DC power supply, and the other end of the third resistor is electrically connected to the second DC power supply, and the voltage of the first DC power supply is less than the voltage of the second DC power supply; in this embodiment, the first DC power supply is a 1.8V DC power supply, and the second DC power supply is a 3.3V DC power supply.
[0050] Furthermore, in the present embodiment, the resistance values of the first resistor and the third resistor are 4.7 kΩ, and the resistance value of the second resistor is 33 Ω; of course, the specific resistance values can be set according to actual use, and are not limited to the above examples.
[0051] Therefore, through the above explanation, the signal compatibility and voltage adaptation between different voltage domains can be achieved through the above-mentioned level conversion circuit, so that the main control modules and mobile data communication modules in different voltage domains can communicate and interact with each other.
[0052] In addition, this embodiment is also provided with a power supply filter circuit, see Figure 8As shown, it includes capacitor C24, capacitor C25, capacitor C26 and capacitor C27, wherein one end of capacitor C24, capacitor C25, capacitor C26 and capacitor C2 are connected to each other, one end of capacitor C27 is connected to the battery, one end of capacitor C24 is used as an output end, connected to the power supply end of each module, and the other ends of capacitor C24, capacitor C25, capacitor C26 and capacitor C2 are grounded respectively; in this way, the high-frequency noise in the power supply can be filtered through the aforementioned filtering circuit, thereby ensuring the stability and reliability of the power supply output.
[0053] Therefore, through the aforementioned switching circuit for the dual SIM cards of the smart Internet of Things, the working principle of the entire circuit is:
[0054] The entire circuit includes: dual SIM cards, a full-network 4G communication chip, a single-chip microcomputer (i.e., the aforementioned main control module), and an analog switch (the aforementioned analog switch module); the single-chip microcomputer has two functions: (1) the single-chip microcomputer communicates with the full-network 4G communication module and transmits data to the full-network 4G communication chip, which is then transmitted by the antenna after processing and uploaded to the cloud via 4G; (2) the single-chip microcomputer controls the analog switch to switch between SIM card 1 and SIM card 2; specifically, the single-chip microcomputer outputs high and low levels to the analog switch through the GPIO port, and the analog switch switches the pins according to the received high and low levels, thereby selecting different SIM cards to connect to the 4G communication chip; in this way, the 4G communication chip can perform data communication through the traffic of the connected SIM card.
[0055] In addition, in this embodiment, a usage scenario for SIM card switching is provided:
[0056] (1) At the beginning, the default SIM card (usually SIM card 1, i.e., the first SIM card) is detected first. At this time, the single chip will set the state of the analog switch to card 1. Whether the SIM card is inserted is generally determined by detecting the IMEI (International Mobile Equipment Identity). If the IMEI is detected, the operator of card 1 is analyzed. If not, the operator is switched to SIM card 2 through the analog switch.
[0057] (2) If the IMEI is detected and the corresponding operator can be found, the signal quality can be further tested. If the Rssi (signal strength) is good enough and there are few dropped beats, SIM card 1 will continue to be used. If the signal quality is poor (Rssi < -100dBm / 2 beats of data are lost in 5 beats / no signal / no traffic, etc.), the analog switch will be used to switch to SIM card 2.
[0058] Of course, the usage scenarios of the aforementioned SIM cards are only examples and are not limited to the aforementioned examples.
[0059] In summary, the utility model has the following beneficial effects:
[0060] By using two SIM cards, the hardware device can switch between different network operators, so that a wider network can be used for communication coverage, which improves the stability of data transmission; at the same time, using an analog switch to switch SIM cards is not only low-cost and simple in logic, but also only requires one GPIO port of the microcontroller to output a high or low level to complete the switching, thus saving other GPIO ports; based on this, the utility model is very suitable for large-scale application and promotion in the field of Internet of Things communications.
[0061] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A dual SIM card switching circuit for smart Internet of Things, It is characterized in that include: A main control module and an analog switch module, wherein a signal switching control terminal of the main control module is electrically connected to a signal selection terminal of the analog switch module, and a SIM card connection terminal of the analog switch module is respectively connected to a first SIM card and a second SIM card; A mobile data communication module, wherein the first SIM card control line port of the mobile data communication module is electrically connected to the first SIM card and the second SIM card, and the second SIM card control line port of the mobile data communication module is also electrically connected to the analog switch module, for establishing a connection with the first SIM card or the second SIM card through the analog switch module.
2. The dual SIM card switching circuit of the smart Internet of Things according to claim 1, It is characterized in that The analog switch module adopts the SGM7222YMS10 / TR analog switch chip.
3. The dual SIM card switching circuit of the smart Internet of Things according to claim 2, It is characterized in that The s pin of the SGM7222YMS10 / TR analog switch chip is electrically connected to the signal switching control end of the main control module, wherein the HSD1+ pin and HSD1- pin of the SGM7222YMS10 / TR analog switch chip are electrically connected to the first SIM card, and the HSD2+ pin and HSD2- pin of the SGM7222YMS10 / TR analog switch chip are electrically connected to the second SIM card.
4. The dual SIM card switching circuit of the smart Internet of Things according to claim 2, It is characterized in that The second SIM card control line port includes a SIM power line port and a SIM data line port, wherein the D+ pin of the SGM7222YMS10 / TR analog switch chip is electrically connected to the SIM power line port in the mobile data communication module, and the D- pin of the GM7222YMS10 / TR analog switch chip is electrically connected to the SIM data line port in the mobile data communication module.
5. The dual SIM card switching circuit of the smart Internet of Things according to claim 1, It is characterized in that The first SIM card control line port includes a clock line port and a reset line port, wherein the clock line port and the reset line port of the mobile data communication module are both electrically connected to the first SIM card and the second SIM card.
6. The dual SIM card switching circuit of the smart Internet of Things according to claim 1, It is characterized in that A level conversion circuit is provided between the signal transceiver end of the mobile data communication module and the signal transceiver end of the main control module.
7. The dual SIM card switching circuit of the smart Internet of Things according to claim 6, It is characterized in that The level conversion circuit comprises: a MOS tube, a first resistor, a second resistor and a third resistor; The source of the MOS tube is electrically connected to the signal transceiver end of the mobile data communication module and one end of the first resistor, wherein the gate of the MOS tube is electrically connected to one end of the second resistor, and the drain of the MOS tube is electrically connected to one end of the third resistor and the signal transceiver end of the main control module; The other end of the first resistor and the other end of the second resistor are electrically connected to a first DC power supply respectively, the other end of the third resistor is electrically connected to a second DC power supply, and a voltage of the first DC power supply is lower than a voltage of the second DC power supply.
8. The dual SIM card switching circuit of the smart Internet of Things according to claim 7, It is characterized in that The resistance values of the first resistor and the third resistor are 4.7 kΩ, and the resistance value of the second resistor is 33Ω.
9. The dual SIM card switching circuit of the smart Internet of Things according to claim 1, It is characterized in that The mobile data communication module adopts the ML302 4G communication chip and its peripheral circuits.
10. The dual SIM card switching circuit of the smart Internet of Things according to claim 1, It is characterized in that The main control module adopts the STM32H743VITx main control chip and its peripheral circuits.
Citation Information
Cited By
Communication circuit and communication module applicable to smart visual scene
CN119628668A
