An electronic device

By short-circuiting pins in the connector of electronic equipment to form a detection circuit, the problem of difficulty in detecting abnormal connection between peripheral equipment and circuit boards is solved, non-destructive connection status judgment is achieved, and troubleshooting efficiency is improved.

CN117827558BActive Publication Date: 2024-10-18HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311626796.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-18
Publication Date
2024-10-18
Estimated Expiration
2042-08-18

AI Technical Summary

Technical Problem

During the use of electronic equipment, abnormal connections between peripheral devices and circuit boards are difficult to detect, resulting in failure causes that cannot be determined and inspections without damaging the hardware.

Method used

By short-circuiting two pins in the connector, a detection circuit is formed from the detection pin of the processor to the ground point. The on and off of the detection circuit is used to determine whether the connection between the peripheral device and the circuit board is abnormal, achieving non-destructive detection.

Benefits of technology

It can accurately determine the connection status between peripheral devices and circuit boards without damaging the electronic equipment hardware, eliminate the cause of the fault, and improve the efficiency of troubleshooting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117827558B_ABST
    Figure CN117827558B_ABST
Patent Text Reader

Abstract

The present application provides an electronic device, which relates to the technical field of electronic products. The electronic device includes: a circuit board, a peripheral device and a connector; the connector includes a first connector and a second connector that are plugged into each other, the first connector includes a first pin and a second pin, the first pin is connected to the detection pin of the processor, and the second pin is connected to the ground point; the second connector includes a third pin that docks with the first pin, and a fourth pin that docks with the second pin, the third pin and the fourth pin are short-circuited, forming a detection circuit from the detection pin to the ground point; the processor determines whether the connection between the peripheral device and the circuit board is abnormal through the detection result of the detection circuit. The processor can detect the detection circuit through the detection pin to determine whether the connection between the peripheral device and the circuit board is abnormal, so that it can detect whether the connection between the peripheral device and the circuit board is normal without destroying the hardware state of the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese patent application submitted to the State Intellectual Property Office on August 18, 2022, with application number 202210992324.2 and application name “An electronic device”. Technical Field

[0002] The present application relates to the technical field of electronic products, and in particular to an electronic device. Background Art

[0003] At present, there are more and more peripheral devices in electronic devices, and the peripheral devices are electrically connected to the circuit boards in the electronic devices. During the use of electronic devices, when a peripheral device fails, the relevant functions of the electronic device cannot be used. When the connection between the peripheral device and the circuit board is abnormal, it will cause the peripheral device to fail; when the peripheral device itself is abnormal, it will also cause the peripheral device to fail. When the peripheral device fails, it is necessary to detect whether the connection between the peripheral device and the circuit board is normal to determine whether the cause of the failure of the peripheral device is caused by an abnormal connection between the peripheral device and the circuit board, or an abnormality in the peripheral device itself.

[0004] However, for electronic devices that have been installed, it is impossible to check the connection between the peripheral device and the circuit board without destroying the hardware status of the electronic device, resulting in an inability to determine whether the connection between the peripheral device and the circuit board is normal, and thus, when the peripheral device fails, it is impossible to troubleshoot the cause of the failure. Therefore, a detection method is urgently needed that can detect whether the connection between the peripheral device and the circuit board is normal without destroying the hardware status of the electronic device. Summary of the invention

[0005] The present application provides an electronic device, which forms a detection circuit from a detection pin of a processor to a ground point by short-circuiting two pins in a connector. By detecting the detection circuit, it is possible to detect whether there is an abnormal connection between a peripheral device and a circuit board without destroying the hardware status of the electronic device.

[0006] In a first aspect, an electronic device is provided, comprising a circuit board, a peripheral device and a connector; the connector comprises a first connector and a second connector which are plugged into each other, the first connector is arranged on the circuit board, and the second connector is connected to the peripheral device; a processor is arranged on the circuit board, the first connector comprises a first pin and a second pin, the first pin is connected to a detection pin of the processor, and the second pin is connected to a ground point on the circuit board; the second connector comprises a third pin which is connected to the first pin, and a fourth pin which is connected to the second pin, and the third pin is short-circuited with the fourth pin.

[0007] In the embodiment of the present application, a first pin and a second pin are set in the first plug-in part of the connector, a third pin that is connected to the first pin and a fourth pin that is connected to the second pin are short-circuited in the second plug-in part, the first pin is connected to the detection pin of the processor, and the second pin is connected to the grounding point on the circuit board, so as to form a detection circuit from the detection pin to the grounding point. The processor can detect the detection circuit through the detection pin, and determine whether the connection between the peripheral device and the circuit board is abnormal according to the detection result, so that whether the connection between the peripheral device and the circuit board is normal can be detected without destroying the hardware state of the electronic device.

[0008] Optionally, the electronic device includes a plurality of peripheral devices, and each peripheral device corresponds to the connector; the first pins and the second pins in the plurality of connectors are sequentially connected in series between the detection pin and the ground point.

[0009] In the embodiment of the present application, the connectors corresponding to the plurality of peripheral devices are connected in series through the first pin and the second pin, so as to form a detection circuit corresponding to the plurality of peripheral devices, so that the processor can detect the connection between the plurality of peripheral devices and the circuit board through one detection pin. When the electronic device includes a large number of peripheral devices, and it is necessary to troubleshoot the cause of each peripheral device when the failure occurs, the plurality of peripheral devices can share the same detection pin, and there is no need to set a separate detection pin for each peripheral device, which can reduce the number of pins used by the processor.

[0010] Optionally, the electronic device includes multiple peripheral devices and the connector corresponding to each peripheral device; the detection pin is an analog pin, and the analog pin is connected to the power supply on the circuit board through a pull-up resistor element; the first pin in multiple connectors is connected in parallel to the analog pin, and the second pin in multiple connectors is connected to the ground point through corresponding pull-down resistor elements.

[0011] In the embodiment of the present application, the first pins in the connectors corresponding to the plurality of peripheral devices are connected in parallel to the same detection pin, and the second pin in each connector is connected to the ground point by pulling down the resistor element, so as to form a detection circuit corresponding to each peripheral device, so that the processor can detect the connection between the plurality of peripheral devices and the circuit board through one detection pin. When the electronic device includes a large number of peripheral devices, and it is necessary to troubleshoot the cause of the failure when each peripheral device fails, the plurality of peripheral devices can share the same detection pin, and there is no need to set a separate detection pin for each peripheral device, which can reduce the pin usage of the processor.

[0012] Optionally, the second pins in the multiple connectors are respectively connected to the ground point through the pull-down resistor elements with different resistance values; when the actual voltage is higher than the voltage threshold, the processor determines a target reference voltage matching the actual voltage from multiple reference voltages, and determines that the connection between the target peripheral device corresponding to the target reference voltage and the circuit board is abnormal; wherein the target reference voltage includes the voltage of the analog pin when the connection between the target peripheral device and the circuit board is abnormal and the connection between other peripheral devices and the circuit board is normal.

[0013] In an embodiment of the present application, when the detection pin is an analog pin and the second pin in a plurality of connectors is connected to a ground point through a pull-down resistor with different resistance values, the processor can determine the target peripheral device with an abnormal connection with the processor among a plurality of peripheral devices based on the actual voltage of the analog pin. While reducing the pin usage of the processor, the peripheral device with an abnormal connection with the circuit board can be determined from a plurality of peripheral devices, and the cause of the failure of the peripheral device can be accurately eliminated.

[0014] Optionally, the detection pin is an analog pin, the analog pin is connected to the power supply on the circuit board through a pull-up resistor element, and the second pin is connected to the ground point through a pull-down resistor element.

[0015] Optionally, the first pin and the third pin are arranged at one end of the connector, and the second pin and the fourth pin are arranged at the other end of the connector.

[0016] Optionally, the first pin and the third pin are arranged at diagonally opposite corners to the second pin and the fourth pin.

[0017] In the embodiment of the present application, a pair of pins consisting of the first pin and the third pin is set at one end of the connector, and another pair of pins consisting of the second pin and the fourth pin is set diagonally. During the detection process, if the detection circuit is determined to be turned on, it can be determined that the upper and lower ends and the left and right ends of the connector are in normal contact. When troubleshooting the cause of the fault, the contact conditions of the left and right ends of the connector and the contact conditions of the upper and lower ends can be detected at the same time. When the peripheral device fails and the detection circuit is turned on, the fault causes of abnormal contact between the left and right ends of the connector and abnormal contact between the upper and lower ends can be eliminated.

[0018] Optionally, the peripheral device is connected to the second connector via a flexible circuit board, and a plurality of leads are provided on the flexible circuit board; the third pin and the fourth pin are short-circuited via a short-circuit wire, and the short-circuit wire surrounds the plurality of leads and is arranged on the flexible circuit board.

[0019] In this embodiment, when the peripheral device fails, if the detection circuit is determined to be turned on and the connection between the peripheral device and the circuit board is normal, it can be determined that both the left and right ends of the connector are in normal contact and both the upper and lower ends are in normal contact, and it can also be determined that the left side of the flexible circuit board is not torn and the right side is not torn. While eliminating the causes of abnormal contact between the upper and lower ends and the left and right ends of the peripheral device, the causes of tearing on the left side and tearing on the right side of the flexible circuit board can be eliminated.

[0020] Optionally, the peripheral device is connected to the second connector via a flexible circuit board, and a plurality of leads are provided on the flexible circuit board;

[0021] The third pin and the fourth pin are short-circuited by a short-circuit wire, and the short-circuit wire is arranged on the flexible circuit board and extends from one side of the plurality of leads to the peripheral device.

[0022] Optionally, the third pin and the fourth pin are short-circuited via a short-circuit wire, and the short-circuit wire is disposed on the second connector.

[0023] Optionally, the detection pin is a general input / output pin or an analog pin.

[0024] Optionally, the plurality of peripheral devices are peripheral devices with the same functions.

[0025] Optionally, the detection pin is connected to a power supply on the circuit board through a pull-up resistor element.

[0026] Optionally, the connector is a board-to-board connector or a zero insertion force connector.

[0027] Optionally, the circuit board is a main board, a sub-board or a small board. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a schematic block diagram of the interior of an electronic device in the related art.

[0029] Figure 2 It is a schematic diagram of the internal structure of an electronic device in the related art.

[0030] Figure 3 It is a schematic diagram of the overall structure of an electronic device provided in an embodiment of the present application.

[0031] Figure 4 It is a schematic block diagram of the interior of an electronic device provided in an embodiment of the present application.

[0032] Figure 5 It is a schematic diagram of the internal structure of an electronic device provided in an embodiment of the present application.

[0033] Figure 6It is a schematic diagram of a detection process provided in an embodiment of the present application.

[0034] Figure 7 This is a schematic diagram of the internal structure of another electronic device provided in an embodiment of the present application.

[0035] Figure 8 This is a schematic diagram of the internal structure of another electronic device provided in an embodiment of the present application.

