CN113009382B - Custom interface monitoring method and device - Google Patents

Custom interface monitoring method and device Download PDF

Info

Publication number
CN113009382B
CN113009382B CN202110207742.1A CN202110207742A CN113009382B CN 113009382 B CN113009382 B CN 113009382B CN 202110207742 A CN202110207742 A CN 202110207742A CN 113009382 B CN113009382 B CN 113009382B
Authority
CN
China
Prior art keywords
unit
custom
peripheral
main control
connector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110207742.1A
Other languages
Chinese (zh)
Other versions
CN113009382A (en
Inventor
王熹
林喆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sunmi Technology Group Co Ltd
Citaq Co Ltd
Original Assignee
Shanghai Sunmi Technology Group Co Ltd
Citaq Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sunmi Technology Group Co Ltd, Citaq Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN202110207742.1A priority Critical patent/CN113009382B/en
Publication of CN113009382A publication Critical patent/CN113009382A/en
Application granted granted Critical
Publication of CN113009382B publication Critical patent/CN113009382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/50Testing of electric apparatus, lines, cables or components for short-circuits, continuity, leakage current or incorrect line connections
    • G01R31/66Testing of connections, e.g. of plugs or non-disconnectable joints
    • G01R31/68Testing of releasable connections, e.g. of terminals mounted on a printed circuit board
    • G01R31/69Testing of releasable connections, e.g. of terminals mounted on a printed circuit board of terminals at the end of a cable or a wire harness; of plugs; of sockets, e.g. wall sockets or power sockets in appliances

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The invention belongs to the field of electronic equipment, and provides a custom interface monitoring method and a custom interface monitoring device, wherein the method comprises the following steps: the PCB end custom connecting unit is used for connecting external equipment through an external custom connecting unit; after the power supply voltage is divided by the pull-down resistor of the peripheral user-defined connecting unit and the pull-up resistor of the ADC detecting unit through the ADC detecting unit, the divided voltage value is read and converted into a digital signal to be uploaded to the main control unit; and judging whether the type of the external equipment conforms to a preset type or not according to the digital signal through the main control unit, and sending a switch control signal to control a corresponding power management unit. The invention can detect whether the external equipment is correctly inserted or not and provides the protection of the error insertion when the external equipment is inserted by the error.

Description

Custom interface monitoring method and device
Technical Field
The invention relates to the field of electronic equipment, in particular to a custom interface monitoring method and a custom interface monitoring device.
Background
The types of interfaces used in electronic devices tend to be uniform, and multiple identical connectors are used in a device to connect different peripherals. However, the interface definition of the connector is not different due to different requirements of the peripheral devices, such as TYPE-C interface with custom pin function included in the custom interface connector, other multi-pin connectors, and the like. Because the interfaces used are the same, the following problems may be caused in the production and use processes: because the pin sequence of each custom interface connector is not universal, when the peripheral is inserted by mistake, the equipment is abnormal. When the custom interface is electrified, the peripheral is inserted, and the equipment is abnormally damaged due to surge; when the peripheral is abnormal, for example, under the conditions of short circuit, abnormal large current, excessive peripheral insertion and the like, the power supply of the equipment cannot meet the requirement, and the equipment is powered off or damaged.
Disclosure of Invention
The invention provides a custom interface monitoring method and a custom interface monitoring device, which are used for detecting whether an external device is correctly inserted or not and providing error insertion protection when the external device is inserted in error.
The technical scheme provided by the invention is as follows:
a custom interface monitoring device, comprising:
the PCB end custom connecting unit is used for connecting external equipment through an external custom connecting unit;
the ADC detection unit is used for reading a voltage division value after the power supply voltage is divided by the pull-down resistor of the peripheral user-defined connection unit and the pull-up resistor of the ADC detection unit, converting the voltage division value into a digital signal and uploading the digital signal to the main control unit;
and the main control unit is used for judging whether the type of the external equipment conforms to a preset type according to the digital signal and sending a switch control signal to control the power supply of the power supply management unit to the external equipment.
Further preferably, the PCB end custom connecting unit includes:
the power supply interface and the monitoring interface which are connected with the PCB end in a user-defined way are respectively used for connecting the power supply interface and the monitoring interface of the external user-defined connector in the external user-defined connecting unit.
Further preferably, the custom interface monitoring device further includes:
and the power management units are connected with the main control unit and the PCB end custom connecting unit and used for receiving the switch control signal of the main control unit and supplying power or not to the PCB end custom connecting unit.
Preferably, the first input end of the power management unit is connected to the switch control signal output end of the main control unit, and is configured to receive the switch control signal output by the main control unit;
the second input end of the power management unit is connected with the PWM signal output end of the main control unit and used for receiving the PWM control signal output by the main control unit so as to control the output current;
and the output end of the power management unit is connected with the power supply port of the corresponding PCB end custom connector and is used for supplying power or not supplying power to the PCB end custom connector under the control of the switch control signal.
Further preferably, the ADC detection unit includes: a plurality of detection channels, a plurality of pull-up resistors;
the detection channel is connected with the corresponding monitoring port of the PCB end self-defined connector through a pull-up resistor.
Further preferably, the custom interface monitoring device further includes: and the power supply unit is connected with the corresponding PCB end custom connector and the corresponding detection channel through the pull-up resistor and is used for providing the power supply voltage.
A custom interface monitoring method comprises the following steps:
the PCB end custom connecting unit is used for connecting external equipment through an external custom connecting unit;
after the power supply voltage is divided by the pull-down resistor of the peripheral user-defined connecting unit and the pull-up resistor of the ADC detecting unit through the ADC detecting unit, the divided voltage value is read and converted into a digital signal to be uploaded to the main control unit;
and judging whether the type of the external equipment conforms to a preset type or not according to the digital signal through the main control unit, and sending a switch control signal to control a corresponding power management unit.
Further preferably, the determining, by the main control unit, whether the type of the external device conforms to a preset type according to the digital signal, and sending a switch control signal to control a corresponding power management unit includes:
judging whether the type of the external equipment accords with a preset type or not through the main control unit based on an ADC detection unit truth table and the digital signal;
and sending a corresponding switch control signal to a power management unit based on the judgment result so as to supply or not supply power to the external equipment.
Further preferably, the sending a corresponding switch control signal to a power management unit based on the determination result to supply or not supply power to the external device includes:
when the digital signal accords with a truth table of the ADC detection unit, the corresponding power management unit is turned on through a first switch control signal to supply power to the corresponding peripheral self-defined connector;
and when the digital signal does not conform to the truth table of the ADC detection unit, closing the corresponding power management unit through a second switch control signal.
Further preferably, the custom interface monitoring method further includes the steps of:
and sending a PWM signal to the power management unit through the main control unit so as to control the output current of the power management unit.
The invention provides a user-defined interface monitoring method and a user-defined interface monitoring device, which at least have the following beneficial effects: detecting whether the external device is correctly inserted and providing a mis-insertion protection when mis-inserted.
Drawings
The invention is described in further detail below with reference to the following figures and detailed description:
FIG. 1 is a schematic diagram of an application of a custom interface monitoring device according to the present invention;
FIG. 2 is a schematic diagram of an application of a custom interface monitoring device according to the present invention;
FIG. 3 is a diagram illustrating an embodiment of a custom interface monitoring method according to the present invention.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
For the sake of simplicity, only the parts relevant to the present invention are schematically shown in the drawings, and they do not represent the actual structure as a product. Moreover, in the interest of brevity and understanding, only one of the components having the same structure or function is illustrated schematically or designated in some of the drawings. In this document, "one" means not only "only one" but also a case of "more than one".
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
In this context, it is to be understood that, unless otherwise explicitly stated or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
Example one
The invention provides an embodiment of a custom interface monitoring device, which comprises:
and the PCB end custom connecting unit is used for connecting external equipment through the peripheral custom connecting unit.
And the ADC detection unit is used for reading a voltage division value after the pull-down resistor of the peripheral user-defined connection unit and the pull-up resistor of the ADC detection unit divide the voltage of the power supply, converting the voltage division value into a digital signal and uploading the digital signal to the main control unit.
And the main control unit is used for judging whether the type of the external equipment conforms to a preset type according to the digital signal and sending a switch control signal to control the power supply of the power supply management unit to the external equipment.
The embodiment detects whether the external device is correctly inserted through the ADC detection unit and the main control unit, and provides the protection of the wrong insertion when the external device is wrongly inserted.
Example two
Based on the foregoing embodiment, the same parts as those in the foregoing embodiment are not repeated in detail in this embodiment, and as shown in fig. 1 and 2, this embodiment provides a custom interface monitoring apparatus, including: the device comprises a PCB end user-defined connecting unit, a multi-channel ADC detection unit and a main control unit.
Wherein, PCB end self-defined linkage unit includes:
the power supply interface and the monitoring interface which are connected with the PCB end in a user-defined way are respectively used for connecting the power supply interface and the monitoring interface of the external user-defined connector in the external user-defined connecting unit.
Wherein, peripheral hardware self-defining linkage unit includes:
the peripheral self-defining connectors comprise pull-down resistors, power supply interfaces and monitoring interfaces; and the pull-down resistor is used for setting a truth table of the ADC detection unit.
The resistance value of the pull-down resistor can be set as required, and the truth table of the ADC detection unit of the pull-down resistor can be set through software.
The ADC detection unit comprises a multi-channel ADC detection unit, wherein the multi-channel ADC detection unit comprises: a plurality of detection channels and a plurality of pull-up resistors.
The detection channel is connected with the corresponding monitoring port of the PCB end self-defined connector through a pull-up resistor.
Illustratively, the embodiment includes a functional module and a custom connector interface, specifically including custom connectors B1 to Bn used by peripheral devices; self-defining connectors A1 to An at the PCB end; the PCB board end can regulate output voltage/current, and the power supply management units have a current limiting function from 1 to n; a multi-channel ADC detection unit; a CPU main control unit; the pull-down resistor R in the peripheral custom connector is connected to the ground; each channel of the multi-channel ADC detection unit is provided with a pull-up resistor Ru which is connected to a power supply VDD; the peripheral custom connector Bn corresponds to the PCB board end custom connector An in a one-to-one mode, and comprises a pin sequence and a pin function: b1 corresponds to A1, B2 corresponds to A2, \8230;, bn corresponds to An; monitoring pins B1-Bn of the peripheral custom connectors B1-Bn are all provided with a corresponding pull-down resistor R connected to the ground, the resistance value of the pull-down resistor R can be set at will, and an ADC detection unit truth table is set in advance through a software mode.
Wherein, the peripheral hardware self-defines the pin order of the connector B1: power supply interface b1, monitoring pin b1, ground, other interfaces. The PCB board end self-defines the pin sequence of the connector A1: the power supply interface a1 is used for monitoring the pin a1, and the ground and other interfaces are used; the pin sequence of the peripheral self-defining connector Bn is self-defined as follows: monitoring a pin bn, a power supply interface bn, a ground interface and other interfaces; the pin sequence of the PCB end custom connector An is customized as follows: monitoring pins an, a power supply interface bn, a ground and other interfaces; the pin sequence of the peripheral custom connector B2 is customized as follows: monitoring pin b2, power supply interface b2, ground and other interfaces.
The user-defined interface monitoring device further comprises: and the power supply unit (VDD) is connected with the corresponding PCB end self-defined connector and the corresponding detection channel through the pull-up resistor and is used for providing the power supply voltage.
Preferably, the custom interface monitoring device further includes:
and the power management units are connected with the main control unit and the PCB end custom connecting unit and used for receiving the switch control signal of the main control unit and supplying or not supplying power to the PCB end custom connecting unit.
Preferably, the first input end of the power management unit is connected to the switch control signal output end of the main control unit, and is configured to receive the switch control signal output by the main control unit.
And the second input end of the power management unit is connected with the PWM signal output end of the main control unit and used for receiving the PWM control signal output by the main control unit so as to control the output current.
And the output end of the power management unit is connected with the power supply port of the corresponding PCB end custom connector and is used for supplying power or not supplying power to the PCB end custom connector under the control of the switch control signal.
Specifically, after a pull-down resistor R of the peripheral self-defined connector and a pull-up resistor Ru on a channel of the multi-channel ADC detection unit divide the voltage of the VDD, the ADC detection unit reads the divided voltage value and converts the voltage value into a digital signal to upload the digital signal to a CPU main control unit for processing. When the judgment result accords with the truth table of the ADC detection unit, the CPU main control unit judges that the external type meets the requirement, the power management unit is turned on through a switch control signal to supply power to the external custom connector, and the output current capacity of the power management unit is controlled through a PWM signal; when the judgment result is not in accordance with the truth table of the ADC detection unit, the CPU main control unit judges that the type of the peripheral does not meet the requirement, and the power management unit is not turned on, so that power is not supplied to the peripheral self-defined connector. Firstly, whether the requirements are met or not is judged through the ADC, power is supplied when the requirements are met, power is not supplied when the requirements are not met, and protection of misplug and live insertion is provided.
With proper insertion of multiple peripheral custom connectors as shown in figure 1,
the peripheral custom connector B1 is inserted into the PCB end custom connector A1. A power supply interface B1 of the peripheral custom connector B1 is connected to a power supply interface A1 of the PCB end custom connector A1; a monitoring pin B1 of the peripheral custom connector B1 is connected to a monitoring pin A1 of the PCB end custom connector A1; the ground of the peripheral custom connector B1 is connected with the ground of the PCB end custom connector A1; and other interfaces of the peripheral custom connector B1 are connected with other interfaces of the PCB end custom connector A1.
After voltage division is carried out on VDD by a pull-down resistor R1 of a monitoring pin B1 of the peripheral custom connector B1 and a pull-up resistor Ru of a monitoring pin A1 of the PCB end custom connector A1, a channel 1 of the multi-channel ADC detection unit reads a divided voltage value, converts the divided voltage value into a digital signal and transmits the digital signal to the CPU main control unit through an I2C signal. The CPU main control unit judges that a correct peripheral custom connector B1 is inserted, the power management unit 1 is turned on through the switch control signal 1, correct voltage/current is output, and the power is transmitted to a power supply interface B1 of the peripheral custom connector B1 through a power supply interface A1 of the PCB board end custom connector A1 to finish power supply to the peripheral.
Similarly, the peripheral custom connector Bn is inserted into the PCB end custom connector An.
When a plurality of peripheral self-defined connectors B1-Bn are inserted simultaneously, the CPU main control unit can select the power management units 1-n needing to be opened in real time, can adjust the voltage/current output by the power management units in real time, provides current-limiting protection and prevents the peripheral from having abnormal short circuit and heavy current.
As shown in fig. 2, in the case of a wrong inserted peripheral custom connector
The peripheral custom connector Bn is inserted into the PCB end custom connector A1. A monitoring pin Bn of the peripheral custom connector Bn is connected to a power supply interface A1 of the PCB board end custom connector A1; a power supply interface Bn of the peripheral custom connector Bn is connected to a monitoring pin A1 of the PCB board end custom connector A1; the ground of the peripheral custom connector Bn is connected with the ground of the PCB end custom connector A1; and other interfaces of the peripheral custom connector Bn are connected with other interfaces of the PCB end custom connector A1.
The power supply interface Bn of the peripheral custom connector Bn has no pull-down resistor Rn, voltage division cannot be performed on VDD through a pull-up resistor Ru of a monitoring pin A1 of the PCB board end custom connector A1, a channel 1 of the multi-channel ADC detection unit is converted into a digital signal after reading a voltage division value and transmits the digital signal to the CPU main control unit through an I2C signal, and the CPU main control unit judges that the wrong peripheral custom connector Bn is inserted and does not turn on the power management unit 1.
And the peripheral custom connector B2 is inserted into the PCB end custom connector An. A monitoring pin B2 of the peripheral custom connector B2 is connected to a monitoring pin An of a PCB board end custom connector An; a power supply interface B2 of the peripheral custom connector B2 is connected to a power supply interface An of the PCB end custom connector An; the ground of the peripheral custom connector B2 is connected with the ground of the PCB end custom connector An; and other interfaces of the peripheral custom connector B2 are connected with other interfaces of the PCB end custom connector An. After voltage division is carried out on VDD by a pull-down resistor R2 of a monitoring pin B2 of the peripheral custom connector B2 and a pull-up resistor Ru of a monitoring pin An of the PCB end custom connector An, a channel n of the multi-channel ADC detection unit reads a divided voltage value, converts the divided voltage value into a digital signal and transmits the digital signal to the CPU main control unit through An I2C signal. And comparing the truth table with the CPU main control unit, judging that the peripheral self-defined connector B2 which is inserted by mistake is inserted, and not turning on the power management unit n.
The following problems of the custom interface can be solved in the embodiment: detecting whether the peripheral is correctly inserted or not, and providing error insertion protection; the live insertion protection peripheral prevents the surge high voltage generated when the live insertion connector is inserted from damaging the peripheral; the multi-peripheral plug-in can detect the type of the plugged equipment and dynamically adjust the output voltage/current capability of each custom interface; when the peripheral consumes power abnormally (short circuit), the working state of the whole machine is protected, and the shutdown or damage of the system can not be caused.
EXAMPLE III
Based on the foregoing embodiment, the same parts as those in the foregoing embodiment are not described in detail in this embodiment, and as shown in fig. 3, this embodiment provides a custom interface monitoring method, including:
s100, the PCB end custom connecting unit is used for connecting external equipment through the peripheral custom connecting unit.
S200, dividing the voltage of a power supply by the pull-down resistor of the peripheral user-defined connecting unit and the pull-up resistor of the ADC detecting unit through the ADC detecting unit, reading a divided voltage value, converting the divided voltage value into a digital signal, and uploading the digital signal to the main control unit.
S300, judging whether the type of the external equipment accords with a preset type or not through the main control unit according to the digital signal, and sending a switch control signal to control a corresponding power management unit.
In this embodiment, the following problems of the custom interface can be solved in this embodiment: detecting whether the peripheral is correctly inserted or not, and providing error insertion protection; the live insertion protection peripheral prevents the surge high voltage generated when the live insertion connector is inserted from damaging the peripheral; the multi-peripheral plug-in can detect the type of the plugged equipment and dynamically adjust the output voltage/current capability of each custom interface; when the peripheral consumes power abnormally (short circuit), the working state of the whole machine is protected, and the shutdown or damage of the system can not be caused.
Example four
Based on the foregoing embodiment, parts in this embodiment that are the same as those in the foregoing embodiment are not described again, and this embodiment provides a custom interface monitoring method, including:
s100, the PCB end custom connecting unit is used for connecting external equipment through the peripheral custom connecting unit.
S200, dividing the voltage of a power supply by the pull-down resistor of the peripheral user-defined connecting unit and the pull-up resistor of the ADC detecting unit through the ADC detecting unit, reading a divided voltage value, converting the divided voltage value into a digital signal, and uploading the digital signal to the main control unit.
S300, judging whether the type of the external equipment accords with a preset type or not according to the digital signal through the main control unit, and sending a switch control signal to control a corresponding power management unit.
In step S300, the step of determining whether the type of the external device conforms to a preset type according to the digital signal by the main control unit, and sending a switch control signal to control the corresponding power management unit includes the steps of:
and judging whether the type of the external equipment accords with a preset type or not through the main control unit based on an ADC detection unit truth table and the digital signal.
And sending a corresponding switch control signal to a power management unit based on the judgment result so as to supply or not supply power to the external equipment.
Preferably, the sending a corresponding switch control signal to a power management unit based on the determination result to supply or not supply power to the external device includes:
and when the digital signal accords with the truth table of the ADC detection unit, the corresponding power management unit is turned on through the first switch control signal to supply power to the corresponding peripheral self-defined connector.
Preferably, the method for monitoring the custom interface further includes the steps of:
and sending a PWM signal to the power management unit through the main control unit so as to control the output current of the power management unit.
With proper insertion of multiple peripheral custom connectors as shown in figure 1,
the peripheral custom connector B1 is inserted into the PCB end custom connector A1. A power supply interface B1 of the peripheral custom connector B1 is connected to a power supply interface A1 of the PCB end custom connector A1; a monitoring pin B1 of the peripheral custom connector B1 is connected to a monitoring pin A1 of the PCB end custom connector A1; the ground of the peripheral custom connector B1 is connected with the ground of the PCB end custom connector A1; and other interfaces of the peripheral custom connector B1 are connected with other interfaces of the PCB end custom connector A1.
After voltage division is carried out on VDD by a pull-down resistor R1 of a monitoring pin B1 of the peripheral custom connector B1 and a pull-up resistor Ru of a monitoring pin A1 of the PCB end custom connector A1, a channel 1 of the multi-channel ADC detection unit reads a divided voltage value, converts the divided voltage value into a digital signal and transmits the digital signal to the CPU main control unit through an I2C signal. The CPU main control unit judges that a correct peripheral self-defining connector B1 is inserted, the power management unit 1 is turned on through the switch control signal 1, correct voltage/current is output, and power is transmitted to a power supply interface B1 of the peripheral self-defining connector B1 through a power supply interface A1 of the PCB end self-defining connector A1, so that power supply for peripheral equipment is completed.
Similarly, the peripheral custom connector Bn is inserted into the PCB end custom connector An.
When a plurality of peripheral self-defined connectors B1-Bn are inserted simultaneously, the CPU main control unit can select the power management units 1-n needing to be opened in real time, can adjust the voltage/current output by the power management units in real time, provides current-limiting protection and prevents the peripheral from having abnormal short circuit and heavy current.
EXAMPLE five
Based on the foregoing embodiment, parts in this embodiment that are the same as those in the foregoing embodiment are not described again, and this embodiment provides a custom interface monitoring method, including:
s100, the PCB end custom connecting unit is used for connecting external equipment through the peripheral custom connecting unit.
S200, dividing the voltage of a power supply by the pull-down resistor of the peripheral user-defined connecting unit and the pull-up resistor of the ADC detecting unit through the ADC detecting unit, reading a divided voltage value, converting the divided voltage value into a digital signal, and uploading the digital signal to the main control unit.
S300, judging whether the type of the external equipment accords with a preset type or not according to the digital signal through the main control unit, and sending a switch control signal to control a corresponding power management unit.
In step S300, the step of determining, by the main control unit, whether the type of the external device conforms to a preset type according to the digital signal, and sending a switch control signal to control a corresponding power management unit includes the steps of:
and judging whether the type of the external equipment accords with a preset type or not through the main control unit based on an ADC detection unit truth table and the digital signal.
And sending a corresponding switch control signal to a power management unit based on the judgment result so as to supply or not supply power to the external equipment.
Preferably, the sending a corresponding switch control signal to a power management unit based on the determination result to supply or not supply power to the external device includes:
and when the digital signal does not conform to the truth table of the ADC detection unit, closing the corresponding power management unit through a second switch control signal.
As shown in fig. 2, in the case of a wrong inserted peripheral custom connector
The peripheral custom connector Bn is inserted into the PCB end custom connector A1. A monitoring pin Bn of the peripheral custom connector Bn is connected to a power supply interface A1 of the PCB board end custom connector A1; a power supply interface Bn of the peripheral custom connector Bn is connected to a monitoring pin A1 of the PCB board end custom connector A1; the ground of the peripheral custom connector Bn is connected with the ground of the PCB end custom connector A1; and other interfaces of the peripheral custom connector Bn are connected with other interfaces of the PCB end custom connector A1.
The power supply interface Bn of the peripheral custom connector Bn has no pull-down resistor Rn, voltage division cannot be performed on VDD by the pull-up resistor Ru of the monitoring pin A1 of the PCB end custom connector A1, the voltage division value is read by a channel 1 of the multi-channel ADC detection unit and then converted into a digital signal, the digital signal is transmitted to the CPU main control unit through an I2C signal, and the CPU main control unit judges that the wrong peripheral custom connector Bn is inserted and does not turn on the power management unit 1.
The peripheral custom connector B2 is inserted into the PCB end custom connector An. A monitoring pin B2 of the peripheral custom connector B2 is connected to a monitoring pin An of a PCB end custom connector An; a power supply interface B2 of the peripheral custom connector B2 is connected to a power supply interface An of the PCB end custom connector An; the ground of the peripheral custom connector B2 is connected with the ground of the PCB end custom connector An; and other interfaces of the peripheral custom connector B2 are connected with other interfaces of the PCB end custom connector An. After voltage division is carried out on VDD by a pull-down resistor R2 of a monitoring pin B2 of the peripheral custom connector B2 and a pull-up resistor Ru of a monitoring pin An of the PCB end custom connector An, a channel n of the multi-channel ADC detection unit reads a divided voltage value, converts the divided voltage value into a digital signal and transmits the digital signal to the CPU main control unit through An I2C signal. And comparing the truth table with the CPU main control unit, judging that the peripheral self-defined connector B2 which is inserted by mistake is inserted, and not turning on the power management unit n.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or recited in detail in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other ways. The above-described embodiments of the apparatus/electronic device are merely exemplary, and the described modules or units may be divided into only one logical functional division for practical implementation, and may have another division manner. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A custom interface monitoring device, comprising:
the PCB end self-defining connecting unit is used for connecting external equipment through an external self-defining connecting unit;
the peripheral self-defining connecting unit comprises self-defining connectors B1-Bn used by the peripheral; the PCB end self-defining connecting unit comprises PCB end self-defining connectors A1-An; the peripheral custom connectors B1-Bn correspond to the PCB board end custom connectors A1-An in a one-to-one manner, and comprise a pin sequence and a pin function;
the ADC detection unit is used for reading a voltage division value after the pull-down resistor of the peripheral self-defined connection unit and the pull-up resistor of the ADC detection unit divide the power supply voltage, converting the voltage division value into a digital signal and uploading the digital signal to the main control unit;
and the main control unit is used for judging whether the type of the external equipment conforms to a preset type according to the digital signal and sending a switch control signal to control the power supply of the power supply management unit to the external equipment.
2. The custom interface monitoring device of claim 1, wherein the PCB-side custom connection unit comprises:
the power supply interface and the monitoring interface which are connected with the PCB end in a user-defined mode are respectively used for being connected with the power supply interface and the monitoring interface of the external user-defined connector in the external user-defined connection unit.
3. The custom interface monitoring device of claim 2, further comprising:
and the power management units are connected with the main control unit and the PCB end custom connecting unit and used for receiving the switch control signal of the main control unit and supplying or not supplying power to the PCB end custom connecting unit.
4. The custom interface monitoring device of claim 3, wherein:
the first input end of the power management unit is connected with the switch control signal output end of the main control unit and used for receiving the switch control signal output by the main control unit;
the second input end of the power management unit is connected with the PWM signal output end of the main control unit and used for receiving the PWM control signal output by the main control unit so as to control the output current;
and the output end of the power management unit is connected with the power supply port of the corresponding PCB end custom connector and is used for supplying power or not supplying power to the PCB end custom connector under the control of the switch control signal.
5. The custom interface monitoring device according to any one of claims 2-4, wherein the ADC detection unit comprises: a plurality of detection channels, a plurality of pull-up resistors;
the detection channel is connected with the corresponding monitoring port of the PCB end self-defined connector through a pull-up resistor.
6. The custom interface monitoring device of claim 5, further comprising: and the power supply unit is connected with the corresponding PCB end custom connector and the corresponding detection channel through the pull-up resistor and is used for providing the power supply voltage.
7. A custom interface monitoring method is characterized by comprising the following steps:
the PCB end custom connecting unit is used for connecting external equipment through an external custom connecting unit;
the peripheral self-defining connecting unit comprises self-defining connectors B1-Bn used by the peripheral; the PCB end self-defining connecting unit comprises PCB end self-defining connectors A1-An; the peripheral self-defining connectors B1-Bn correspond to the PCB board end self-defining connectors A1-An one to one, and the pin sequence and the pin function are included;
after the power supply voltage is divided by the pull-down resistor of the peripheral user-defined connecting unit and the pull-up resistor of the ADC detecting unit through the ADC detecting unit, the divided voltage value is read and converted into a digital signal to be uploaded to the main control unit;
and judging whether the type of the external equipment conforms to a preset type or not according to the digital signal through the main control unit, and sending a switch control signal to control a corresponding power management unit.
8. The method for monitoring the custom interface according to claim 7, wherein the step of determining whether the type of the external device is in accordance with a preset type according to the digital signal by the main control unit and sending a switch control signal to control a corresponding power management unit comprises the steps of:
judging whether the type of the external equipment accords with a preset type or not through the main control unit based on an ADC detection unit truth table and the digital signal;
and sending a corresponding switch control signal to a power management unit based on the judgment result so as to supply or not supply power to the external equipment.
9. The method for monitoring the custom interface according to claim 8, wherein the step of sending a corresponding switch control signal to a power management unit to supply or not supply power to the external device based on the determination result comprises the steps of:
when the digital signals accord with a truth table of the ADC detection unit, the corresponding power management unit is turned on through a first switch control signal to supply power to the corresponding peripheral self-defined connector;
and when the digital signal does not conform to the truth table of the ADC detection unit, closing the corresponding power management unit through a second switch control signal.
10. The custom interface monitoring method of claim 8, further comprising the steps of:
and sending a PWM signal to the power management unit through the main control unit so as to control the output current of the power management unit.
CN202110207742.1A 2021-02-25 2021-02-25 Custom interface monitoring method and device Active CN113009382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110207742.1A CN113009382B (en) 2021-02-25 2021-02-25 Custom interface monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110207742.1A CN113009382B (en) 2021-02-25 2021-02-25 Custom interface monitoring method and device

Publications (2)

Publication Number Publication Date
CN113009382A CN113009382A (en) 2021-06-22
CN113009382B true CN113009382B (en) 2022-10-18

Family

ID=76385858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110207742.1A Active CN113009382B (en) 2021-02-25 2021-02-25 Custom interface monitoring method and device

Country Status (1)

Country Link
CN (1) CN113009382B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203774570U (en) * 2014-03-27 2014-08-13 东莞天意电子有限公司 Novel special-purpose USB interface
CN206270708U (en) * 2016-11-18 2017-06-20 东莞泰克威科技有限公司 It is a kind of can automatic network-building intelligent socket system and its smart jack

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064489B (en) * 2011-10-21 2016-03-30 华为终端有限公司 A kind of method and terminal of carrying out internal circuit selection according to USB interface state
CN106300501B (en) * 2016-07-26 2019-02-12 Oppo广东移动通信有限公司 A kind of adapter recognition methods and intelligent mobile terminal
CN106100084B (en) * 2016-07-28 2018-05-29 广东欧珀移动通信有限公司 Charging system, terminal, power supply adaptor and charging wire
TWI611648B (en) * 2017-01-18 2018-01-11 廣達電腦股份有限公司 Two way charging-discharging circuit structure
CN109814045A (en) * 2017-11-17 2019-05-28 中兴通讯股份有限公司 A kind of device and method for testing optical interface
CN211906270U (en) * 2020-05-19 2020-11-10 南方电网科学研究院有限责任公司 485 device and RS485 interface of self-adaptation serial bus polarity

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203774570U (en) * 2014-03-27 2014-08-13 东莞天意电子有限公司 Novel special-purpose USB interface
CN206270708U (en) * 2016-11-18 2017-06-20 东莞泰克威科技有限公司 It is a kind of can automatic network-building intelligent socket system and its smart jack

Also Published As

Publication number Publication date
CN113009382A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
US7746090B1 (en) System for testing connections of two connectors
CN203277900U (en) Accessory
US8628004B2 (en) Automation control system components with electronic keying features
US6896541B2 (en) Interface connector that enables detection of cable connection
US20080299819A1 (en) Connection detection device
US7880734B2 (en) Comprehensive control system
US11540413B2 (en) Base module and functional module for a switch-cabinet system, and switch-cabinet system
US20120137159A1 (en) Monitoring system and method of power sequence signal
US5404542A (en) Power line switching circuit with monitor
CN108736977A (en) A kind of optical module
CN110673989B (en) Device and method for identifying daughter board card of backboard system
JP5351251B2 (en) System and method for efficient association of power outlets and devices
CN113009382B (en) Custom interface monitoring method and device
CN107966922B (en) Single channel input/output in modular sub-chassis
CN102253686A (en) Server system and switching method thereof
TW589564B (en) Fault tolerant bus for highly available storage enclosure
US10587083B2 (en) Interface assembly that connects a peripheral device to an interface of a host system, an electronic device and a method of signaling
US6810439B2 (en) System and method to monitor connections to a device
CN210000144U (en) Charging device of electric automobile
CN210691085U (en) Card insertion type modular equipment
CN103683976A (en) Universal power supply system
KR20110015742A (en) Method for power supply using usb interface and portable terminal using the same
CN220855143U (en) Identification circuit for identifying a plurality of cables in system
US9960811B1 (en) DC bias signals isolatable from transmission protocols
CN115940322B (en) Switching circuit of re-timer device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant