Terminal device, and external device access detection system
By using a first component with a resistance value less than a certain value in the terminal device, the power supply module and the pogo pin connector, the voltage difference during the access of the external device is detected, and the low access detection accuracy and Hall components in the prior art are solved. The problem of high cost enables more efficient access detection and lower power consumption and cost.
Patent Information
- Application Number
- PCT/CN2023/112370
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-01-10
- Filing Date
- 2023-08-10
- Publication Date
- 2024-11-07
AI Technical Summary
Existing terminal equipment has low accuracy when detecting external equipment access, and using Hall components requires accurate magnet placement, which is costly and has high power consumption.
The first element with a resistance value less than a certain value is used to combine it with the power module and the pogo pin connector to determine the access of the external device by detecting the voltage difference between the two ends of the component, eliminating Hall components, reducing costs and reducing power consumption.
It improves the accuracy of external device access detection, reduces the power consumption and cost of terminal devices, and extends the service life of pogo pin connectors.
Smart Images

Figure CN2023112370_19092024_PF_FP_ABST
Abstract
Description
Terminal equipment and external equipment access detection system
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on January 10, 2023, with application number 202310030001.X and application name “Terminal Equipment and External Equipment Access Detection System”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to a terminal device and an external device access detection system. Background Art
[0003] With the development of terminal technology, terminal devices usually have a pogo pin connector, which can be used to connect to another device (such as a keyboard with a pogo pin connector) and power or communicate with the other device through the pogo pin connector.
[0004] In some implementations, a Hall element is provided in the terminal device, and the flexible circuit board of the Hall element is installed at the position of the pogo pin connector. When the keyboard is connected to the terminal device through the pogo pin connector and the magnet on the keyboard covers the position of the flexible circuit board, the Hall element can detect the change in the magnetic field and send an interrupt signal to the processor of the terminal device. The processor determines that the keyboard is connected based on the received interrupt signal.
[0005] However, in the above implementation, there may be a situation where the terminal device cannot detect the keyboard connection, resulting in low accuracy in the detection of external device connection.
[0006] Summary of the Invention
[0007] An embodiment of the present application provides a terminal device and external device access detection system, which can determine that an external device is connected to the terminal device when there is a voltage difference between the two ends of a first component, thereby improving the accuracy of external device access detection.
[0008] In the first aspect, an embodiment of the present application provides a terminal device, the terminal device comprising: a power module, a first component, a pogo pin connector and a processor; the first component is a component having a resistance value less than a certain value; the power module comprises a positive connection terminal and a negative connection terminal, and the pogo pin connector comprises a positive pin and a negative pin; the first component is connected to the path between the positive connection terminal and the positive pin, or the first component is connected to the path between the negative connection terminal and the negative pin; the processor is configured to determine that an external device is connected to the terminal device when a voltage difference is detected across the first component. In this way, when an external device is connected to the terminal device via the pogo pin connector, the processor can determine that an external device is connected to the terminal device based on the voltage difference detected across the first component. There is no need to set a Hall element in the terminal device, that is, there is no need to accurately place the magnet of the external device on the position of the soft circuit board of the Hall element, which improves the situation where the terminal device cannot detect keyboard access and improves the accuracy of external device access detection.
[0009] In one possible implementation, the terminal device further includes a protection circuit and a voltage comparison unit; one end of the protection circuit is connected to one end of the first component, the other end of the protection circuit is connected to the first end of the voltage comparison unit, the second end of the voltage comparison unit is connected to the other end of the first component, and the third end of the voltage comparison unit is connected to a processor; the voltage comparison unit is configured to detect a voltage difference across the first component and, upon detecting a voltage difference across the first component, send a first signal to the processor; and the processor is configured to, upon receiving the first signal, determine that an external device is connected to the terminal device. In this way, the protection circuit can protect the components in the circuit, and the voltage comparison unit can detect the voltage difference across the first component and send the first signal to the processor. This allows the processor of the terminal device to determine that an external device is connected to the terminal device based on the first signal received from the voltage comparison unit, further improving the accuracy of external device connection detection.
[0010] In one possible implementation, the voltage comparison unit includes a voltage comparator or an analog-to-digital converter (ADC) chip. Thus, the voltage comparator or ADC chip can be used to detect whether a voltage difference exists across the first element, thereby improving the accuracy of detecting the voltage difference across the first element.
[0011] In one possible implementation, the terminal device further includes a protection circuit; one end of the protection circuit is connected to one end of the first component, the other end of the protection circuit is connected to a first input end of a processor, and a second input end of the processor is connected to the other end of the first component; the processor is specifically configured to detect a voltage difference across the first component and, upon detecting a voltage difference across the first component, determine that an external device is connected to the terminal device. In this way, the processor can detect the voltage difference across the first component, eliminating the need for other components to detect the voltage difference across the first component, thereby reducing the cost of the terminal device.
[0012] In one possible implementation, the first element includes any one of the following: a diode, a reed switch, a magnetic diode, and a magnetic switch. Thus, when the external device is connected to the terminal device, the processor can determine that the external device is connected to the terminal device based on the voltage difference detected across the first element. Furthermore, compared to a Hall effect element, the first element is less expensive.
[0013] In one possible implementation, the processor is further configured to control the voltage output by the power module to increase from a first voltage value to a second voltage value upon detecting a voltage difference across the first component. Thus, when the external device is not connected to the terminal device, the power module is connected to the pogo pin connector via the first component. Because the voltage output by the power module is relatively low, the pogo pin connector exposed to air is less susceptible to corrosion, thereby extending the service life of the pogo pin connector. When the external device is connected to the terminal device, the processor controls the voltage output by the power module to increase to the second voltage value, allowing the terminal device to use the higher voltage value to power the external device.
[0014] In one possible implementation, when the first component includes a diode, the first voltage value is greater than the conduction voltage of the diode. Thus, when the external device is connected to the terminal device, the first power module, the diode, and the external device can form a path, resulting in a voltage difference across the diode.
[0015] In one possible implementation, the power module includes a first power module and a second power module, wherein the voltage output by the first power module is lower than the voltage output by the second power module. The processor is further configured to, upon detecting a voltage difference across the first component and the first component being connected to the path between the first positive connection terminal and the positive pin of the first power module, control the first component to switch its connection to the path between the second positive connection terminal and the positive pin of the second power module. Alternatively, upon detecting a voltage difference across the first component and the first component being connected to the path between the first negative connection terminal and the negative pin of the first power module, control the first component to switch its connection to the path between the second negative connection terminal and the negative pin of the second power module. In this manner, when an external device is not connected to the terminal device, the first power module is connected to the pogo pin connector via the first component. Because the voltage output by the first power module is lower, the pogo pin connector, exposed to air, is less susceptible to corrosion, thereby extending the service life of the pogo pin connector. When an external device is connected to the terminal device, the processor can control the switching of the path of the first component so that the terminal device uses the second power module, which has a higher output voltage, to power the external device.
[0016] In one possible implementation, when the first component includes a diode, the voltage output by the first power module is greater than the conduction voltage of the diode. Thus, when the external device is connected to the terminal device, the first power module, the diode, and the external device form a path, resulting in a voltage difference across the diode.
[0017] In the second aspect, an embodiment of the present application provides a method for detecting the access of an external device, which is applied to a terminal device described in any possible implementation of the first aspect, and the method includes: when the processor of the terminal device detects a voltage difference between the two ends of a first element, determining that an external device is connected to the terminal device.
[0018] In a possible implementation, the method further includes: when the voltage comparison unit detects a voltage difference between the two ends of the first element, sending a first signal to the processor; when the processor receives the first signal, determining that an external device is connected to the terminal device.
[0019] In one possible implementation, the voltage comparison unit includes a voltage comparator, and further includes: when the voltage comparator detects a voltage difference between the two ends of the first element, sending a level signal to the processor; when the processor receives the level signal, determining that an external device is connected to the terminal device.
[0020] In one possible implementation, the voltage comparison unit includes an ADC chip, and further includes: when the ADC chip detects a voltage difference between the two ends of the first element, sending an ADC signal to the processor; when the processor receives the ADC signal, determining that an external device is connected to the terminal device.
[0021] In a possible implementation, the method further includes: when a voltage difference is detected across the first component, the processor controls the voltage output by the power module to increase from the first voltage value to the second voltage value.
[0022] In one possible implementation, the power module includes a first power module and a second power module, the voltage output by the first power module being lower than the voltage output by the second power module, and further comprising: when a voltage difference is detected between two ends of a first component and the first component is connected to a path between a first positive connection terminal and a positive pin of the first power module, the processor switches the first component to be connected to a path between a second positive connection terminal and the positive pin of the second power module;
[0023] Alternatively, when a voltage difference is detected across the first element and the first element is connected to the path between the first negative connection terminal and the negative pin of the first power module, the processor switches the first element to be connected to the path between the second negative connection terminal and the negative pin of the second power module.
[0024] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory is used to store code instructions, and the processor is used to run the code instructions to execute the method described in the second aspect or any possible implementation of the second aspect.
[0025] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is run on a computer, the computer executes the method described in the second aspect or any possible implementation of the second aspect.
[0026] In a fifth aspect, an embodiment of the present application provides a computer program product comprising a computer program, which, when the computer program runs on a computer, enables the computer to execute the method described in the second aspect or any possible implementation of the second aspect.
[0027] In a sixth aspect, the present application provides a chip or chip system, comprising at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected via a line, and the at least one processor is configured to execute a computer program or instruction to perform the method described in the second aspect or any possible implementation of the second aspect. The communication interface in the chip may be an input / output interface, a pin, or a circuit.
[0028] In one possible implementation, the chip or chip system described above in this application further includes at least one memory, in which instructions are stored. The memory may be a storage unit within the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).
[0029] In the seventh aspect, an embodiment of the present application provides an external device access detection system, including an external device and a terminal device described in the second aspect or any possible implementation of the second aspect, the external device and the terminal device are connected through a pogo pin connector, and the terminal device supplies power to the external device through the pogo pin connector.
[0030] It should be understood that the second to seventh aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0032] FIG2 is a schematic diagram of a usage scenario of a terminal device provided in an embodiment of the present application;
[0033] FIG3 is a first schematic diagram of a circuit for detecting access to an external device provided by an embodiment of the present application;
[0034] FIG4 is a second schematic diagram of a circuit for detecting access to an external device provided in an embodiment of the present application;
[0035] FIG5 is a schematic diagram of a circuit for detecting an external device connection including a voltage protection unit provided in an embodiment of the present application;
[0036] FIG6 is a schematic diagram of a circuit for detecting access to an external device including a voltage comparator provided in an embodiment of the present application;
[0037] FIG7 is a schematic diagram of a circuit for detecting access to an external device including an ADC chip provided in an embodiment of the present application;
[0038] FIG8 is a schematic diagram of a circuit for detecting access to an external device, including a first power module and a second power module, provided in an embodiment of the present application;
[0039] FIG9 is a schematic diagram of a circuit for detecting disconnection of an external device from a terminal device according to an embodiment of the present application;
[0040] FIG10 is a schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application;
[0041] FIG11 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In the embodiments of this application, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the terms "first chip" and "second chip" are used solely to distinguish between different chips and do not define their order. Those skilled in the art will understand that terms such as "first" and "second" do not define the quantity or execution order, and do not necessarily define differences.
[0043] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0044] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.
[0045] A terminal device can connect to an external device via a Pogo pin connector, providing power and communication with the device. For example, a tablet connected to a keyboard via a Pogo pin connector can power and communicate with the keyboard. Alternatively, wireless headphones can be connected to a headphone charging caddy via a Pogo pin connector, allowing the charging caddy to charge the wireless headphones.
[0046] In some implementations, a Hall effect element is provided on the terminal device, a flexible circuit board for the Hall effect element is provided at the location of the pogo pin connector in the terminal device, and a magnet is provided on the keyboard. When the keyboard is connected to the terminal device via the pogo pin connector, and the magnet on the keyboard covers the location of the Hall effect element's flexible circuit board in the terminal device, the Hall effect element can detect the magnetic field generated by the magnet and send an interrupt signal to the terminal device's processor. The processor can then determine, based on the interrupt signal, that a keyboard is connected to the terminal device. After determining that a keyboard is connected, the processor can communicate with the keyboard and control the terminal device's power supply to power the keyboard.
[0047] However, in the above implementation, when connecting the keyboard to the terminal device, the user needs to manually adjust the position of the keyboard and the terminal device so that the magnet on the keyboard accurately covers the position of the flexible circuit board of the Hall element. It is possible that the keyboard is connected to the terminal device via the Pogo pin connector, but the magnet on the keyboard does not cover the position of the flexible circuit board of the Hall element, so the terminal device cannot detect the connection of the keyboard. In addition, the cost of using Hall elements is relatively high.
[0048] In other implementations, when a keyboard is connected to a terminal device via a Pogo pin connector, the keyboard sends heartbeat packets to the terminal device's processor at regular intervals. Based on the received heartbeat packets, the terminal device's processor determines that the keyboard is connected to the terminal device, communicates with the keyboard, and can also control the terminal device's power supply to power the keyboard. While the terminal device is powering the keyboard, the terminal device's processor can determine the keyboard's external status based on the received heartbeat packets.
[0049] However, in the above implementation, the terminal device receives a heartbeat packet sent by the keyboard at regular intervals to determine the keyboard's presence status, which requires the terminal device's processing to be continuously in working state, resulting in high power consumption of the terminal device.
[0050] In view of this, an embodiment of the present application provides a terminal device, which includes a first element with a resistance value less than a certain value, and the first element is connected to the path between the positive connection end of the power module and the positive pin of the pogo pin connector, or the first element is connected to the path between the negative connection end of the power module and the negative pin of the pogo pin connector. In this way, when the external device is connected to the terminal device through the pogo pin connector, the power module, the first element and the external device form a loop, and there is a voltage difference across the first element. When the voltage difference is detected across the first element, the processor can determine that an external device is connected to the terminal device. There is no need to set a Hall element on the terminal device, that is, there is no need for the magnet on the external device to cover the soft circuit board of the Hall element, which improves the situation where the terminal device cannot detect the connection of the external device and improves the accuracy of the terminal device in detecting the connection status of the external device. In addition, the terminal device does not need to receive the heartbeat packet sent by the external device, so that the processor of the terminal device can enter the sleep state according to the actual situation, reducing the power consumption of the terminal device.
[0051] For example, the external device of the embodiment of the present application may be a keyboard, wireless headphones, smart watch or other electronic device. The embodiment of the present application does not specifically limit the external device.
[0052] Exemplarily, the terminal device of the embodiment of the present application may also be any form of electronic device. For example, the electronic device may include a handheld device with image processing function, a vehicle-mounted device, etc. For example, some electronic devices include: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving cars, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks. The terminal equipment in the network (PLMN), etc., is not limited to this in the embodiments of the present application.
[0053] As an example and not a limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0054] In addition, in the embodiments of the present application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.
[0055] The electronic devices in the embodiments of the present application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
[0056] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also known as main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as the Linux operating system, the Unix operating system, the Android operating system, the iOS operating system, or the Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0057] For example, FIG1 shows a schematic structural diagram of an electronic device.
[0058] The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a pogo pin connector interface 131, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc. The pogo pin connector interface 131 may include a power interface and a communication interface. The power interface may include an interface corresponding to the positive pin and an interface corresponding to the negative pin, and the communication interface may include at least one communication pin. FIG1 of the present application uses the example of a pogo pin connector including two power pins and one communication pin for illustration, which does not constitute any limitation.
[0059] It is understood that the structures illustrated in the embodiments of the present invention do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0060] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0061] Exemplarily, the processor 110 may also include a micro control unit (MCU), a system on chip (SOC), etc. In the embodiment of the present application, the MCU or SOC may be used to determine that an external device is connected to the terminal device when a voltage difference is detected across the first component.
[0062] The controller can generate an operation control signal based on the instruction opcode and timing signal to control instruction fetching and execution. For example, in an embodiment of the present application, when a voltage difference is detected across the first component, the processor can control the power module to use a higher voltage value to power the external device, or control the power module with a higher voltage value to power the external device.
[0063] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0064] For example, the processor 110 may further include an ADC chip, which is connected to the MCU or SOC in the processor. In the embodiment of the present application, the ADC chip can detect whether there is a voltage difference between the two ends of the first element, and when a voltage difference exists between the two ends of the first element, send an ADC signal to the MCU or SOC, so that the MCU or SOC can determine that an external device is connected to the terminal device based on the received ADC signal.
[0065] For example, the processor 110 may integrate the functionality of an ADC chip, which may be used to detect whether there is a voltage difference between the two ends of a circuit element. For example, in an embodiment of the present application, when the processor 110 detects a voltage difference between the two ends of a first element, it may be determined that an external device is connected to the terminal device.
[0066] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0067] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
[0068] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0069] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0070] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0071] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0072] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.
[0073] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0074] For example, in an embodiment of the present application, the power management module 141 may include a first component, a protection circuit, and a voltage comparator. The connection between the first component and the pogo pin connector can be shown in Figures 3-8 below. The connection between the first component, the protection circuit, and the voltage comparator can be shown in Figure 6 below. The voltage comparator can be used to detect whether there is a voltage difference between the two ends of the first component, and when a voltage difference is detected between the two ends of the first component, it sends a level signal to the processor 110, so that the processor 110 can determine that an external device is connected based on the level signal.
[0075] The electronic device implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0076] The indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc. For example, in an embodiment of the present application, the indicator may be used to indicate that an external device is connected to the terminal device.
[0077] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0078] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiments of the present application do not limit the software system of the electronic device.
[0079] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other. For the same or similar concepts or processes, some embodiments may not be described in detail.
[0080] For example, before describing the circuitry used in the terminal device of the present application to connect to an external device, the following describes the usage scenarios of the present application. Figure 2 shows a schematic diagram of a usage scenario for a terminal device. Figure 2 illustrates the example of a terminal device being a tablet computer and an external device being a keyboard, which does not constitute any limitation.
[0081] As shown in FIG2 , tablet computer 201 may be provided with a male end of a pogo pin connector (not shown in FIG2 ), and keyboard 202 may be provided with a female end of a pogo pin connector (not shown in FIG2 ). Tablet computer 201 and keyboard 202 may also be provided with magnets (not shown in FIG2 ). The present embodiment does not limit the location of the pogo pin connectors and magnets.
[0082] For example, when the keyboard 202 and the tablet computer 201 are close to each other, the magnets on the keyboard 202 and the magnets on the tablet computer 201 attract each other, so that the keyboard 202 and the tablet computer 201 are adsorbed together. The connection between the keyboard 202 and the tablet computer 201 can be seen in FIG2 .
[0083] As shown in Figure 2, when tablet computer 201 and keyboard 202 are connected, the female end of the Pogo pin connector on keyboard 202 connects to the male end of the Pogo pin connector on tablet computer 201. The location circled in dotted lines in Figure 2 may be the location where the two devices are connected, which may be where the male end of the Pogo pin connector and the female end of the Pogo pin connector meet.
[0084] When the tablet computer 201 and the keyboard 202 are connected via the pogo pin connector, the tablet computer 201 can use a battery to power the keyboard 202 via the positive and negative pins of the pogo pin connector, and can use a processor to communicate with the keyboard 202 via the communication pins of the pogo pin connector.
[0085] It is understood that the pogo pin connector of the terminal device may include one communication pin or multiple communication pins, and the embodiments of the present application do not limit the number of communication pins of the pogo pin connector. For ease of description, the subsequent circuit diagrams are all based on the example of a pogo pin connector of a terminal device including one communication pin, and the communication pin is located between the positive pin and the negative pin of the pogo pin connector.
[0086] For example, as shown in Figure 2, when an external device is connected to a terminal device via a pogo pin connector, the terminal device can determine that an external device is connected to the terminal device through a circuit as shown in Figure 3. Figure 3 is a schematic diagram of a circuit for detecting the connection of an external device provided in an embodiment of the present application.
[0087] As shown in Figure 3, the terminal device may include a power module, a first component, a pogo pin connector, and a processor. The power module includes a positive connection terminal and a negative connection terminal, and the pogo pin connector includes a positive pin, a negative pin, and a communication pin.
[0088] For example, the processor can be an MCU or SOC that integrates the function of detecting the voltage difference between the two ends of the component. For example, the processor of the terminal device can integrate the function of an ADC chip. The first component can be a component with a resistance value less than a certain value. The embodiment of the present application does not limit the resistance value of the first component. Because the resistance value of the first component is proportional to the power consumed by the terminal device when the first component is operating, when the external device is connected to the terminal device, the power consumed by the first component is relatively small.
[0089] As shown in Figure 3, the first component is connected between the positive terminal of the power module and the positive pin of the pogo pin connector, and the negative terminal of the power module is connected to the negative pin of the pogo pin connector. The first input terminal and the second input terminal of the processor are respectively connected to the two ends of the first component.
[0090] Exemplarily, the first component may also be connected between the negative connection terminal of the power module and the negative pin of the pogo pin connector, and the positive connection terminal of the power module is connected to the positive pin of the pogo pin connector.
[0091] For example, when an external device is connected to a terminal device via a Pogo pin connector, the power module, the first component, and the external device form a pathway, resulting in a voltage difference across the first component. The processor's first and second input terminals respectively acquire voltage values across the first component and compare the two acquired voltage values to determine whether a voltage difference exists across the first component. When the processor detects a voltage difference across the first component, it can determine that an external device is connected to the terminal device.
[0092] For example, when the terminal device determines that an external device is connected to the terminal device via the pogo pin connector, the power module can be used to power the external device via the pogo pin connector. The processor can also be connected to the communication pin of the pogo pin connector (not shown in Figure 3). When the external device is connected to the terminal device, the processor can communicate with the external device via the communication pin of the pogo pin connector. For example, the processor of a tablet computer can communicate with the keyboard via the communication pin of the connector to receive text input via the keyboard.
[0093] For example, when the processor determines that an external device is connected to the terminal device, the processor may further control the terminal device to output a prompt message. For example, when the terminal device determines that a keyboard is connected, a keyboard icon may be displayed on the terminal display screen, or text indicating that the keyboard is connected may be displayed. The embodiments of the present application do not limit the prompt message.
[0094] In this way, when the terminal device and the external device are connected through the pogo pin connector, the power module, the first component and the external device form a path. When the processor detects a voltage difference between the two ends of the first component, it can determine that an external device is connected to the terminal device. There is no need to set a Hall element in the terminal device. This can improve the situation where the terminal device cannot detect keyboard access, improve the accuracy of external device access detection, and reduce the cost of the terminal device.
[0095] For example, in order to reduce the possibility of damage to components in the circuit shown in Figure 3, the terminal device may further include a protection circuit based on the circuit shown in Figure 3 above, as shown in Figure 4. Figure 4 is a second schematic diagram of a circuit for detecting the access of an external device provided in an embodiment of the present application.
[0096] As shown in Figure 4, the terminal device may include a power module, a first component, a pogo pin connector, a protection circuit, and a processor. The protection circuit may be a voltage protection circuit or a current protection circuit, which is not limited in the present embodiment.
[0097] For example, as shown in FIG4 , one end of the protection circuit is connected to the end of the first component connected to the positive pin of the pogo pin connector, the other end of the protection circuit is connected to the first input terminal of the processor, and the second input terminal of the processor is connected to the end of the first component connected to the positive terminal of the power module. The connection method of the power module, the first component, and the pogo pin connector is the same as that in FIG3 and will not be repeated here.
[0098] Exemplarily, the protection circuit may also be connected between the processor and one end of the first component connected to the positive connection end of the power module.
[0099] Exemplarily, the first element can also be connected between the negative connection terminal of the power module and the negative pin of the pogo pin connector. In this connection mode, the protection circuit can be connected between the end of the first element connected to the negative connection terminal of the power module and the processor, or the protection circuit can be connected between the end of the first element connected to the negative pin of the pogo pin connector and the processor.
[0100] For example, when an external device is connected to a terminal device via a Pogo pin connector, the power module, the first component, and the external device form a pathway, resulting in a voltage difference across the first component. When the processor detects the voltage difference across the first component, it can determine that an external device is connected to the terminal device. The manner in which the processor detects the voltage difference across the first component can be found in the description of FIG. 3 and is not further described here.
[0101] In this way, by setting up a protection circuit in the terminal device, damage to components in the circuit can be reduced, extending the service life of the components in the circuit. In addition, the processor can determine whether an external device is connected to the terminal device, improving the accuracy of external device connection detection, and reducing the circuit cost compared to Hall effect elements.
[0102] In an embodiment of the present application, the terminal device may further include a voltage comparison unit for detecting a voltage difference between two ends of the first component. For example, FIG5 shows a schematic diagram of a circuit for detecting an external device connection including a voltage protection unit.
[0103] As shown in FIG5 , the terminal device may include a power module, a first component, a pogo pin connector, a protection circuit, a voltage comparison unit, and a processor.
[0104] As shown in Figure 5, the first component is connected between the positive terminal of the power module and the positive pin of the pogo pin connector, and the negative terminal of the power module is connected to the negative pin of the pogo pin connector. One end of the protection circuit is connected to the end of the first component connected to the positive pin of the pogo pin connector, the other end of the protection circuit is connected to the first end of the voltage comparison unit, the second end of the voltage comparison unit is connected to the end of the first component connected to the positive terminal of the power module, and the third end of the voltage comparison unit is connected to the processor.
[0105] Exemplarily, as shown in Figure 5, when the first element is connected between the positive connection terminal of the power module and the positive pin of the pogo pin connector, the connection method of the protection circuit, the voltage comparison unit and the processor may also include: one end of the protection circuit is connected to the end of the first element connected to the positive connection terminal of the power module, the other end of the protection circuit is connected to the first end of the voltage comparison unit, the second end of the voltage comparison unit is connected to the end of the first element connected to the positive pin of the pogo pin connector, and the third end of the voltage comparison unit is connected to the processor.
[0106] Exemplarily, the connection method of the power module, the first component and the pogo pin connector may also include: the first component may also be connected between the negative connection terminal of the power module and the negative pin of the pogo pin connector, and the positive connection terminal of the power module is connected to the positive pin of the pogo pin connector.
[0107] Exemplarily, the first component may also be connected between the negative connection terminal of the power module and the negative pin of the pogo pin connector. When the first component is connected between the negative connection terminal of the power module and the negative pin of the pogo pin connector, the connection method of the protection circuit, the voltage comparison unit, and the processor may include: one end of the protection circuit is connected to the end of the first component connected to the negative connection terminal of the power module, the other end of the protection circuit is connected to the first end of the voltage comparison unit, the second end of the voltage comparison unit is connected to the end of the first component connected to the negative pin of the pogo pin connector, and the third end of the voltage comparison unit is connected to the processor. Alternatively, one end of the protection circuit is connected to the end of the first component connected to the negative pin of the pogo pin connector, the other end of the protection circuit is connected to the first end of the voltage comparison unit, the second end of the voltage comparison unit is connected to the end of the first component connected to the negative connection terminal of the power module, and the third end of the voltage comparison unit is connected to the processor.
[0108] For example, when an external device is connected to a terminal device via a pogo pin connector, the power module, the first component, and the external device form a pathway, and a voltage difference exists across the first component. The voltage comparison unit can collect voltage values across the first component and compare the two collected voltage values to determine whether a voltage difference exists across the first component. When the voltage comparison unit detects a voltage difference across the first component, it can send a first signal to the processor. When the processor receives the first signal sent by the voltage comparison unit, it can determine that an external device is connected to the terminal device.
[0109] In this way, when the terminal device and the external device are connected through the pogo pin connector, the power module, the first component and the external device form a path, the voltage comparison unit can detect the voltage difference between the two ends of the first component, and send a first signal to the processor, so that the processor can determine that an external device is connected to the terminal device based on the received first signal. There is no need to set a Hall element in the terminal device, which can improve the situation where the terminal device cannot detect the keyboard access, improve the accuracy of external device access detection, and reduce the cost of the terminal device.
[0110] Exemplarily, in the circuit shown in FIG5 , the voltage comparison unit may include a voltage comparator or an ADC chip. The following describes the case where the voltage comparison unit is a voltage comparator and the case where the voltage comparison unit is an ADC chip.
[0111] For example, FIG6 shows a schematic diagram of a circuit including a voltage comparator for detecting the connection of an external device.
[0112] As shown in Figure 6, the terminal device may include a power module, a first component, a pogo pin connector, a voltage comparator, a protection circuit, and a processor. The circuit shown in Figure 6 may be a circuit obtained by replacing the voltage comparison unit with a voltage comparator. The connection method of the power module, the first component, the pogo pin connector, the protection circuit, the voltage comparator, and the processor can be referred to the relevant description of Figure 5 and will not be repeated here.
[0113] For example, as shown in Figure 6, when an external device is connected to a terminal device via a pogo pin connector, the power module, the first component, and the external device form a pathway, resulting in a voltage difference across the first component. A voltage comparator can detect the voltage difference across the first component and compare the two detected voltage differences to determine whether a voltage difference exists across the first component. When the voltage comparator detects the voltage difference across the first component, it sends a level signal to the processor. When the processor receives the level signal sent by the voltage comparator, it can determine that an external device is connected to the terminal device.
[0114] Exemplarily, the level signal sent by the voltage comparator to the processor may be a high-level signal or a low-level signal. The level signal sent by the voltage comparator is related to the connection method between the positive input terminal and the negative input terminal of the voltage comparator in the circuit, and the embodiments of the present application do not limit this. For example, in the circuit shown in Figure 6, when the positive input terminal of the voltage comparator is the end connecting the first element and the positive connection terminal of the power module, and the negative input terminal is the end connected to the voltage protector, the voltage of the positive input terminal is higher than the voltage of the negative input terminal, and the voltage comparator can output a high-level signal.
[0115] In this way, when the terminal device and the external device are connected through the pogo pin connector, the voltage difference across the first element can be detected by the voltage comparator, so that the accuracy of the detected voltage difference is higher, further improving the accuracy of the access device detection.
[0116] For example, FIG7 shows a schematic diagram of a circuit for detecting the access of an external device including an ADC chip.
[0117] As shown in Figure 7, the terminal device may include a power module, a first component, a pogo pin connector, a protection circuit, an ADC chip, and a processor. The circuit shown in Figure 7 may be a circuit obtained by replacing the voltage comparison unit with an ADC chip. The connection method of the power module, the first component, the pogo pin connector, the protection circuit, the ADC chip, and the processor can be found in the relevant description of Figure 5 and will not be repeated here.
[0118] For example, when an external device is connected to a terminal device via a pogo pin connector, the power module, the first component, and the external device form a pathway, resulting in a voltage difference across the first component. The ADC chip can detect the voltage difference across the first component and compare the two detected voltage differences to determine whether a voltage difference exists across the first component. When the ADC chip detects the voltage difference across the first component, it sends an ADC signal to the processor. When the processor receives the ADC signal sent by the ADC chip, it can determine that an external device is connected to the terminal device.
[0119] Exemplarily, the ADC signal sent by the ADC chip to the processor is a digital signal, and the embodiment of the present application does not specifically limit the ADC signal.
[0120] In this way, when the terminal device and the external device are connected through the pogo pin connector, the voltage difference across the first component can be detected by the ADC chip, so that the accuracy of the detected voltage difference is higher, further improving the accuracy of the access device detection.
[0121] In the embodiment of the present application, the first element may include any one of the following elements: a diode, a reed switch, a magnetic sensitive diode, and a magnetic sensitive switch.
[0122] Different first components have different working modes. The following describes how different first components are connected to the circuits shown in FIG. 3 to FIG. 7 .
[0123] In one possible implementation, the first component may be a diode, which may be connected between the positive connection terminal of the power module and the positive pin of the pogo pin connector. The diode may also be connected between the negative connection terminal of the power module and the negative pin of the pogo pin connector.
[0124] For example, when the diode is connected between the positive connection terminal of the power module and the positive pin of the pogo pin connector, the specific connection method can be: the positive end of the diode is connected to the positive connection terminal of the power module, and the negative end of the diode is connected to the positive pin of the pogo pin connector. When the diode is connected between the negative connection terminal of the power module and the negative pin of the pogo pin connector, the specific connection method can be: the positive end of the diode is connected to the negative pin of the pogo pin connector, and the negative end of the diode is connected to the negative connection terminal of the power module. The embodiments of the present application do not limit the position of the diode in the circuit.
[0125] It is understood that when the terminal device and the external device are connected via the pogo pin connector, the voltage output by the positive terminal of the power module causes the diode to be in a conductive state. Thus, the power module, the diode, and the external device form a pathway. When the processor detects the voltage difference across the diode, it can determine that an external device is connected to the terminal device. The process by which the processor determines that an external device is connected to the terminal device can be found in the description of Figures 3-7 above and will not be repeated here.
[0126] In one possible implementation, the first component may be a reed switch, which may be connected between the positive terminal of the power module and the positive pin of the pogo pin connector. The reed switch may also be connected between the negative terminal of the pogo pin connector and the negative terminal of the power module. The present embodiment does not limit the position of the reed switch in the circuit.
[0127] For example, a magnet can be provided on the external device to make the connection between the external device and the terminal device more stable. When the external device and the terminal device are connected via a pogo pin connector, the external device can be adsorbed on the terminal device via the magnet, and the reed switch senses the magnetic field generated by the magnet and changes from an open state to a closed state. In this way, the power module, the reed switch and the external device form a pathway. When the processor detects the voltage difference between the two ends of the reed switch, it can be determined that an external device is connected to the terminal device. The process of the processor determining that an external device is connected to the terminal device can be found in the relevant descriptions of Figures 3 to 7 above, and will not be repeated here.
[0128] In one possible implementation, the first component may be a magnetic-sensitive diode, which may be connected between the positive connection terminal of the power module and the positive pin of the pogo pin connector. The magnetic-sensitive diode may also be connected between the negative connection terminal of the power module and the negative pin of the pogo pin connector.
[0129] For example, when the magnetic-sensitive diode is connected between the positive connection terminal of the power module and the positive pin of the pogo pin connector, the specific connection method can be: the positive end of the magnetic-sensitive diode is connected to the positive connection terminal of the power module, and the negative end of the magnetic-sensitive diode is connected to the positive pin of the pogo pin connector. When the magnetic-sensitive diode is connected between the negative connection terminal of the power module and the negative pin of the pogo pin connector, the specific connection method can be: the positive end of the magnetic-sensitive diode is connected to the negative pin of the pogo pin connector, and the negative end of the magnetic-sensitive diode is connected to the negative connection terminal of the power module. The embodiment of the present application does not limit the position of the magnetic-sensitive diode in the circuit.
[0130] For example, a magnet can be provided on the external device to further stabilize the connection between the external device and the terminal device. When the external device and the terminal device are connected via a pogo pin connector, the external device can be attracted to the terminal device via the magnet, and the power module, the magnetic sensitive diode, and the external device form a pathway. Thus, when the processor detects a voltage difference between the two ends of the reed switch, it can determine that an external device is connected to the terminal device. The process by which the processor determines that an external device is connected to the terminal device can be found in the relevant description of Figures 3-7 above and will not be repeated here.
[0131] For example, when the external device is attached to the terminal device via a magnet, the magnetic sensitive diode can sense the change in the magnetic field generated by the magnet and reduce the resistance value of the magnetic sensitive diode, so that the magnetic sensitive diode consumes less power.
[0132] In one possible implementation, the first element may be a magnetic switch, which may be connected between the positive terminal of the power module and the positive pin of the pogo pin connector. The magnetic switch may also be connected between the negative terminal of the pogo pin connector and the negative terminal of the power module. The present embodiment does not limit the position of the magnetic switch in the circuit.
[0133] Exemplarily, a magnet can be provided on the external device to make the connection between the external device and the terminal device more stable. When the external device and the terminal device are connected via a pogo pin connector, the external device can be adsorbed on the terminal device via the magnet, and the magnetic switch senses the magnetic field generated by the magnet and changes from an open state to a closed state. In this way, the power module, the magnetic switch and the external device form a pathway, and when the processor detects the voltage difference between the two ends of the reed switch, it can be determined that an external device is connected to the terminal device. The process of the processor determining that an external device is connected to the terminal device can be found in the relevant descriptions of Figures 3 to 7 above, and will not be repeated here.
[0134] It is understandable that the first element may also include other elements with a resistance value less than a certain value. The embodiment of the present application only takes the example of the first element including any one of a diode, a reed switch, a magnetic sensitive diode, and a magnetic sensitive switch.
[0135] In the embodiment of the present application, the pins of the pogo pin connector may be exposed to the air. However, the pins of the live pogo pin connector may be corroded when exposed to the air, which may affect the service life of the pogo pin connector. Since the degree of corrosion of the pins of the pogo pin connector is positively correlated with both time and voltage, when the external device is disconnected from the terminal device, the processor can reduce the voltage value output by the terminal device through the pins of the pogo pin connector. In other words, when the external device is connected to the terminal device through the pogo pin connector, the power supply of the terminal device can output a smaller voltage. When the processor of the terminal device determines that an external device is connected to the terminal device, it can control the power supply of the terminal device to output a larger voltage.
[0136] For example, when an external device is connected to a terminal device, the terminal device may change the voltage value through the following two possible implementations:
[0137] In one possible implementation, such as the circuits shown in Figures 3-7 above, when the external device is connected to the terminal device via a pogo pin connector, the voltage output by the power module may be a first voltage value. When the processor detects a voltage difference across the first component, the processor may control the voltage output by the power module to increase from the first voltage value to a second voltage value. The process by which the processor detects the voltage difference across the first component can be found in the description of the above embodiments and is not further described here.
[0138] For example, when the first component is a diode, the first voltage output by the power module is greater than the conduction voltage of the diode. Thus, when the external device is connected to the terminal device via the pogo pin connector, the first voltage output by the power module can cause the diode to be in a conducting state. The power module, the first component, and the external device form a path, resulting in a voltage difference across the diode.
[0139] For example, when the external device is disconnected from the terminal device and the processor detects that no voltage difference exists across the first component, the processor may control the voltage output by the power module to decrease from the second voltage value to the first voltage value. The process by which the processor detects that no voltage difference exists across the first component is similar to the process by which the processor detects that a voltage difference exists across the first component, and is not further described here.
[0140] In another possible implementation, the power module of the terminal device may include a first power module and a second power module, wherein the voltage output by the first power module is lower than the voltage output by the second power module.
[0141] FIG8 is a schematic diagram of a circuit for detecting access to an external device, including a first power module and a second power module, provided in an embodiment of the present application.
[0142] As shown in Figure 8, the terminal device may include a first power module, a second power module, a first switch, a first element of the second switch, a pogo pin connector, a protection circuit, a voltage comparison unit, and a processor. The first power module includes a first positive connection terminal and a first negative connection terminal, and the second power module includes a second positive connection terminal and a second negative connection terminal.
[0143] As shown in Figure 8, the first switch is connected between the first positive connection terminal of the first power module and the first component, and the second switch is connected between the second positive connection terminal of the second power module and the first component. Of course, the first switch can also be connected between the first negative connection terminal of the first power module and the negative pin of the pogo pin connector, and the second switch can also be connected between the second negative connection terminal of the second power module and the negative pin of the pogo pin connector. The embodiment of the present application does not specifically limit the positions of the first switch and the second switch. The first switch and the second switch are communicatively connected to the processor (not shown in Figure 8).
[0144] The connection method of the first component, pogo pin connector, protection circuit, voltage comparison unit and processor in FIG8 is the same as that in FIG5 and will not be repeated here.
[0145] For example, when the external device is not connected to the terminal device, the first switch may be in an open state and the second switch may be in a closed state. When the external device is connected to the terminal device via a pogo pin connector, the first power module, the first component, and the external device may form a path, and the processor may determine that an external device is connected to the terminal device based on a detected voltage difference across the first component.
[0146] When the processor of the terminal device determines that an external device has been connected to the terminal device, the processor can control the states of the first switch and the second switch to switch the path where the first component is located. For example, in the circuit shown in Figure 8, when the processor determines that an external device has been connected to the terminal device, the processor can control the first switch to a closed state and the second switch to an open state, so that the first component switches from being connected to the path between the first positive connection terminal and the positive pin of the first power module to being connected to the path between the second positive connection terminal and the positive pin of the second power module. In this way, the terminal device can use the second power module with a larger output voltage value to power the external device.
[0147] For example, in the circuit shown in FIG8 , the first element can also be connected between the first negative connection terminal of the first power module and the negative pin of the pogo pin connector. Accordingly, when the processor determines that an external device is connected to the terminal device, the processor can control the first switch to be closed and the second switch to be open, so that the first element switches from being connected to the path between the first negative connection terminal and the negative pin of the first power module to being connected to the path between the second negative connection terminal and the negative pin of the second power module.
[0148] Illustratively, the first power module and the second power module can be applied to any circuit shown in Figures 3 to 8. The embodiment of the present application is illustrated by taking the application of the first power module and the second power module to the circuit shown in Figure 5 as an example, which does not constitute any limitation.
[0149] Exemplarily, when the external device disconnects from the terminal device, the voltage comparison unit detects the absence of a voltage difference across the first component and sends a second signal to the processor. Based on the received second signal, the processor controls the first switch to an open state and the second switch to a closed state. Thus, when the external device disconnects from the terminal device, the first power module connects to the pogo pin connector via the first component, making the pogo pin connector pins less susceptible to corrosion and extending the life of the pogo pin connector.
[0150] For example, when the first component is a diode, the voltage output by the first power module needs to be greater than the diode's conduction voltage. Thus, when the external device is connected to the terminal device via a pogo pin connector, the voltage output by the first power module can cause the diode to be in a conducting state. The first power module, the first component, and the external device can form a path, resulting in a voltage difference across the diode.
[0151] It should be noted that the above embodiments are all described using the example of a situation where the power module is constantly supplying power to an external device. To further improve the situation where the pogo pin connector pins are susceptible to corrosion due to the constant power supply, the present embodiment also provides a circuit for detecting when the power module is not constantly supplying power to the external device when no external device is connected to the terminal device. As shown in Figure 9, Figure 9 is a schematic diagram of a circuit for detecting when an external device is disconnected from a terminal device, provided in an embodiment of the present application.
[0152] As shown in Figure 9, the terminal device may include a power module, a first component, a pogo pin connector, and a processor. The communication pins of the pogo pin connector are connected to the processor. The connections of other components can be found in the relevant description of Figure 3 and will not be repeated here.
[0153] For example, in the circuit shown in Figure 9, when the external device is connected to the terminal device through the pogo pin connector, the processor can detect the presence of an external device connected to the terminal device through the communication pin of the pogo pin connector, and control the power module to output voltage to power the external device.
[0154] Furthermore, when the external device is disconnected from the terminal device, the processor can detect that there is no voltage difference across the first component, and the processor can determine that the external device is disconnected from the terminal device and control the power supply module to not output voltage.
[0155] In this way, the processor can accurately determine that the external device is disconnected from the terminal device, and control the power module to not output voltage, so that the pins of the pogo pin connector are not easily corroded.
[0156] An embodiment of the present application also provides a method for detecting access of an external device, which is applied to the terminal device described in the above embodiment.
[0157] Exemplarily, the method includes: when the processor of the terminal device detects a voltage difference between the two ends of the first component, determining that an external device is connected to the terminal device. The circuit of the terminal device corresponding to the implementation of this method can be shown in Figure 3 and will not be repeated here.
[0158] In one possible implementation, the method for detecting the connection of an external device may further include: when the voltage comparison unit detects a voltage difference between two ends of the first component, sending a first signal to the processor; and when the processor receives the first signal, determining that an external device is connected to the terminal device. The circuitry of the terminal device corresponding to this method is shown in FIG5 and is not further described here.
[0159] In one possible implementation, the voltage comparison unit may include a voltage comparator, and the method for detecting the connection of an external device may further include: when the voltage comparator detects a voltage difference between two ends of the first component, sending a level signal to the processor; and when the processor receives the level signal, determining that an external device is connected to the terminal device. The circuitry of the terminal device corresponding to this method is shown in FIG6 and is not further described here.
[0160] In one possible implementation, the voltage comparison unit may include an ADC chip, and the method for detecting the connection of an external device may further include: when the ADC chip detects a voltage difference between two ends of the first component, sending an ADC signal to a processor; and when the processor receives the ADC signal, determining that an external device is connected to the terminal device. The circuitry of the terminal device corresponding to this method is shown in FIG. 7 and is not further described here.
[0161] In a possible implementation, the method for detecting the connection of an external device further includes: when a voltage difference is detected across the first component, the processor controls the voltage output by the power module to increase from a first voltage value to a second voltage value.
[0162] In one possible implementation, the power module may include a first power module and a second power module, and the voltage output by the first power module is less than the voltage output by the second power module. The method for detecting the access of an external device may also include: when it is detected that there is a voltage difference between the two ends of the first component, and the first component is connected to the path between the first positive connection terminal and the positive pin of the first power module, the processor switches the first component to be connected to the path between the second positive connection terminal and the positive pin of the second power module. Alternatively, when it is detected that there is a voltage difference between the two ends of the first component, and the first component is connected to the path between the first negative connection terminal and the negative pin of the first power module, the processor switches the first component to be connected to the path between the second negative connection terminal and the negative pin of the second power module. The circuit of the corresponding terminal device when implementing this method can be shown in Figure 8, which will not be repeated here.
[0163] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the method steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0164] In the embodiment of the present application, the functional modules of the apparatus for implementing the method of external device access detection can be divided according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.
[0165] Figure 10 is a schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application. As shown in Figure 10, the terminal device includes a processor 1001, a communication line 1004 and at least one communication interface (communication interface 1003 is exemplified in Figure 10).
[0166] The processor 1001 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a SOC, an MCU, or one or more integrated circuits used to control the execution of the program of the present application.
[0167] Communications link 1004 may include circuitry to transmit information between the aforementioned components.
[0168] The communication interface 1003 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.
[0169] Possibly, the terminal device may further include a memory 1002 .
[0170] The memory 1002 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may be independent and connected to the processor via a communication line 1004. The memory may also be integrated with the processor.
[0171] Memory 1002 is used to store computer-executable instructions for executing the solution of the present application, and is controlled by processor 1001 for execution. Processor 1001 is used to execute computer-executable instructions stored in memory 1002. For example, in an embodiment of the present application, when a voltage difference is detected across the first component, processor 1001 may determine that an external device is connected to the terminal device.
[0172] Possibly, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, and the embodiments of the present application do not specifically limit this.
[0173] In a specific implementation, as an embodiment, the processor 1001 may include one or more CPUs, such as CPU0 and CPU1 in FIG10 .
[0174] In a specific implementation, as an embodiment, the terminal device may include multiple processors, such as processor 1001 and processor 1005 in Figure 10. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0175] FIG11 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip 110 includes one or more (including two) processors 111 , a communication line 112 , a communication interface 113 , and a memory 114 .
[0176] In some embodiments, the memory 114 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
[0177] The method described in the above embodiment of the present application can be applied to the processor 111, or implemented by the processor 111. The processor 111 may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above method can be completed by hardware integrated logic circuits in the processor 111 or instructions in software form. The above processor 111 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components.
[0178] The processor 111 , the memory 114 , and the communication interface 113 can communicate with each other via the communication line 112 .
[0179] In the above embodiment, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory or downloaded and installed in the memory in the form of software.
[0180] The present application also provides a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include magnetic media (e.g., floppy disk, hard disk or tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid state disk (SSD)).
[0181] The present application also provides a computer-readable storage medium. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one location to another. The storage medium may be any target medium that can be accessed by a computer.
[0182] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; computer-readable media may include magnetic disk storage or other magnetic disk storage devices. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically using lasers.
[0183] In conjunction with the terminal device described in the above embodiment, an embodiment of the present application further provides an external device access detection system, which includes an external device and a terminal device. The external device and the terminal device can be connected via a pogo pin connector, and the terminal device can power the external device via the pogo pin connector.
[0184] For example, the external device may be a keyboard or other device, which is not limited in the present embodiment. The terminal device may be a tablet computer or other device, which may be specifically described in the above embodiment, which is not limited in the present embodiment.
[0185] It can be understood that when the external device is a keyboard and the terminal device is a tablet computer, the external device access system provided in the embodiment of the present application can be shown in Figure 2.
[0186] In an embodiment of the present application, when an external device is connected to a terminal device via a pogo pin connector, the terminal device can determine that an external device is connected to the terminal device and can use the power module in the terminal device to power the external device via the pogo pin connector. The method for the terminal device to determine that an external device is connected to the terminal device can be found in the above embodiment and will not be repeated here.
[0187] It should be noted that the above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A terminal device, characterized in that: The terminal device comprises: a power module, a first component, a pogo pin connector and a processor; the first component is a component with a resistance value less than a certain value; The power module includes a positive connection terminal and a negative connection terminal, the pogo pin connector includes a positive pin, a negative pin and a communication pin, and the communication pin is used for the terminal device to communicate with an external device; The first element is connected to the path between the positive electrode connection terminal and the positive electrode pin, or the first element is connected to the path between the negative electrode connection terminal and the negative electrode pin; The processor is configured to determine that an external device is connected to the terminal device when a voltage difference exists across the first element; The processor is further configured to control the voltage output by the power module to increase from a first voltage value to a second voltage value when a voltage difference exists across the first element.
2. The terminal device according to claim 1, characterized in that: The terminal device also includes a protection circuit and a voltage comparison unit; One end of the protection circuit is connected to one end of the first element, the other end of the protection circuit is connected to the first end of the voltage comparison unit, the second end of the voltage comparison unit is connected to the other end of the first element, and the third end of the voltage comparison unit is connected to the processor; The voltage comparison unit is used to collect voltage values at both ends of the first element, compare the two collected voltage values, determine the voltage difference at both ends of the first element, and send a first signal to the processor when detecting that there is a voltage difference at both ends of the first element; The processor is specifically configured to determine, when receiving the first signal, that an external device is connected to the terminal device.
3. The terminal device according to claim 2, characterized in that: The voltage comparison unit includes a voltage comparator or an analog-to-digital conversion ADC chip.
4. The terminal device according to claim 1, characterized in that: The terminal device also includes a protection circuit; One end of the protection circuit is connected to one end of the first element, the other end of the protection circuit is connected to the first input end of the processor, and the second input end of the processor is connected to the other end of the first element; The processor is specifically used to collect voltage values across the first component, compare the two collected voltage values, determine the voltage difference across the first component, and when a voltage difference is detected across the first component, determine that an external device is connected to the terminal device.
5. The terminal device according to any one of claims 1 to 4, characterized in that: The first element includes any one of the following: a diode, a reed switch, a magnetic sensitive diode, and a magnetic sensitive switch.
6. The terminal device according to claim 5, characterized in that: When the first element includes a diode, the first voltage value is greater than a conduction voltage of the diode.
7. The terminal device according to claim 5, characterized in that: The power supply module comprises a first power supply module and a second power supply module, and the voltage output by the first power supply module is smaller than the voltage output by the second power supply module; The processor is further used to control the first element to switch to a path connected to a second positive connection terminal and the positive pin of the second power module when there is a voltage difference across the first element and the first element is connected to a path between the first positive connection terminal and the positive pin of the first power module; or, when it is detected that there is a voltage difference across the first element and the first element is connected to a path between the first negative connection terminal and the negative pin of the first power module, control the first element to switch to a path connected to a second negative connection terminal and the negative pin of the second power module.
8. The terminal device according to claim 7, characterized in that: When the first element includes a diode, the voltage output by the first power module is greater than the conduction voltage of the diode.
9. The terminal device according to any one of claims 1 to 8, characterized in that: The processor is further configured to determine that the external device is not connected to the terminal device when there is no voltage difference between the two ends of the first element, and control the power module not to output voltage.
10. An external device access detection system, characterized in that: It comprises an external device and a terminal device as described in any one of claims 1 to 9, wherein the external device and the terminal device are connected via a pogo pin connector, and the terminal device supplies power to the external device via the pogo pin connector.
11. An external device access detection system, characterized in that: It includes an external device and a terminal device, wherein the terminal device includes: a power module, a first component, a pogo pin connector and a processor; the first component is a component with a resistance value less than a certain value; The power module includes a positive connection terminal and a negative connection terminal, and the pogo pin connector includes a positive pin, a negative pin and a communication pin; The first element is connected to the path between the positive electrode connection terminal and the positive electrode pin, or the first element is connected to the path between the negative electrode connection terminal and the negative electrode pin; The external device is used to access the terminal device through the pogo pin connector; The processor is used to determine that the external device is connected to the terminal device when there is a voltage difference between the two ends of the first element, and to communicate with the external device through the communication pin.
12. The external device access detection system according to claim 11, characterized in that: The terminal device also includes a protection circuit and a voltage comparison unit; One end of the protection circuit is connected to one end of the first element, the other end of the protection circuit is connected to the first end of the voltage comparison unit, the second end of the voltage comparison unit is connected to the other end of the first element, and the third end of the voltage comparison unit is connected to the processor; The voltage comparison unit is used to collect voltage values at both ends of the first element, compare the two collected voltage values, determine the voltage difference at both ends of the first element, and send a first signal to the processor when detecting that there is a voltage difference at both ends of the first element; The processor is specifically configured to determine, when receiving the first signal, that an external device is connected to the terminal device.
13. The external device access detection system according to claim 11, characterized in that: The terminal device also includes a protection circuit; One end of the protection circuit is connected to one end of the first element, the other end of the protection circuit is connected to the first input end of the processor, and the second input end of the processor is connected to the other end of the first element; The processor is specifically used to collect voltage values across the first component, compare the two collected voltage values, determine the voltage difference across the first component, and when a voltage difference is detected across the first component, determine that an external device is connected to the terminal device.
14. The external device access detection system according to any one of claims 11 to 13, characterized in that: The processor is further configured to control the voltage output by the power module to increase from a first voltage value to a second voltage value when a voltage difference is detected between the two ends of the first element.
15. The external device access detection system according to claim 14, characterized in that: The first element includes any one of the following: a diode, a reed switch, a magnetic sensitive diode, a magnetic sensitive switch; When the first element includes a diode, the first voltage value is greater than a conduction voltage of the diode.
16. The external device access detection system according to any one of claims 11 to 13, characterized in that: The power supply module comprises a first power supply module and a second power supply module, and the voltage output by the first power supply module is smaller than the voltage output by the second power supply module; The processor is further used to control the first element to switch to a path connected to a second positive connection terminal and the positive pin of the second power module when there is a voltage difference across the first element and the first element is connected to a path between the first positive connection terminal and the positive pin of the first power module; or, when it is detected that there is a voltage difference across the first element and the first element is connected to a path between the first negative connection terminal and the negative pin of the first power module, control the first element to switch to a path connected to a second negative connection terminal and the negative pin of the second power module.
17. The external device access detection system according to claim 16, characterized in that: The first element includes any one of the following: a diode, a reed switch, a magnetic sensitive diode, a magnetic sensitive switch; When the first element includes a diode, the voltage output by the first power module is greater than the conduction voltage of the diode.
18. The external device access detection system according to any one of claims 11 to 17, characterized in that: The external device includes a keyboard.
19. The external device access detection system according to any one of claims 11 to 18, characterized in that: The processor is further configured to determine that the external device is not connected to the terminal device when there is no voltage difference between the two ends of the first element, and control the power module not to output voltage.