[0036] Fig. 9 This is a schematic diagram of the internal structure of another electronic device provided in an embodiment of the present application.

[0037] Fig.10 This is a schematic diagram of the internal structure of another electronic device provided in an embodiment of the present application.

[0038] Fig.11 This is a schematic diagram of the internal structure of another electronic device provided in an embodiment of the present application.

[0039] Fig.12 This is a schematic block diagram of the interior of another electronic device provided in an embodiment of the present application.

[0040] Fig.13 This is a schematic block diagram of the interior of another electronic device provided in an embodiment of the present application.

[0041] Fig.14 This is a schematic block diagram of the interior of another electronic device provided in an embodiment of the present application.

[0042] Fig.15 It is a circuit schematic diagram provided in an embodiment of the present application.

[0043] Fig.16 This is another detection process schematic diagram provided in an embodiment of the present application.

[0044] Reference numerals:

[0045] 1. Circuit board; 11. Grounding point; 12. Power supply; 13. Pull-up resistor element; 14. Pull-down resistor element; 2. Peripheral device; 3. Connector; 31. First connector; 311. First pin; 312. Second pin; 32. Second connector; 321. Third pin; 322. Fourth pin; 323. Short-circuit wire; 4. Processor; 5. Flexible circuit board; 51. Lead wire. DETAILED DESCRIPTION

[0046] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0047] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0048] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installation" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or mutual communication; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0049] In the description of the present application, it should be understood that the terms "upper", "lower", "side", "front", "rear", etc. indicate orientations or positional relationships based on the installation, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0050] In the description of this application, it should be noted that the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0051] It should also be noted that, in the embodiments of the present application, the same figure mark is used to represent the same component or the same part. For the same parts in the embodiments of the present application, the figure may only mark one of the parts or components as an example. It is understood that the figure mark also applies to other identical parts or components.

[0052] With the development of science and technology and the progress of economy, electronic devices such as mobile phones, tablet computers, laptops, handheld computers, wearable devices, virtual reality devices, etc. have been rapidly popularized, which has greatly promoted the development of society and facilitated people's lives. Electronic devices usually include a housing and various electronic components located in the housing, such as a printed circuit board (PCB), a processor on the circuit board, a battery, a camera, a flash, a microphone, a speaker, etc., but are not limited to these.

[0053] Among them, the various electronic components in the electronic equipment include electronic components arranged on the circuit board and peripheral devices (Peripherals) arranged around the circuit board. The peripheral device is usually connected to the circuit board through a connector. The connector includes two plug-ins that match each other, one plug-in is a plug, and the other plug-in is a socket. Each plug-in includes a plurality of pins. One plug-in in the connector is installed on the circuit board, and the other plug-in is connected to the peripheral device. The plug-in set on the circuit board can be called a first plug-in, and the plug-in connected to the peripheral device can be called a second plug-in.

[0054] Figure 1 is a schematic block diagram of an electronic device in the related art. Figure 2 It is a schematic diagram of the internal structure of an electronic device in the related art. The electronic device includes a circuit board 1, a peripheral device 2 and a connector 3. A processor 4 is arranged on the circuit board 1. The connector 3 includes a first connector 31 and a second connector 32. The first connector 31 is mounted on the circuit board 1, and the second connector 32 is connected to the peripheral device 2 through a flexible circuit board 5. A plurality of leads are printed on the flexible circuit board 5. One end of each lead is connected to a pin in the second connector 32, and the other end is connected to the peripheral device 2. The rectangular frame 310 in the first connector 31 represents the pin in the first connector 31, and the rectangular frame 320 in the second connector 32 represents the pin in the second connector 32. The two pins connected by the dotted line 61 represent the two pins that are connected to each other in the first connector 31 and the second connector 32. When the first connector 31 and the second connector 32 are plugged and matched to form the connector 3, the two pins that are connected to each other in the first connector 31 and the second connector 32 are in contact and connected to realize the electrical connection between the peripheral device 2 and the circuit board 3.

[0055] During the installation process of electronic equipment, the two connectors of the connector are manually fastened together, and there may be a situation where the fastening is not in place, resulting in abnormal contact between the two connectors, that is, abnormal connector contact. In addition, during the use of electronic equipment, when the electronic equipment is subjected to vibration or other external forces, the two connectors may become loose, resulting in abnormal connector contact. When the connector contact is abnormal, the two butt-jointed pins in the two connectors cannot be in contact and connected, resulting in the failure of the peripheral device to connect normally with the circuit board, which may cause peripheral device failure. In actual applications, when the peripheral device is abnormal due to its own quality factors or other factors, it will also cause peripheral device failure.

[0056] After the electronic device is installed, when a peripheral device fails, it is impossible to check the peripheral device and the connector without destroying the hardware state of the electronic device, resulting in the inability to determine whether the cause of the failure is caused by an abnormality in the peripheral device itself or an abnormal connection between the peripheral device and the circuit board. Therefore, when the peripheral device fails, it is necessary to detect whether the connection between the peripheral device and the circuit board is abnormal. When the detection determines that the connection between the peripheral device and the circuit board is abnormal, it is likely that the failure of the peripheral device is caused by the abnormal connection between the peripheral device and the circuit board. On the contrary, when the detection determines that the connection between the peripheral device and the circuit board is normal, the cause of the failure of the abnormal connection between the peripheral device and the circuit board can be excluded, and it is determined that the failure of the peripheral device is caused by an abnormality in the peripheral device itself. Therefore, there is an urgent need for a detection method that can detect whether the connection between the peripheral device and the circuit board is normal without destroying the hardware state of the electronic device, so as to investigate the cause of the failure when the peripheral device fails.

[0057] In view of this, an embodiment of the present application provides an electronic device, which includes a circuit board, a peripheral device and a connector, and a processor is provided on the circuit board. A detection circuit from a detection pin of the processor to a ground point is formed by pins in the connector, one end of the detection circuit is connected to the detection pin, and the other end is connected to the ground point. The processor can detect the on-off of the detection circuit through the detection pin, and judge whether the connection between the peripheral device and the circuit board is abnormal according to the on-off of the detection circuit, so that the processor can detect whether the connection between the peripheral device and the circuit board is abnormal without destroying the hardware state of the electronic device.

[0058] Optionally, the electronic device provided in the embodiment of the present application may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a wearable device, a virtual reality device or other electronic device, but is not limited thereto.

[0059] Figure 31 is a schematic diagram of the overall structure of an electronic device provided in an embodiment of the present application, wherein the electronic device comprises a housing 7 and a display screen 8, wherein the display screen 8 is mounted on the housing 7. The housing 7 forms the appearance of the electronic device, and the housing 7 may be a metal housing, such as magnesium alloy, aluminum alloy, stainless steel, or other metals. In addition, it may also be a plastic housing, a glass housing, a ceramic housing, etc., but is not limited thereto.

[0060] like Figure 3 As shown, the housing 7 includes a frame 71 and a back cover 72, the back cover 72 is fixedly connected to the rear end surface of the frame 71, and the display screen 8 is fixedly connected to the front end surface of the frame 71. A middle frame (not shown in the figure) is also provided in the housing 7, the middle frame is connected to the frame 71, the display screen 8 is fixedly attached to the front side of the middle frame, and an installation cavity is formed between the rear side of the middle frame and the back cover 72, and a circuit board, a processor provided on the circuit board, a battery, and various electronic components such as a camera, a flash, a microphone, and a speaker are installed in the installation cavity, but it is not limited thereto.

[0061] Among them, the circuit board, also known as the circuit board, printed circuit board or printed circuit board, is the basic carrier for the electrical connection of electronic components. Its main function is to support electronic components and interconnect electronic components. According to the number of layers, circuit boards usually include single-sided boards, double-sided boards and multi-layer boards. According to whether they can bend and deform, circuit boards are divided into flexible printed circuits (FPC), rigid circuit boards (rigid boards) and soft-rigid boards. Flexible circuit boards are printed circuit boards made of flexible insulating substrates (such as polyimide or polyester film), and are also commonly referred to as flexible circuit boards or soft boards. Flexible circuit boards can be bent, wound, and folded freely, and can be arranged arbitrarily according to the requirements of spatial layout, so as to achieve the integration of component assembly and wire connection.

[0062] Taking a mobile phone as an example, the circuit board includes a main board and a small board, and the main board and the small board are arranged between the middle frame and the back cover 72. The main board is provided with a system on chip (SoC) and a power management chip, etc., and a processor can be arranged in the system on chip. LED lights, speakers, microphones, and universal serial bus (USB) interfaces, etc. can be arranged on the small board, and the small board can be electrically connected to the main board through an FPC. Among them, when the mobile phone is a folding mobile phone, the circuit board also includes a sub-board, the main board is arranged between the middle frame and the back cover corresponding to one of the display screens, and the sub-board is arranged between the middle frame and the back cover corresponding to the other display screen, and the main board and the sub-board are connected through a connector.

[0063] The processor may include a central processing unit (CPU), 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) and other types of processors, but is not limited thereto.

[0064] Peripheral devices such as Figure 3 The display screen 8 is shown, and the fingerprint module 721 and the camera 722 are arranged on the back cover 72, but are not limited thereto. Peripheral devices are usually connected to the circuit board through connectors, such as zero insertion force (ZIF) connectors and board to board (BTB) connectors.

[0065] For example, Figure 4 is a schematic block diagram of an electronic device provided in an embodiment of the present application. Figure 5 It is a schematic diagram of the interior of an electronic device provided by an embodiment of the present application, wherein the electronic device includes a circuit board 1, a peripheral device 2 and a connector 3; the connector 3 includes a first connector 31 and a second connector 32 that are plugged into each other, the first connector 31 is arranged on the circuit board 1, and the second connector 32 is connected to the peripheral device 2; a processor 4 is arranged on the circuit board 1, the first connector 31 includes a first pin 311 and a second pin 312, the first pin 311 is connected to the detection pin of the processor 4, and the second pin 312 is connected to the ground point 11 on the circuit board 1; the second connector 32 includes a third pin 321 that is connected to the first pin 311, and a fourth pin 322 that is connected to the second pin 312, and the third pin 321 is short-circuited with the fourth pin 322.

[0066] Among them, since the first pin 311 is connected to the detection pin, the second pin 312 is connected to the ground point, and the third pin 321 and the fourth pin 322 are short-circuited, a detection circuit from the detection pin to the ground point 11 can be formed; the processor 4 can detect the detection circuit and determine whether there is an abnormal connection between the peripheral device and the circuit board based on the detection results.

[0067] Optionally, the circuit board provided in the embodiment of the present application may be a main board or a small board. When the electronic device is a foldable electronic device (such as a mobile phone), the circuit board may also be a sub-board. The circuit board may include but is not limited to the main board, small board and sub-board in the above examples.

[0068] Optionally, the connector provided in the embodiment of the present application may be a BTB connector or a ZIF connector, but is not limited thereto.

[0069] Optionally, the peripheral device provided in the embodiment of the present application may be a display screen, a camera and a fingerprint module, as well as a main board, a small board or a sub-board of an electronic device.

[0070] For example, the third pin 321 and the fourth pin 322 can be short-circuited by a short-circuit wire 323, and the short-circuit wire 323 can be provided on the second connector 32. The first connector 31 also includes other pins in addition to the first pin 311 and the second pin 312. Figure 2 The second connector 32 also includes other pins except the third pin 321 and the fourth pin 322, and the other pins are the same as those shown in FIG. Figure 2 Pinout 320 is shown to be identical.

[0071] In this embodiment, the first pin 311 is connected to the third pin 321, and the second pin 312 is connected to the fourth pin 322. Since the third pin 321 and the fourth pin 322 are short-circuited, a detection circuit can be formed starting from the detection pin of the processor 4, first passing through the connected first pin 311 and the third pin 321, then passing through the connected second pin 312 and the fourth pin 322, and finally reaching the grounding point 11. One end of the detection circuit is the detection pin, and the other end is the grounding point. The first pin 311 and the third pin 321 are connected in series in the middle, and the second pin 312 and the fourth pin 322 are connected in series.

[0072] When the connector 3 is in normal contact, the first pin 311 is in contact with the third pin 321, the second pin 312 is in contact with the fourth pin 322, and the other pins of the first connector 31 except the first pin 311 and the second pin 312 are respectively in contact with a corresponding pin of the second connector 32. At this time, the normal connection between the peripheral device 2 and the circuit board 1 can be achieved, and the detection circuit is in a conducting state. Figure 5 The middle dotted line 62 indicates that the first pin 311 is in contact with the third pin 321 , and the dotted line 63 indicates that the second pin 312 is in contact with the fourth pin 322 .

[0073] On the contrary, when the contact of connector 3 is abnormal, the contact connection between the first pin 311 and the third pin 321 is disconnected, the contact connection between the second pin 312 and the fourth pin 322 is disconnected, the detection circuit is in a disconnected state, and the contact connection between the other corresponding two pins in the first connector 31 and the second connector 32 is also disconnected, and the connection between the peripheral device 2 and the circuit board 1 is abnormal.

[0074] Optionally, the detection pin can be a general-purpose input / output pin in a plurality of general-purpose input / output (GPIO) pins of the processor. When the connector 3 contacts normally, the detection circuit is turned on, so that the detection pin is short-circuited and connected to the ground point 11, and the ground point 11 can pull the voltage of the detection pin down to a low level. And when the connector 3 contacts abnormally, the contact connection between the first pin 311 and the third pin 321 is disconnected, or the contact connection between the second pin 312 and the fourth pin 322 is disconnected, or the connection between the first pin 311 and the third pin 321 is disconnected and the contact connection between the second pin 312 and the fourth pin 322 is disconnected, and the detection circuit is in an open state, and the connection between the detection pin and the ground point 11 is disconnected, and the detection pin is in a suspended state, and the voltage of the detection pin is a high level or no voltage.

[0075] Therefore, the processor can determine whether the detection circuit is in the on state or the off state according to the voltage of the detection pin. When the detection circuit is in the on state, it can be determined that the contact of the connector 3 is normal, and then the connection between the peripheral device 2 and the circuit board 1 is normal. On the contrary, when the detection circuit is in the off state, it can be determined that the contact of the connector 3 is abnormal, and then the connection between the peripheral device 2 and the circuit board 1 is abnormal. Specifically, when the processor 4 detects that the voltage of the detection pin is at a low level, it can be determined that the detection circuit is on and the connection between the peripheral device 2 and the circuit board 1 is normal; when the processor 4 detects that the voltage of the detection pin is at a high level, it can be determined that the detection circuit is disconnected and the connection between the peripheral device 2 and the circuit board 1 is abnormal.

[0076] When the detection circuit is turned on, current flows from the detection pin to the grounding point 11, and when the detection circuit is turned off, no current flows from the detection pin to the grounding point 11. Therefore, the processor 4 can obtain the current of the detection pin, and when the detection pin has current output or input, it can be determined that the detection circuit is turned on and the connection between the peripheral device 2 and the circuit board 1 is normal; when the detection pin has no current output or input, it is determined that the detection circuit is disconnected and the connection between the peripheral device 2 and the circuit board 1 is abnormal.

[0077] like Figure 6 As shown, Figure 6This is a detection flow diagram provided by an embodiment of the present application. After starting the detection, the processor first executes step 601 to control the detection pin to output a high voltage and pull the voltage of the detection pin to a high level. At this time, if the detection circuit is turned on, the grounding point 11 is short-circuited with the detection pin, and the grounding point 11 will pull the voltage of the detection pin down to a low level; if the detection circuit is disconnected, the voltage of the detection pin remains at a high level. After the processor 601 pulls the voltage of the detection pin to a high level, it executes step 602.

[0078] In step 602, the processor 4 reads the voltage of the detection pin and determines the voltage of the detection pin. If the voltage of the detection pin is low, it is determined that the detection circuit is turned on and step 604 is executed. If the voltage of the detection pin is high, step 603 is executed.

[0079] In step 603 , the processor determines that the connection between the peripheral device 2 and the circuit board 1 is abnormal, obtains a detection result of the abnormal connection between the peripheral device 2 and the circuit board 1 , and then executes step 605 .

[0080] In step 605, it is determined whether the number of times is greater than N times. When the detection circuit is detected to be disconnected N times and the detection result of abnormal connection between the peripheral device 2 and the circuit board 1 is obtained, step 606 is executed. On the contrary, when the number of times is less than N times, the processor 1 returns to step 602 and executes steps 602 to 605 in a loop.

[0081] In step 606 , the processor determines N times that the connection between the peripheral device 2 and the circuit board 1 is abnormal, and obtains a detection result of the abnormal connection between the peripheral device 2 and the circuit board 1 .

[0082] In step 604 , the processor determines that the detection circuit is turned on, and obtains a detection result that the connection between the peripheral device 2 and the circuit board 1 is normal.

[0083] After executing step 606 or step 604 , processor 4 executes step 607 to end the detection.

[0084] After the detection is completed, the processor 4 executes step 608 to report the detection result. For example, the processor 4 can report the detection result to an application (APP) installed in the electronic device, and the application controls the electronic device to output the detection result to notify the user of the detection result. The specific method of reporting the detection result may include but is not limited to the above examples.

[0085] Among them, when the detection circuit is turned on, the voltage of the detection pin may briefly appear high due to jitter. When the abnormal connection between the peripheral device and the circuit board is determined N times in steps 602 to 605, the result of abnormal connection between the peripheral device 5 and the circuit board 1 is obtained, which can avoid misjudgment and avoid erroneous detection results. N is a positive integer, for example, 3. The specific value of N can be determined according to needs, and this embodiment does not limit this.

[0086] In practical applications, the processor can implement Figure 6 The detection process shown in the figure can be used to determine whether the connection between the peripheral device and the circuit board is abnormal. It can also be implemented during the startup process of the electronic device. Figure 6 The detection process shown is used to determine whether there is an abnormal connection between the peripheral device and the circuit board. When a peripheral device fails, if it is determined that there is an abnormal connection between the peripheral device and the circuit board, it can be determined that the cause of the failure of the peripheral device is most likely caused by the abnormal connection between the peripheral device and the circuit board. Conversely, when a peripheral device fails, if it is determined that the connection between the peripheral device and the circuit board is normal, it can be determined that the connector contact is normal, and the cause of the abnormal connection between the peripheral device and the circuit board can be ruled out. It is determined that the cause of the failure of the peripheral device may be an abnormality in the peripheral device itself.

[0087] It should be noted that the processor can also be implemented in other scenarios Figure 6 The detection process shown is used to determine whether there is an abnormal connection between the peripheral device and the circuit board, and this embodiment does not limit this.

[0088] Optionally, the detection pin can be connected to the power supply 12 on the circuit board 1 through the pull-up resistor element 13, and the voltage of the detection pin can be pulled up to a high level through the pull-up resistor element 13. When the detection circuit is detected, the processor 4 is not required to pull up the voltage of the detection pin.

[0089] Figure 7 This is a schematic diagram of the interior of another electronic device provided in an embodiment of the present application. The pull-up resistor element 13 can be a resistor or an electronic component with a resistor characteristic. Taking a resistor as an example, one end of the pull-up resistor element 13 is connected to the detection pin, and the other end is connected to the power supply 12 on the circuit board 1. After the electronic device is powered on and started, the pull-up resistor element 13 can pull the voltage of the detection pin to a high level. If the contact of the connector 3 is normal, the detection circuit is turned on, and the voltage of the detection pin will be pulled down to a low level by the grounding point 11; if the contact of the connector 3 is abnormal, the detection circuit is disconnected, and the voltage of the detection pin is pulled up to a high level by the pull-up resistor element 13. Combined with Figure 6 As shown, since the pull-up resistor element 13 can pull up the voltage of the detection pin to a high level, during detection, the processor 4 may not execute step 601 but directly execute step 602.

[0090] In one embodiment, when the pull-up resistor element 13 is set to pull up the voltage of the detection pin, the processor 4 can continuously monitor the voltage of the detection pin. If a rising edge from a low level to a high level is detected on the detection pin, it indicates that the detection circuit switches from an on state to an off state. It can be determined that the detection circuit is disconnected, the connector changes from normal contact to abnormal contact, and the connection between the peripheral device and the circuit board is abnormal.

[0091] Optionally, the first pin 311 and the third pin 321 are arranged at one end of the connector 3 , and the second pin 312 and the fourth pin 322 are arranged at the other end of the connector 3 .

[0092] In one embodiment, the first pin 311 and the third pin 321 may be disposed at one end of the connector 3, and the second pin 312 and the fourth pin 322 may be disposed at the other end of the connector 3. For example, the first pin 311 and the third pin 321 may be disposed at the left end of the connector 3, and the second pin 312 and the fourth pin 322 may be disposed at the right end of the connector 3. Alternatively, the first pin 311 and the third pin 321 may be disposed at the upper end of the connector 3, and the second pin 312 and the fourth pin 322 may be disposed at the lower end of the connector 3.

[0093] like Figure 8 As shown, Figure 8 : This is a schematic diagram of the interior of another electronic device provided by an embodiment of the present application. The first connector 31 includes two rows of pins arranged opposite to each other in the upper and lower directions. The first pin 311 is located at the left end of the upper row of pins, and the second pin 312 is located at the right end of the upper row of pins. The second connector 32 includes two rows of pins arranged opposite to each other in the upper and lower directions. The third pin 321 is located at the left end of the upper row of pins, and the fourth pin 322 is located at the right end of the upper row of pins, so that the first pin 311 and the third pin 321 are arranged at the left end of the connector 3, and the second pin 312 and the fourth pin 322 are arranged at the right end of the connector 3. Among them, the first pin 311 and the third pin 321 can also be located at the left end of the lower row of pins, and the second pin 312 and the fourth pin 322 can also be located at the right end of the lower row of pins.

[0094] Combination Figure 8 As shown, when the left end of the connector 3 has an abnormal contact, some pins at the left ends of the first connector 31 and the second connector 32 will not be able to contact and connect; when the right end of the connector 3 has an abnormal contact, some pins at the right ends of the first connector 31 and the second connector 32 will not be able to contact and connect; abnormal contact at the left end or the right end of the connector 3 will cause abnormal connection between the peripheral device 2 and the circuit board 1.

[0095] Fig. 9: This is a schematic diagram of the interior of another electronic device provided by an embodiment of the present application. The first connector 31 includes two rows of pins arranged opposite to each other in the upper and lower rows, the first pin 311 is located in the upper row of pins, and the second pin 312 is located in the lower row of pins. The second connector 32 includes two rows of pins arranged opposite to each other in the upper and lower rows, the third pin 321 is located in the upper row of pins, and the fourth pin 322 is located in the lower row of pins, so that the first pin 311 and the third pin 321 are arranged at the upper end of the connector 3, and the second pin 312 and the fourth pin 322 are arranged at the lower end of the connector 3. Among them, the first pin 311 and the third pin 321 can also be located at the lower end of the connector 3, and the second pin 312 and the fourth pin 322 can also be located at the upper end of the connector 3.

[0096] It should be noted that the first connector 31 may include one or more rows of pins, and the second connector 32 may also include one or more rows of pins, each row of pins includes a plurality of pins arranged in sequence, and each row of pins may be as follows: Figure 8 and Fig. 9 The first pin 311 and the second pin 312 can be arranged in the same row of pins or in different rows of pins, or in different positions from other pins in the first connector 31, and only need to be arranged at both ends of the connector 3. Similarly, the third pin 321 and the fourth pin 322 can be arranged in the same row of pins or in different rows of pins, or in different positions from other pins in the second connector 32, and only need to be arranged at both ends of the connector 3.

[0097] Combination Fig. 9 As shown, when the upper end of the connector 3 has an abnormal contact, some pins at the upper ends of the first connector 31 and the second connector 32 will not be able to contact and connect. When the lower end of the connector 3 has an abnormal contact, some pins at the lower ends of the first connector 31 and the second connector 32 will not be able to contact and connect. Abnormal contact at the upper end or the lower end of the connector 3 will cause abnormal connection between the peripheral device 2 and the circuit board 1.

[0098] exist Figure 8In the connector 3 shown, the first pin 311 and the third pin 321 are arranged at the left end of the connector 3, and the second pin 312 and the fourth pin 322 are arranged at the right end of the connector 3. When the contact of the connector 3 is normal, the first pin 311 is in contact with the third pin 321, and the second pin 312 is in contact with the fourth pin 322, and the detection circuit is turned on. Since the first pin 311 and the third pin 321 are located at the left end of the connector 3, when the contact of the left end of the connector 3 is abnormal, the first pin 311 and the third pin 321 are disconnected, and the detection circuit is disconnected; since the second pin 312 and the fourth pin 322 are located at the right end of the connector 3, when the contact of the right end of the connector 3 is abnormal, the second pin 312 and the fourth pin 322 are disconnected, and the detection circuit is disconnected.

[0099] Therefore, when the peripheral device 2 fails, when it is detected that the detection circuit is turned on, it means that the first pin 311 and the third pin 321 maintain contact and connection, and the second pin 312 and the fourth pin 322 maintain contact and connection, so it can be determined that the left end of the connector 3 is in normal contact, and it can be determined that the right end of the connector 3 is in normal contact.

[0100] Among them, when one of the left or right ends of the connector 3 has abnormal contact, it will cause abnormal connection between the peripheral device 2 and the circuit board 1. When it is determined that the left end of the connector 3 is in normal contact and the right end of the connector 3 is in normal contact, it means that the connection between the peripheral device and the circuit board is normal with a high probability. When the peripheral device 2 fails, if the detection circuit is turned on, the fault causes of the abnormal contact of the left end and the abnormal contact of the right end of the connector 3 can be ruled out, and it is determined that the cause of the failure of the peripheral device 2 may be an abnormality in the peripheral device 2 itself, or other reasons. Conversely, when the peripheral device 2 fails, if it is detected that the detection circuit is disconnected, it is determined that the connection between the peripheral device 2 and the circuit board 1 is abnormal, and it can be determined that the cause of the failure of the peripheral device 2 is most likely the abnormal contact of the left end of the connector 3 and / or the abnormal contact of the right end.

[0101] exist Fig. 9 In the connector 3 shown, the first pin 311 and the third pin 321 are arranged at the upper end of the connector 3, and the second pin 312 and the fourth pin 322 are arranged at the lower end of the connector 3. When the contact of the connector 3 is normal, the first pin 311 is in contact with the third pin 321, and the second pin 312 is in contact with the fourth pin 322, and the detection circuit is turned on. Since the first pin 311 and the third pin 321 are located at the upper end of the connector 3, when the contact of the upper end of the connector 3 is abnormal, the first pin 311 and the third pin 321 are disconnected, and the detection circuit is disconnected. Since the second pin 312 and the fourth pin 322 are located at the lower end of the connector 3, when the contact of the lower end of the connector 3 is abnormal, the second pin 312 and the fourth pin 322 are disconnected, and the detection circuit is disconnected.

[0102] Therefore, when the peripheral device 2 fails, when it is detected that the detection circuit is turned on, it means that the first pin 311 and the third pin 321 maintain contact and connection, and the second pin 312 and the fourth pin 322 maintain contact and connection, so it can be determined that the upper end contact of the connector 3 is normal, and it can be determined that the lower end contact of the connector 3 is normal.

[0103] Among them, when one of the upper or lower ends of the connector 3 has abnormal contact, it will cause abnormal connection between the peripheral device 2 and the circuit board 1. When it is determined that the upper end of the connector 3 is in normal contact and the lower end of the connector 3 is in normal contact, it means that the connection between the peripheral device and the circuit board is normal with a high probability. When the peripheral device 2 fails, if the detection circuit is turned on, the fault causes of the abnormal contact of the left end and the abnormal contact of the right end of the connector 3 can be ruled out, and it is determined that the cause of the failure of the peripheral device 2 may be an abnormality in the peripheral device 2 itself, or other reasons. Conversely, when the peripheral device 2 fails, if the detection circuit is detected to be disconnected, it can be determined that the connection between the peripheral device 2 and the circuit board 1 is abnormal, and it can be determined that the cause of the failure of the peripheral device 2 is most likely the abnormal contact of the upper end of the connector 3 and / or the abnormal contact of the lower end.

[0104] In the embodiment of the present application, a pair of pins consisting of the first pin 311 and the third pin 321 is set at one end of the connector 3, and a pair of pins consisting of the second pin 321 and the fourth pin 322 is set at the other end of the connector 3. During the detection process, if the detection circuit is determined to be turned on, it can be determined that both ends of the connector 3 are in normal contact. When troubleshooting the cause of the fault, the contact conditions of both ends of the connector 3 can be detected at the same time. When the peripheral device 2 fails and the detection circuit is turned on, the fault cause of abnormal contact between the two ends of the connector 3 can be eliminated.

[0105] Optionally, the first pin 311 and the third pin 321 are disposed at diagonally opposite corners of the second pin 312 and the fourth pin 322 .

[0106] In one embodiment, the first pin 311 and the third pin 321 can be set at diagonally opposite corners of the second pin 321 and the fourth pin 322. During the detection process, it can be detected whether the left and right ends of the connector 3 have abnormal contact, and whether the upper and lower ends of the connector 3 have abnormal contact.

[0107] For example, Fig.10 This is a schematic diagram of the interior of another electronic device provided in an embodiment of the present application. The peripheral device 2 is connected to the second connector 32 via a flexible circuit board 5, and a plurality of leads 51 are provided on the flexible circuit board 5. The third pin 321 and the fourth pin 322 are short-circuited via a short-circuit wire 323, and the short-circuit wire 323 is arranged on the flexible circuit board 5 and extends from one side of the plurality of leads 51 to the peripheral device 2.

[0108] The first connector 31 includes two rows of pins arranged in a vertically opposite manner, the first pin 311 is located in the lower row of pins, the second pin 312 is located in the upper row of pins, and the first pin 311 is arranged at a diagonal angle to the second pin 312. Similarly, the second connector 32 includes two rows of pins arranged in a vertically opposite manner, the third pin 321 is located in the lower row of pins, the fourth pin 322 is located in the upper row of pins, and the third pin 321 is arranged at a diagonal angle to the fourth pin 322. The position of the first pin 311 in the first connector 31 is the same as the position of the third pin 321 in the second connector 32, so that the first pin 311 corresponds to the third pin 321. The position of the second pin 312 in the first connector 31 is the same as the position of the fourth pin 322 in the second connector 32, so that the second pin 312 corresponds to the fourth pin 322. A pair of pins consisting of the first pin 311 and the third pin 321 is arranged at the lower left corner of the connector 3, and a pair of pins consisting of the second pin 312 and the fourth pin 322 is arranged at the upper right corner of the connector 3. In practical applications, one pair of pins may be arranged at the upper left corner of the connector 3 and the other pair of pins may be arranged at the lower right corner of the connector 3 , and it is only necessary to arrange one pair of pins at the diagonally opposite corner of the other pair of pins.

[0109] exist Fig.10 In the connector 3 shown, the first pin 311 and the third pin 321 are located at the lower left corner of the connector 3, and the second pin 312 and the fourth pin 322 are located at the upper right corner of the connector 3. When the contact of the connector 3 is normal, the first pin 311 is in contact with the third pin 321, and the second pin 312 is in contact with the fourth pin 322, and the detection circuit is turned on. Since the first pin 311 and the third pin 321 are located at the lower left corner of the connector 3, when the contact of the lower end or the left end of the connector 3 is abnormal, the first pin 311 and the third pin 321 are disconnected, and the detection circuit is disconnected. Similarly, since the second pin 312 and the fourth pin 322 are located at the upper right corner of the connector 3, when the contact of the upper end or the right end of the connector 3 is abnormal, the second pin 312 and the fourth pin 322 are disconnected, and the detection circuit is disconnected.

[0110] Therefore, when the peripheral device 2 fails, if it is detected that the detection circuit is turned on, it means that the first pin 311 and the third pin 321 maintain contact and connection, and the second pin 312 and the fourth pin 322 maintain contact and connection, so it can be determined that the lower end of the connector 3 is in normal contact, the left end is in normal contact, and the upper end of the connector 3 is in normal contact, and the right end is in normal contact.

[0111] Among them, when one of the upper end, lower end, left end or right end of the connector 3 has abnormal contact, it will cause abnormal connection between the peripheral device 2 and the circuit board 1. When it is determined that the upper and lower ends of the connector 3 are in normal contact, and the left and right ends of the connector 3 are in normal contact, it means that the connection between the peripheral device and the circuit board is normal with a high probability. When the peripheral device 2 fails, if the detection circuit is turned on, the causes of the abnormal contact between the upper and lower ends of the connector 3 and the abnormal contact between the left and right ends can be ruled out, and it is determined that the cause of the failure of the peripheral device 2 may be an abnormality in the peripheral device 2 itself, or other reasons. On the contrary, if it is detected that the detection circuit is disconnected and it is determined that the connection between the peripheral device 2 and the circuit board 1 is abnormal, it can be determined that the cause of the failure of the peripheral device 2 is most likely one or more of the abnormal contact of the upper end, the lower end, the left end and the right end of the connector 3.

[0112] In the embodiment of the present application, a pair of pins consisting of the first pin 311 and the third pin 321 is set at one end of the connector 3, and another pair of pins consisting of the second pin 312 and the fourth pin 322 is set diagonally. During the detection process, if the detection circuit is determined to be turned on, it can be determined that the upper and lower ends and the left and right ends of the connector 3 are in normal contact. When troubleshooting the cause of the fault, the contact conditions of the left and right ends and the upper and lower ends of the connector 3 can be detected at the same time. When the peripheral device fails and the detection circuit is turned on, the fault causes of abnormal contact between the left and right ends of the connector and abnormal contact between the upper and lower ends can be eliminated.

[0113] like Fig.10 As shown, the short-circuit wire 323 can be arranged on the flexible circuit board 5, and the short-circuit wire 323 extends from the left side of the plurality of leads 51 to the peripheral device 2, and extends to the peripheral device 2, and part of the short-circuit wire 323 is arranged on the peripheral device 2. Among them, the flexible circuit board 5 is printed with a plurality of parallel leads 51, and the peripheral device 2 is connected to the second connector 32 through the leads 51, and then connected to the circuit board 1. When the left side of the flexible circuit board 5 is torn, the leads 51 on the left side of the flexible circuit board 5 will be broken, which will cause abnormal connection between the peripheral device 2 and the circuit board 1.

[0114] In this embodiment, since the short-circuit wire 323 extends from the left side of the plurality of leads 51 to the peripheral device 2, when the left side of the flexible circuit board 5 is torn, the short-circuit wire 323 will break, and the connection between the third pin 321 and the fourth pin 322 will be disconnected, which will disconnect the detection circuit. On the contrary, if the left side of the flexible circuit board 5 is not torn, the third pin 321 and the fourth pin 322 remain short-circuited, and the detection circuit is turned on.

[0115] exist Fig.10In the connector 3 shown, when the peripheral device 2 fails, if the detection circuit is determined to be turned on, the connection between the peripheral device 2 and the circuit board 1 is normal, not only can it be determined that the left and right ends of the connector 3 are in normal contact, and the upper and lower ends are in normal contact, but also it can be determined that the left side of the flexible circuit board 5 is not torn. While eliminating the fault causes of abnormal upper and lower ends of the peripheral device 2 and abnormal left and right ends, the fault cause of the left side of the flexible circuit board 5 being torn can be eliminated.

[0116] It should be noted that the short-circuit line can also extend from the right side of the plurality of leads to the peripheral device. The principle of the short-circuit point extending from the right side of the plurality of leads to the peripheral device is the same as that on the left side, and this embodiment will not be described in detail.

[0117] Combination Figure 5 As shown, in Figure 5 In the connector 3 shown, the short-circuit wire 323 may also extend from the left or right side of the plurality of leads 51 to the peripheral device 2. When the peripheral device 2 fails, if the detection determines that the connection between the peripheral device 2 and the circuit board 1 is normal, it can not only be determined that the contact of the connector 3 is normal, but also that the left side or the right side of the flexible circuit board 5 is not torn. While eliminating the cause of the failure of the abnormal contact of the connector 3, the cause of the failure of the left side or the torn side of the flexible circuit board 5 can be eliminated.

[0118] Combination Figure 8 As shown, in Figure 8 In the connector 3 shown, the short-circuit wire 323 may also extend from the left or right side of the plurality of leads 51 to the peripheral device 2. When the peripheral device 2 fails, if the detection determines that the connection between the peripheral device 2 and the circuit board 1 is normal, it can be determined not only that the left and right ends of the connector 3 are in normal contact, but also that the left side or the right side of the flexible circuit board 5 is not torn. While eliminating the cause of the abnormal contact between the left and right ends of the connector 3, the cause of the tearing of the left side or the right side of the flexible circuit board 5 can be eliminated.

[0119] Combination Fig. 9 As shown, in Fig. 9 In the connector 3 shown, the short-circuit wire 323 may also extend from the left or right side of the plurality of leads 51 to the peripheral device 2. When the peripheral device 2 fails, if the detection determines that the connection between the peripheral device 2 and the circuit board 1 is normal, it can be determined not only that the upper and lower ends of the connector 3 are in normal contact, but also that the left side or right side of the flexible circuit board 5 is not torn. While eliminating the cause of the abnormal contact between the upper and lower ends of the connector 3, the cause of the tear or tear of the left side of the flexible circuit board 5 can be eliminated.

[0120] Optionally, the short-circuit wire 323 surrounds a plurality of lead wires 51 and is arranged on the flexible circuit board 5 .

[0121] In one implementation, the short-circuit wire 323 may be arranged on the flexible circuit board 5 around the plurality of leads 51 . Fig.11 3 is an exploded schematic diagram of the interior of another electronic device provided by an embodiment of the present application, wherein the first pin 311 and the third pin 321 are arranged at the lower left corner of the connector 3, and the second pin 312 and the fourth pin 322 are arranged at the upper right corner of the connector 3. Meanwhile, the short-circuit wire 323 is printed on the flexible circuit board 5 and wound around the plurality of leads 51, and part of the short-circuit wire 323 is arranged in the peripheral device 2.

[0122] In this embodiment, since the short-circuit wire surrounds the plurality of leads 51, and there are short-circuit wires on both sides of the plurality of leads 51, when either the left side or the right side of the flexible circuit board 2 is torn, the short-circuit wire 323 will break, and the connection between the third pin 312 and the fourth pin 322 will be disconnected, which will disconnect the detection circuit. On the contrary, if the left side and the right side of the flexible circuit board 5 are not torn, the third pin 312 and the fourth pin 322 remain short-circuited, and the detection circuit is turned on.

[0123] exist Fig.11 In the connector 3 shown, when the peripheral device 2 fails, if the detection circuit is determined to be turned on, the connection between the peripheral device 2 and the circuit board 1 is normal, not only can it be determined that the left and right ends of the connector 3 are in normal contact, and the upper and lower ends are in normal contact, but also it can be determined that the left side and the right side of the flexible circuit board 5 are not torn. While eliminating the causes of abnormal contact between the upper and lower ends and the left and right ends of the peripheral device 2, the causes of tearing on the left side and the right side of the flexible circuit board 5 can be eliminated.

[0124] Combination Figure 5 As shown, in Figure 5 In the connector 3 shown, the short-circuit wire 323 can also be arranged on the flexible circuit board 5 around the plurality of leads 51. When the peripheral device 2 fails, if the detection determines that the connection between the peripheral device 2 and the circuit board 1 is normal, it can not only be determined that the contact of the connector 3 is normal, but also that the left side and the right side of the flexible circuit board 5 are not torn. While eliminating the cause of the abnormal contact of the connector 3, the cause of the tearing of the left side and the right side of the flexible circuit board 5 can be eliminated.

[0125] Combination Figure 8 As shown, in Figure 8 In the connector 3 shown, the short-circuit wire 323 can also be arranged on the flexible circuit board 5 around the plurality of leads 51. When the peripheral device 2 fails, if the detection determines that the connection between the peripheral device 2 and the circuit board 1 is normal, it can not only be determined that the left and right ends of the connector 3 are in normal contact, but also that the left side and the right side of the flexible circuit board 5 are not torn. While eliminating the cause of the abnormal contact between the left and right ends of the connector 3, the cause of the tearing of the left and right sides of the flexible circuit board 5 can be eliminated.

[0126] Combination Fig. 9 As shown, in Fig. 9 In the connector 3 shown, the short-circuit wire 323 can also be arranged on the flexible circuit board 5 around the plurality of leads 51. When the peripheral device 2 fails, if the detection determines that the connection between the peripheral device 2 and the circuit board 1 is normal, it can not only be determined that the upper and lower ends of the connector 3 are in normal contact, but also that the left side and the right side of the flexible circuit board 5 are not torn. While eliminating the cause of the abnormal contact between the upper and lower ends of the connector 3, the cause of the tearing of the left side and the right side of the flexible circuit board 5 can be eliminated.

[0127] Optionally, the electronic device includes multiple peripheral devices 2 and connectors 3 corresponding to each peripheral device 2; the first pins 311 and the second pins 312 in the multiple connectors 3 are sequentially connected in series between the detection pin and the ground point 11.

[0128] Among them, when the first pin 311 and the second pin 312 in multiple connectors 3 are connected in series between the detection pin and the grounding point 11 in sequence, the processor 4 determines that the connection between at least one peripheral device 2 and the circuit board 1 is abnormal when it determines that the detection circuit is disconnected according to the detection result.

[0129] In one embodiment, multiple peripheral devices 2 in an electronic device can form a device group, and the multiple peripheral devices 2 are respectively connected to the circuit board 1 through corresponding connectors 3. The multiple connectors 3 can be connected in series in sequence through the first pin 311 and the second pin 312, so that the first pin 311 and the second pin 312 in the multiple connectors 3 are connected in series between the detection pin and the ground point.

[0130] Fig.12 This is a schematic block diagram of another electronic device provided by an embodiment of the present application. The electronic device includes four peripheral devices 2, which are peripheral device 201, peripheral device 202, peripheral device 203 and peripheral device 204 in sequence. Connectors 301, 302, 303 and 304 are arranged on the circuit board 1. The peripheral device 201 is connected to the second plug-in connector 32 in the connector 301, the peripheral device 202 is connected to the second plug-in connector 32 in the connector 302, the peripheral device 203 is connected to the second plug-in connector 32 in the connector 303, and the peripheral device 204 is connected to the second plug-in connector 32 in the connector 304. The four peripheral devices 2 form a device group, and the four connectors 3 corresponding to the four peripheral devices 2 are connected in series through the first pin 311 and the second pin 312.

[0131] like Fig.12 As shown, Fig.12 Connector 3 in Fig.11The first connectors 31 in the four connectors 3 are connected in series in sequence through the first pins 311 and the second pins 312 they have. Between two adjacent first connectors 31, the first pin 311 of one first connector 31 is connected to the second pin 312 of another connector 31, and the four first connectors 31 are connected in series into a plug string. The first pin 311 at one end of the plug string is connected to the detection pin, and the second pin 312 at the other end of the plug string is connected to the ground point 11, so that the first pins 311 and the second pins 312 of the multiple connectors 3 are connected in series between the detection pin and the ground point 11.

[0132] like Fig.12 As shown, the first pin 311 of the first connector 31 at the left end is directly connected to the detection pin, and the first pins 311 of other first connectors 31 are indirectly connected to the detection pin through the pin. The second pin 312 of the first connector 31 at the right end is directly connected to the ground point 11, and the other second pins 312 are indirectly connected to the ground point 11 through the pin.

[0133] like Fig.12 As shown, the first pins 311 and the second pins 312 in the plurality of connectors 3 are connected in series in sequence. Since the third pins 321 and the fourth pins 322 in each second connector 32 are short-circuited by the short-circuit wire 323, the detection circuit formed is connected in series with the first pins 311 and the second pins 312 in each connector 3, and the third pins 321 and the fourth pins 322 in each connector 3, and the detection circuit corresponds to the entire device grouping. When the four connectors 3 are in normal contact and each flexible circuit board 5 is not torn, the detection circuit from the detection pin to the grounding point 11 is turned on. When any one of the four connectors 3 is in abnormal contact or any one of the flexible circuit boards 5 is torn, the detection circuit from the detection pin to the grounding point 11 is disconnected.

[0134] When any peripheral device 2 in the device group fails, you can use Figure 6 The detection method shown in the figure is used for detection. The processor 4 first pulls the detection pin to a high level, and then reads the voltage of the detection pin. If the voltage is a low level, it is determined that the detection circuit is turned on, and it can be determined that the connector 3 corresponding to each peripheral device 2 is in normal contact, and the flexible circuit board 5 connected to each peripheral device 2 is not torn. For example, when the peripheral device 201 fails, if it is determined that the detection circuit is turned on, it can be determined that the connection between each peripheral device 2 in the device group and the circuit board 1 is normal, and the cause of the failure of the peripheral device 201 does not include abnormal connector contact and flexible circuit board tearing.

[0135] During the detection process, if the voltage of the detection pin is read as a high level N times in a row, it can be determined that there is an abnormal connection between one or more peripheral devices 2 in the device group and the circuit board 1, that is, there is an abnormal contact of the connector 3 corresponding to at least one peripheral device 2 and / or the flexible circuit board 5 is torn.

[0136] Among them, Fig.12 In the electronic device shown, the detection pin can also be connected to the power supply 12 on the circuit board 1 through the pull-up resistor element 13. When the detection pin is connected to the power supply 12 on the circuit board 1 through the pull-up resistor element 13, during the detection process, the processor 4 does not need to pull up the voltage of the detection pin, and can directly read the voltage of the detection pin. Fig.12 Connector 3 in can also be Figure 5 , Figure 8 , Fig. 9 and Fig.10 Connector shown.

[0137] In practical applications, all peripheral devices 2 in the electronic device can be divided into one or more device groups, each of which can include one or more peripheral devices 2. The number of peripheral devices 2 included in the device group can be set according to the needs, and this embodiment does not limit this. For each device group, a pin of the processor 4 can be selected as the detection pin, which can be used Fig.12 In the manner shown, the connectors 3 corresponding to the plurality of peripheral devices 2 in the device group are connected in series between the ground point 11 and the corresponding detection pin.

[0138] In the embodiment of the present application, the first pins 311 and the second pins 312 of the plurality of connectors 3 can be sequentially connected in series between the corresponding same detection pin and the grounding point 11, and the plurality of peripheral devices can share one detection pin. During the detection process, the plurality of connectors 3 can be detected simultaneously. When the electronic device includes a large number of peripheral devices 2, and when it is necessary to troubleshoot the cause of the failure when each peripheral device fails, the plurality of peripheral devices 2 can share the same detection pin, and there is no need to set a separate detection pin for each peripheral device 2, which can reduce the pin usage of the processor 4.

[0139] Optionally, the detection pin is an analog pin, the analog pin is connected to a power supply on the circuit board through a pull-up resistor element, and the second pin is connected to a ground point through a pull-down resistor element.

[0140] For example, Fig.13 is a schematic block diagram of another electronic device provided in an embodiment of the present application. Fig.13 Connector 3 in Fig.11The pull-up resistor element 13 and the pull-down resistor element 14 are the same as the connector 3 in FIG. 1 , and can be resistors or electronic components with resistance characteristics. Taking a resistor as an example, one end of the pull-up resistor element 13 is connected to the detection pin of the processor 4, and the other end is connected to the power supply 12 on the circuit board 1. The second pin 312 in the first connector 31 is connected to one end of the pull-down resistor element 14, and the other end of the pull-down resistor element 14 is connected to the ground point 11, forming a detection circuit that starts from the detection pin, connects the first pin 311 and the third pin 321 in series, connects the second pin 312 and the fourth pin 322 in series, and connects the pull-down resistor element 14 in series.

[0141] exist Fig.13 In the case where the connector contacts normally and the flexible circuit board 5 is not torn, the detection circuit is turned on, so that the first pin 311 and the third pin 321 are in contact, and the second pin 312 and the fourth pin 322 are in contact and connected, the pull-up resistor element 13 and the pull-down resistor element 14 are connected in series, and the voltage of the analog pin is the voltage of the voltage-dividing node between the pull-up resistor element 13 and the pull-down resistor element 14. For example, the voltage of the power supply 12 is represented by the symbol V0, the voltage of the analog pin is represented by the symbol V1, the resistance value of the pull-up resistor element 13 is represented by the symbol R0, and the resistance value of the pull-down resistor element 14 is represented by the symbol R1. When the detection circuit is turned on, the voltage V1 of the analog pin can be calculated by the following formula:

[0142]

[0143] When the first connector 31 and the second connector 32 are in abnormal contact and / or the flexible circuit board 5 is torn, the detection circuit is disconnected, the voltage of the analog pin is pulled up by the pull-up resistor element 13, and the voltage of the detection pin is V0. When the peripheral device 2 fails, the processor 4 can read the voltage of the analog pin for multiple times in succession. When the voltage of the analog pin read multiple times in succession is different from the voltage V0, it is determined that the detection circuit is turned on and the connection between the peripheral device 2 and the circuit board 1 is normal. At this time, the fault causes of abnormal contact of the connector 3 and the tearing of the flexible circuit board 5 can be ruled out.

[0144] On the contrary, when the voltage of the analog pin read multiple times in succession is V0, it is determined that the detection circuit is disconnected and the connection between the peripheral device 2 and the circuit board 1 is abnormal. At this time, it is highly likely that the cause of the failure of the peripheral device 2 is the abnormal contact of the connector 3 and / or the tearing of the flexible circuit board 5. It may be that any of the left end, right end, upper end and lower end of the connector 3 has abnormal contact, or the left side or right side of the flexible circuit board 5 is torn, or both the cause of the abnormal contact and the cause of the tearing of the flexible circuit board exist.

[0145] Optionally, the electronic device includes multiple peripheral devices 2 and a connector 3 corresponding to each peripheral device 2; the detection pin is an analog pin, and the analog pin is connected to the power supply 12 on the circuit board 1 through a pull-up resistor element 13; the first pin 311 in the multiple connectors 3 is connected in parallel to the analog pin, and the second pin 312 in the multiple connectors 3 is connected to the ground point 11 through the corresponding pull-down resistor element 14.

[0146] Among them, when the detection pin is an analog pin, the first pins 311 of multiple connectors 3 are connected in parallel to the analog pins, and the multiple second pins 312 are respectively connected to the grounding points through corresponding pull-down resistor elements 14, the processor 4 can determine that there is an abnormal connection between at least one peripheral device 2 and the circuit board 1 when the actual voltage of the analog pin is higher than the voltage threshold.

[0147] Fig.14 is a schematic block diagram of another electronic device provided in an embodiment of the present application. Fig.14 The peripheral device 2 includes three peripheral devices 2, namely peripheral device 201, peripheral device 202 and peripheral device 203. Peripheral device 201 corresponds to connector 301, peripheral device 202 corresponds to connector 302, and peripheral device 203 corresponds to connector 303. Each connector 3 corresponds to Fig.11 The connector 3 shown is the same. Three peripheral devices form a device group, and the device group corresponds to the same analog pin of the processor 4. In each connector 3, the first pin 311 of the first connector 31 is connected to the detection pin, so that the three first pins 311 of the three first connectors 31 are connected in parallel to the same detection pin. A pull-up resistor element 13 corresponding to the device group is provided on the circuit board 1. The pull-up resistor element 13 is, for example, a resistor. One end of the pull-up resistor element 13 is connected to the power supply 12, and the other end is connected to the analog pin of the processor 4.

[0148] The circuit board 1 is also provided with a pull-down resistor element 14 corresponding to each peripheral device 2, that is, the peripheral device 201 corresponds to the pull-down resistor element 141, the peripheral device 202 corresponds to the pull-down resistor element 142, and the peripheral device 203 corresponds to the pull-down resistor element 143. The pull-down resistor element can be a resistor. One end of the pull-down resistor element 141 is connected to the second pin 312 in the connector 301, and the other end is connected to the grounding point 11. One end of the pull-down resistor element 142 is connected to the second pin 312 in the connector 302, and the other end is connected to the grounding point 11. One end of the pull-down resistor element 143 is connected to the second pin 312 in the connector 303, and the other end is connected to the grounding point 11.

[0149] Fig.14In the embodiment, the first pin 311, the second pin 312, the third pin 321 and the fourth pin 322 in each connector 3 constitute a detection circuit corresponding to the peripheral device 2. Taking the peripheral device 202 as an example, the detection circuit is connected in series from the detection pin to the first pin 311 and the third pin 321, the second pin 312 and the fourth pin 322 in the connector 302, and the pull-down resistor element 142. Similarly, a detection circuit corresponding to the peripheral device 201 and a detection circuit corresponding to the peripheral device 203 are constituted.

[0150] Fig.15 is a circuit schematic diagram provided in an embodiment of the present application. Fig.14 In the circuit board 1 shown, the pull-down resistor element 141, the pull-down resistor element 142 and the pull-down resistor element 143 are connected in parallel and then connected in series with the pull-up resistor element 13. The detection pin is connected between the pull-up resistor element 13 and the three pull-down resistors. The voltage of the power supply 12 is represented by V0, the voltage of the analog pin is represented by V1, the resistance value of the pull-up resistor element 13 is represented by R0, and the resistance value of the pull-up resistor element 13 is represented by R 11 The resistance value of the pull-down resistor element 141 is represented by the symbol R 12 The resistance value of the pull-down resistor element 142 is represented by the symbol R 13 The resistance value of the pull-down resistor element 143 is represented by the symbol R X represents the resistance value obtained by connecting multiple pull-down resistors in parallel, then the voltage V1 of the analog pin can be calculated by the following formula:

[0151]

[0152] The voltage V1 of the analog pin is related to the resistance value R0 and the resistance value R X Related, the resistance value R X and the resistance value R 11 , resistance value R 12 and the resistance value R 13 During the use of the electronic device, since the pull-up resistor element 13 remains unchanged, the resistance value R0 will not change. Fig.14 In the connector 3 shown, when each detection circuit is turned on, R X is the resistance value obtained by connecting the pull-down resistor element 141, the pull-down resistor element 142 and the pull-down resistor element 143 in parallel. When any one of the detection circuits is disconnected, the pull-down resistor element in the detection circuit cannot be connected in parallel with other pull-down resistor elements, and R XFor example, when the connection between the peripheral device 202 and the circuit board 1 is abnormal, the detection circuit corresponding to the peripheral device 202 is disconnected, and the pull-down resistor element 142 is removed from the multiple parallel pull-down resistor elements. The pull-down resistor element 142 cannot be connected in parallel with the pull-down resistor element 141 and the pull-down resistor element 143. X is the resistance value obtained by connecting the pull-down resistor element 141 and the pull-down resistor element 143 in parallel.

[0153] Combination Fig.14 and Fig.15 It can be seen that when all peripheral devices 2 are abnormally connected to the circuit board 1, all detection circuits are disconnected and the detection pins are suspended. X is infinite, and the voltage of the analog pin is pulled up by the pull-up resistor element 13 to the voltage V0 of the power supply 12.

[0154] When multiple resistors are connected in parallel, the more resistors are connected in parallel, the greater the resistance value R X The smaller the resistor, the smaller the number of resistors. X The larger the value. From the above formula, we can know that the parallel resistance value R X The larger the value, the greater the voltage at the detection pin. Fig.14 When all three detection circuits in are turned on, Fig.15 The number of resistors in parallel is the largest, and the resistance value is R X Minimum, the voltage value of the analog pin is the smallest. The voltage of the detection pin in this case can be used as the voltage threshold. When the voltage of the detection pin is higher than the voltage threshold, it means that one or more pull-down resistor elements are not connected in parallel. It can be determined that one or more detection circuits are disconnected, and there is an abnormal connection between one or more peripheral devices and the circuit board.

[0155] In summary, for the device group consisting of peripheral device 201, peripheral device 202 and peripheral device 203, the processor can record the voltage of the analog pin when all three detection circuits are turned on, and use the voltage as the voltage threshold. When a peripheral device in the device group fails or the electronic device is started, the processor reads the actual voltage of the detection pin. If the actual voltage is equal to voltage V0, it is determined that all detection circuits are disconnected and all peripheral devices 2 are abnormally connected to the circuit board 1. When the actual voltage is higher than the voltage threshold and is not equal to voltage V0, it is determined that one or more of the multiple detection circuits are disconnected, and one peripheral device 2 or multiple peripheral devices 2 in the device group are abnormally connected to the circuit board 1. When the actual voltage matches the voltage threshold, it can be determined that all detection circuits are turned on, each peripheral device is normally connected to the circuit board, and at this time, it is determined that all connectors are in contact normally.

[0156] When it is determined that all peripheral devices are normally connected to the circuit board, the cause of the failure due to abnormal connection between the peripheral device and the circuit board can be ruled out, and the cause of the failure of the faulty peripheral device is determined to be an abnormality in the peripheral device itself.

[0157] It should be noted that the actual voltage of the analog pin is the voltage of the analog pin detected in real time. Since the analog pin has a certain detection accuracy, it can be determined that the actual voltage matches the reference voltage when the difference between the actual voltage and the reference voltage is less than a preset difference.

[0158] In an embodiment of the present application, when the detection pin is an analog pin and the detection pin is connected to a power supply through a pull-up resistor element, the first pins in multiple connectors can be connected in parallel to the same detection pin, and the second pin in each connector is sequentially connected to the ground point through a corresponding pull-down resistor element, and the connection between multiple peripheral devices and the circuit board can be detected through a detection pin of the processor. When the electronic device includes a large number of peripheral devices, and it is necessary to troubleshoot the cause of the failure when each peripheral device fails, multiple peripheral devices can share the same analog pin, and there is no need to set a separate analog pin for each peripheral device, which can reduce the pin usage of the processor.

[0159] Combination Fig.14 and Fig.15 As shown, when the detection pin is an analog pin, the device group may include one or more peripheral devices. The number of peripheral devices included in the device group can be set according to demand, and this embodiment does not limit this.

[0160] Optionally, the second pins 312 of multiple connectors 3 are respectively connected to the ground point 11 through pull-down resistor elements 14 with different resistance values; when the actual voltage is higher than the voltage threshold, the processor 4 determines a target reference voltage matching the actual voltage from multiple reference voltages, and determines that the connection between the target peripheral device corresponding to the target reference voltage and the circuit board is abnormal; wherein the target reference voltage includes the voltage of the analog pin when the connection between the target peripheral device 2 and the circuit board 1 is abnormal and the connection between other peripheral devices 2 and the circuit board 1 is normal.

[0161] In combination with the above example, the voltage threshold is the voltage of the analog pin when the multiple peripheral devices 2 in the device group are connected to the circuit board 1 normally. Fig.14 It can be seen that when the three peripheral devices 2 are connected to the circuit board 1 normally, the pull-down resistor element 141, the pull-down resistor element 142 and the pull-down resistor element 143 are connected in parallel, and the resistance value R at this time is X Minimum, the voltage of the analog pin reaches the minimum value, which can be used as the voltage threshold.

[0162] In one embodiment, when the first pins 311 of multiple connectors 3 are connected in parallel to the same analog pin, the second pin 312 of each connector 3 can be connected to the ground point 11 through pull-down resistor elements 14 with different resistance values. Fig.14 As shown, the pull-down resistor element 141 , the pull-down resistor element 142 , and the pull-down resistor element 143 may be set to resistors with different resistance values.

[0163] Combination Fig.15 When the three pull-down resistor elements 14 have different resistance values, when any detection path is disconnected, the resistance value of the pull-down resistor element 14 removed from the multiple pull-down resistor elements 14 connected in parallel is different, and different resistance values ​​R X , which allows the analog pins to have different voltages. Fig.15 In the above example, there are several situations as follows: In situation 1, all three peripheral devices are connected to circuit board 1 normally, and the resistance value R X The pull-down resistor element 141, the pull-down resistor element 142 and the pull-down resistor element 143 are connected in parallel; Case 2, the peripheral device 201 is abnormally connected to the circuit board 1, and the peripheral devices 202 and 203 are normally connected to the circuit board 1, and the resistance value R X The pull-down resistor element 142 and the pull-down resistor element 143 are connected in parallel; Case 3, the peripheral device 202 is abnormally connected to the circuit board 1, and the peripheral devices 201 and 203 are normally connected to the circuit board 1, and the resistance value R X The pull-down resistor element 141 and the pull-down resistor element 143 are connected in parallel; Case 4, the peripheral device 203 is abnormally connected to the circuit board 1, and the peripheral devices 201 and 202 are normally connected to the circuit board. The resistance value R X The pull-down resistor element 141 and the pull-down resistor element 142 are connected in parallel; Case 5, the peripheral device 201 is abnormally connected to the circuit board 1, and the peripheral device 202 is abnormally connected to the circuit board 1, and the peripheral device 203 is normally connected to the circuit board 1, and the resistance value R X is the resistance value of the pull-down resistor element 143; Case 6, the connection between the peripheral device 201 and the circuit board 1 is abnormal, and the connection between the peripheral device 203 and the circuit board 1 is abnormal, and the connection between the peripheral device 202 and the circuit board is normal, and the resistance value R X is the resistance value of the pull-down resistor element 142; Case 7, the connection between the peripheral device 202 and the circuit board 1 is abnormal, and the connection between the peripheral device 203 and the circuit board 1 is abnormal, the connection between the peripheral device 201 and the circuit board 1 is normal, and the resistance value R X is the resistance value of the pull-down resistor element 141; Case 8, the connection between the peripheral device 201 and the circuit board 1 is abnormal, the connection between the peripheral device 202 and the circuit board 1 is abnormal, and the connection between the peripheral device 203 and the circuit board 1 is abnormal, and the resistance value R X Is infinite.

[0164] Combination Fig.14 As shown, if V0 is equal to 1.8 volts (V), the resistance of the pull-up resistor element 13 is 15 kΩ (kilo ohms, kohm), the resistance of the pull-down resistor element 141 is 20 kΩ, the resistance of the pull-down resistor element 142 is 15 kΩ, and the resistance of the pull-down resistor element 143 is 10 kΩ. Table 1 shows the resistance values ​​R in various cases. X , and the voltage of the analog pin.

[0165] Table 1

[0166] Case 1 Case 2 Case 3 Case 4 Case 5 Case 6 Case 7 Case 8 <![CDATA[R X (kΩ)]]> 4.62 6.00 6.67 8.57 10 15 20 infinity Voltage (V) 0.42 0.51 0.55 0.65 0.72 0.90 1.03 1.8

[0167] As can be seen from Table 1, when the second pin 312 in each connector 3 is connected to the ground point 11 through the pull-down resistor element 14 with different resistance values, the analog pin can have different voltages in each case. The voltages shown in Table 1 can be used as reference voltages, and multiple reference voltages can be stored. During the detection process, when the actual voltage of the analog pin matches a certain reference voltage (the reference voltage is the target reference voltage), the target peripheral device with abnormal connection to the circuit board can be determined based on the target reference voltage.

[0168] For example, if it is detected that the actual voltage of the analog pin matches the reference voltage corresponding to case 3, it can be determined that the connection between peripheral device 2 and circuit board 1 is abnormal, the connection between other peripheral devices and the circuit board is normal, and peripheral device 2 is the target peripheral device. If it is detected that the actual voltage of the analog pin matches the reference voltage corresponding to case 5, it can be determined that the connection between peripheral device 201 and circuit board 1 is abnormal, the connection between peripheral device 202 and circuit board 1 is abnormal, the connection between peripheral device 203 and the circuit board is normal, and peripheral devices 201 and 202 are target peripheral devices.

[0169] Among them, since the analog pin has a certain accuracy, in each of the above cases, the voltage of the analog pin varies within a certain voltage range. For example, in case 1, the maximum value of the voltage of the analog pin is 0.48V and the minimum value is 0, so the voltage range corresponding to case 1 can be set to 0-0.48V; in case 2, the maximum value of the voltage of the analog pin is 0.53V and the minimum value is 0.49V, so the voltage range corresponding to case 2 can be set to 0.49-0.53V; in case 3, the maximum value of the voltage of the analog pin is 0.6V and the minimum value is 0.53V, so the voltage range corresponding to case 3 can be set to 0.53-0.6V; in case 4, the maximum value of the voltage of the analog pin is 0.61V and the minimum value is 0.68V, so the voltage range corresponding to case 4 can be set to 0.61-0.68V. Case 5, Case 6, Case 7 and Case 8 can be summarized into one case. In Case 5, Case 6, Case 7 and Case 8, the maximum value of the voltage of the analog pin is 0.8V and the minimum value is 0.69V. Then the voltage range corresponding to Case 5, Case 6, Case 7 and Case 8 can be set to 0.69-1.8V.

[0170] The reference voltage of each case is within the corresponding voltage range. When determining the reference voltage that matches the actual voltage, the target voltage range in which the actual voltage is located can be determined, and the reference voltage corresponding to the target voltage range is used as the reference voltage that matches the actual voltage. For example, the reference voltage of case 4 is 0.65V, and the voltage range corresponding to case 4 is 0.61-0.68V. The reference voltage 0.65V is within the voltage range 0.61-0.68V. When the actual voltage is within the voltage range 0.61-0.68V, the target reference voltage that matches the actual voltage is determined to be 0.65V.

[0171] At the same time, the voltage threshold is the reference voltage corresponding to case 1. When the actual voltage is within the voltage range corresponding to case 1, it can be determined that the actual voltage matches the voltage threshold, that is, is lower than the voltage threshold. Alternatively, the maximum value within the voltage range corresponding to the case can be used as the voltage threshold, for example, 0.48V can be used as the voltage threshold.

[0172] In practical applications, the resistance value of each pull-down resistor element can be set according to the accuracy of the analog pin, so that each of the above cases can correspond to a different voltage range.

[0173] Fig.16 This is another detection flow diagram provided by an embodiment of the present application. During the detection process, the processor first executes step 161 to initialize the analog pin and clear the historical voltage read by the analog pin. Then, the processor executes step 162 to read the actual voltage of the analog pin. After reading the actual voltage of the analog pin, the processor executes step 163.

[0174] In step 163 , the processor determines the target voltage range in which the actual voltage is located from the multiple voltage ranges in the above examples, that is, determines the target reference voltage that matches the actual voltage, and executes step 164 after determining the target reference voltage.

[0175] In step 164, it is determined whether there is a peripheral device 2 that is abnormally connected to the circuit board 1. Specifically, when the target voltage range is the voltage range corresponding to situation 1, that is, the actual voltage is lower than the voltage threshold, step 165 is executed to determine that all peripheral devices 2 in the device group are normally connected to the circuit board. On the contrary, if it is determined that the target voltage range is not the voltage range corresponding to the voltage threshold, that is, the actual voltage is higher than the voltage threshold, it is determined that the target peripheral device corresponding to the target voltage range is abnormally connected to the circuit board, that is, the target peripheral device corresponding to the target reference voltage is abnormally connected to the circuit board, and then step 166 is executed.

[0176] In step 166, the processor determines the number of times the abnormal connection between the target peripheral device and the circuit board is detected, and when the number reaches N, step 167 is executed. When N times is less than N, the processor returns to step 162, reads the actual voltage of the analog pin again, and repeats steps 162, 163, and 164.

[0177] In step 167, the processor may obtain a detection result of abnormal connection between the target peripheral device and the circuit board.

[0178] After executing step 165 or step 167, execute step 168 to end the detection process, and then execute step 169 to report the detection result.

[0179] In an embodiment of the present application, when the detection pin is an analog pin and the second pin in a plurality of connectors is connected to a ground point through a pull-down resistor with different resistance values, the processor can determine the target peripheral device with an abnormal connection with the processor among a plurality of peripheral devices based on the actual voltage of the analog pin. While reducing the pin usage of the processor, the peripheral device with an abnormal connection with the circuit board can be determined from a plurality of peripheral devices, and the cause of the failure of the peripheral device can be accurately eliminated.

[0180] Combination Fig.14 As shown, when the peripheral device 201 fails, the processor executes Fig.16If the detection result is that all peripheral devices 2 are connected to the circuit board 1 normally, it can be determined that the cause of the failure of the peripheral device 201 is not caused by the abnormal connection between the peripheral device 201 and the circuit board 1. If the detection result is that the connection between the peripheral device 201 and the circuit board 1 is abnormal, it is determined that the cause of the failure of the peripheral device 201 is most likely the abnormal connection between the peripheral device 201 and the circuit board 1. If the detection result is that the connection between the peripheral device 202 and / or the peripheral device 203 and the circuit board 1 is abnormal, it can also be determined that the cause of the failure of the peripheral device 201 is not caused by the abnormal connection between the peripheral device 201 and the circuit board 1.

[0181] Optionally, the plurality of peripheral devices are peripheral devices with the same function. In combination with the above example, the peripheral device 201, the peripheral device 202 and the peripheral device 203 can all be cameras. When the plurality of peripheral devices are peripheral devices with the same function, it is convenient for the electronic device to manage the detection results.

[0182] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An electronic device, characterized in that: It comprises a circuit board (1), a peripheral device (2) and a connector (3); The connector (3) comprises a first plug-in connector (31) and a second plug-in connector (32) which are plugged into and matched with each other, the first plug-in connector (31) being arranged on the circuit board (1), and the second plug-in connector (32) being connected to the peripheral device (2); The circuit board (1) is provided with a processor (4), the first connector (31) comprising a first pin (311) and a second pin (312), the first pin (311) being connected to a detection pin of the processor (4), and the second pin (312) being connected to a ground point (11) on the circuit board (1); The second plug connector (32) comprises a third pin (321) connected to the first pin (311), and a fourth pin (322) connected to the second pin (312), the third pin (321) and the fourth pin (322) being short-circuited; The detection pin, the first pin (311), the second pin (312), the third pin (321), the fourth pin (322) and the grounding point (11) are connected to form a detection circuit; The processor (4) is used for: The detection pin in the detection circuit is detected, and the connection state between the peripheral device (2) and the circuit board (1) is determined based on the detected voltage of the detection pin.

2. The electronic device according to claim 1, characterized in that: The detecting pin in the detecting circuit is detected, and the connection state between the peripheral device (2) and the circuit board (1) is determined according to the detected voltage of the detecting pin, comprising: Detecting the voltage of the detection pin; If the voltage of the detection pin is detected to be at a low level, it indicates that the connection between the peripheral device (2) and the circuit board (1) is normal; If the voltage of the detection pin is detected to be at a high level, it indicates that the connection between the peripheral device (2) and the circuit board (1) is abnormal.

3. The electronic device according to claim 1, characterized in that: The detecting pin in the detecting circuit is detected, and the connection state between the peripheral device (2) and the circuit board (1) is determined according to the detected voltage of the detecting pin, comprising: Detecting the voltage of the detection pin; If it is detected that the voltage of the detection pin is within the first target voltage range, it indicates that the connection between the peripheral device (2) and the circuit board (1) is normal; If it is detected that the voltage of the detection pin is within a second target voltage range, it indicates that the connection between the peripheral device (2) and the circuit board (1) is abnormal, and the minimum value of the second target voltage range is greater than the maximum value of the first target voltage range.

4. The electronic device according to claim 3, characterized in that: The electronic device comprises a plurality of the peripheral devices (2), and if it is detected that the voltage of the detection pin is within the second target voltage range, it indicates that the connection between the peripheral device (2) and the circuit board (1) is abnormal, comprising: If it is detected that the voltage of the detection pin is within the target reference voltage range in the second target voltage range, it indicates that there is an abnormal connection between the target peripheral device and the circuit board (1), and the target peripheral device is one or more of the plurality of peripheral devices (2).

5. The electronic device according to claim 1, wherein: The electronic device comprises a plurality of the peripheral devices (2), and a connector (3) corresponding to each of the peripheral devices (2); The first pins (311) and the second pins (312) in the plurality of connectors (3) are sequentially connected in series between the detection pin and the ground point.

6. The electronic device according to claim 1, wherein: The electronic device comprises a plurality of the peripheral devices (2), and a connector (3) corresponding to each of the peripheral devices (2); The detection pin is connected to a power source (12) on the circuit board (1) via a pull-up resistor element (13); The first pins (311) in the plurality of connectors (3) are connected in parallel to the detection pin, and the second pins (312) in the plurality of connectors (3) are connected to the ground point (11) via corresponding pull-down resistor elements (14).

7. The electronic device according to claim 6, characterized in that: The second pins (312) in the plurality of connectors (3) are connected to the ground point (11) via the pull-down resistor elements (14) with different resistance values.

8. The electronic device according to claim 1, wherein: The detection pin is connected to the power source (12) on the circuit board (1) via a pull-up resistor element (13), and the second pin (312) is connected to the ground point (11) via a pull-down resistor element (14).

9. The electronic device according to claim 1, wherein: The first pin (311) and the third pin (321) are arranged at one end of the connector (3), and the second pin (312) and the fourth pin (322) are arranged at the other end of the connector (3).

10. The electronic device according to claim 9, characterized in that: The first pin (311) and the third pin (321) are arranged at diagonally opposite corners to the second pin (312) and the fourth pin (322).

11. The electronic device according to any one of claims 1 to 10, characterized in that: The peripheral device (2) is connected to the second plug connector (32) via a flexible circuit board (5), and a plurality of leads (51) are provided on the flexible circuit board (5); The third pin (321) and the fourth pin (322) are short-circuited via a short-circuit wire (323), and the short-circuit wire (323) surrounds the plurality of leads and is arranged on the flexible circuit board (5).

12. The electronic device according to any one of claims 1 to 10, characterized in that: The peripheral device (2) is connected to the second plug connector (32) via a flexible circuit board (5), and a plurality of leads (51) are provided on the flexible circuit board (5); The third pin (321) and the fourth pin (322) are short-circuited via a short-circuit wire (323), and the short-circuit wire (323) is arranged on the flexible circuit board (5) and extends from one side of the plurality of leads (51) to the peripheral device (2).

13. The electronic device according to any one of claims 1 to 10, characterized in that: The third pin (321) and the fourth pin (322) are short-circuited via a short-circuit wire (323), and the short-circuit wire (323) is arranged on the second plug-in connector (32).

14. The electronic device according to any one of claims 1 to 10, characterized in that: The detection pin is a general input / output pin or an analog pin.

15. The electronic device according to any one of claims 4 to 7, characterized in that: The plurality of peripheral devices (2) are peripheral devices with the same functions.

16. The electronic device according to claim 5, characterized in that: The detection pin is connected to a power source (12) on the circuit board (1) via a pull-up resistor element (13).

17. The electronic device according to any one of claims 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 16, characterized in that: The connector (3) is a board-to-board connector or a zero insertion force connector.

18. The electronic device according to any one of claims 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 16, characterized in that: The circuit board (1) is a main board, a secondary board or a small board.

Citation Information

Patent Citations

  • Earphone insertion detection circuit

    CN111586549A

  • Detection circuit, detection method and device and electronic equipment

    CN112798988A