Ground detection control circuit and robot

By designing a ground inspection control circuit, using clock signals and pulse generators for time-sharing multiplexing sampling, the problem of the ground inspection control system occupying too many ADC resources in the prior art is solved, and resource saving and controller saving are achieved Improve expansion capabilities.

CN119427432APending Publication Date: 2025-02-14SHENZHEN SILVER STAR INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311433728.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing robot ground inspection control system occupies too much analog-to-digital conversion module (ADC) resources, limiting the controller's expansion capabilities.

Method used

A ground detection control circuit is designed to output clock signals in sequence through the controller, and combine the pulse generator and the transmit/receive circuit to realize time-sharing multiple sampling of multiple ground detection units, reducing the use of sampling pins.

Benefits of technology

It effectively reduces the ADC resource usage in ground inspection, saves the number of ADC modules, improves the expansion capability of the controller, and ensures accurate detection of different ground inspection and detection units.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119427432A_ABST
    Figure CN119427432A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a ground detection control circuit and a robot. The ground detection control circuit comprises a controller, a pulse generator, a transmitting circuit and a receiving circuit, the controller is provided with a sampling pin, the pulse generator comprises a plurality of target pulse output pins, the transmitting circuit comprises a plurality of transmitting units, the receiving circuit comprises a plurality of receiving units, and one receiving unit corresponds to one transmitting unit and forms a ground detection unit. The plurality of receiving units are jointly electrically connected with a sampling pin of the controller, and the controller performs time division multiplexing on the sampling pin, sequentially acquires ground detection signals sampled by different receiving units, and determines a ground detection value and the ground detection unit corresponding to the ground detection value according to the ground detection signals. In the embodiment of the invention, the controller only needs to open up one sampling pin to be used by the plurality of receiving units, so that resources occupying too many sampling pins in the aspect of ground detection can be reduced, ADC resources can be saved, and the cost of using too many ADC modules is also saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of robot technology, and in particular to a ground detection control circuit and a robot. Background Art

[0002] The robot provided by the related technology is usually equipped with an infrared ground detection module, which is installed at the bottom of the robot and is used to emit infrared signals to the ground. The robot determines the distance of the robot relative to the ground based on the infrared signal reflected back from the ground. Usually, the strength of the reflected infrared signal can reflect the distance of the robot relative to the ground. When the robot walks normally on the horizontal ground, the signal strength of the reflected infrared signal is within the normal range. When the robot walks to the edge of the step, due to the large height difference between the step area and the interface where the robot is currently walking, the reflected infrared signal is relatively weak. At this time, the robot needs to avoid the step area to avoid falling.

[0003] Usually, the related technology requires setting up multiple infrared ground detection modules, and installing each infrared ground detection module at different positions of the robot in order to detect the height difference of multiple positions. For this, the robot needs to be equipped with a corresponding number of analog to digital converter modules (ADC) so that the infrared signals transmitted by the corresponding number of infrared ground detection modules can be converted into digital signals so that the robot's controller can perform logical judgment operations. The related technology requires more analog to digital converter modules, but the number of analog to digital converter modules integrated in the controller is limited. Even if a corresponding number of analog to digital converter modules are plug-in, the corresponding number of analog to digital converter modules will occupy too many pin resources of the controller, which is not conducive to the expansion of other application functions of the controller in the later stage. Summary of the invention

[0004] One purpose of the embodiments of the present application is to provide a ground detection control circuit and a robot to solve the technical problem that related technologies occupy too many ADC resources in ground detection.

[0005] In a first aspect, an embodiment of the present application provides a ground detection control circuit, including:

[0006] A controller, used to output clock signals in sequence, wherein the controller is provided with a sampling pin;

[0007] A pulse generator, electrically connected to the controller, the pulse generator comprising a plurality of target pulse output pins, wherein the pulse generator is used to respond to clock signals sequentially input from the controller and sequentially output pulse drive signals through different target pulse output pins;

[0008] A transmitting circuit, comprising a plurality of transmitting units, one of the transmitting units being electrically connected to one of the target pulse output pins, and the transmitting unit being used to respond to the pulse drive signal and transmit a ground detection signal;

[0009] The receiving circuit includes multiple receiving units, one receiving unit corresponds to one transmitting unit and forms a ground detection unit, and the multiple receiving units are electrically connected to the sampling pin of the controller, wherein the controller time-multiplexes the sampling pin, sequentially obtains the ground detection signals sampled by different receiving units, and determines the ground detection value and the ground detection unit corresponding to the ground detection value according to the ground detection signal.

[0010] Optionally, in the process of determining the ground detection value, the controller determines the trigger edge of the current clock signal received by the pulse generator and the number of received clocks, and based on the trigger edge of the current clock signal and the number of received clocks, time-division multiplexes the sampling pins to determine the ground detection value, wherein the number of received clocks is the number of clock signals received by the pulse generator.

[0011] Optionally, when the controller detects that the trigger edge of the current clock signal is a falling edge, if the number of received clocks is an odd number, the sampling pin is time-division multiplexed to obtain the first sampling data transmitted via the sampling pin; if the number of received clocks is an even number, the sampling pin is time-division multiplexed to obtain the second sampling data transmitted via the sampling pin;

[0012] The controller subtracts the second sampling data from the first sampling data to obtain a ground detection value.

[0013] Optionally, each time the controller detects a rising edge of the current clock signal, the controller adds the saved historical count value to the natural number 1 to obtain the number of received clocks, and the historical count value is the number of clock signals transmitted to the pulse generator before the current time.

[0014] Optionally, when the count value of the pulse generator reaches a specified count value, the pulse generator sends a count overflow signal to the controller, so that the controller resets the historical count value to an initial value according to the count overflow signal.

[0015] Optionally, in the process of determining the ground detection unit corresponding to the ground detection value, the controller determines the ground detection unit corresponding to the ground detection value according to the trigger edge of the current clock signal and the number of received clocks.

[0016] Optionally, each of the ground inspection and detection units is configured with a position number;

[0017] When the controller detects that the trigger edge of the current clock signal is a falling edge and the number of received clocks is an even number, it determines the time difference between the output pulse drive signals of two adjacent target pulse output pins, and determines the target position number based on the time difference and the number of received clocks, wherein the ground detection unit corresponding to the target position number is the ground detection unit corresponding to the ground detection value.

[0018] Optionally, the pulse generator is a counter, the counter is configured with a plurality of pulse output pins arranged in sequence, the state of the pulse output pin includes a connected state or a suspended state, the pulse output pin in the connected state is a target pulse output pin, and the pulse output pin in the suspended state is located between two adjacent target pulse output pins;

[0019] The counter responds to the clock signals sequentially inputted by the controller and sequentially outputs each pulse driving signal through different pulse output pins, wherein the signal period of the pulse driving signal is aligned with the clock period of the clock signal.

[0020] Optionally, the target transmitting unit responds to the pulse drive signal output by the target pulse output pin in the target clock cycle, transmits the ground detection signal, and stops transmitting the ground detection signal in the next clock cycle adjacent to the target clock cycle, the target transmitting unit is the transmitting unit of the target pulse output pin, and the target clock cycle is the clock signal aligned with the pulse drive signal output by the target pulse output pin;

[0021] When the controller detects a falling edge in the target clock cycle, the controller time-multiplexes the sampling pin to obtain the first sampling data transmitted via the sampling pin; when the controller detects a falling edge in the next clock cycle, the controller time-multiplexes the sampling pin to obtain the second sampling data transmitted via the sampling pin, and subtracts the second sampling data from the first sampling data to obtain a ground detection value.

[0022] In a second aspect, an embodiment of the present application provides a robot comprising the above-mentioned ground detection control circuit.

[0023] The embodiments of the present application can achieve the following technical effects: in the ground detection control circuit provided in the embodiments of the present application, the controller is used to output clock signals in sequence, the controller is configured with sampling pins, the pulse generator is electrically connected to the controller, the pulse generator includes multiple target pulse output pins, wherein the pulse generator is used to respond to the clock signals sequentially input by the controller, and output pulse drive signals in sequence through different target pulse output pins, the transmitting circuit includes multiple transmitting units, one transmitting unit is electrically connected to a pulse output pin, the transmitting unit is used to respond to the pulse drive signal, and transmit a ground detection signal, the receiving circuit includes multiple receiving units, one receiving unit corresponds to one transmitting unit and forms a ground detection unit, and the multiple receiving units are electrically connected to the sampling pins of the controller, wherein the controller time-division multiplexes the sampling pins, sequentially obtains the ground detection values ​​sampled by different receiving units, and determines the ground detection unit corresponding to the ground detection value. Since multiple receiving units are electrically connected to the sampling pin of the controller, the controller only needs to open up one sampling pin for multiple receiving units to use, which can reduce the resources of too many sampling pins occupied by ground detection, and thus save ADC resources so that the controller can expand other functions, which is conducive to improving the expansion capability of the controller, thereby saving the cost of using too many ADC modules. In addition, the controller can also time-share sampling pins to ensure that the ground detection values ​​of different receiving units can be obtained, and can also determine the ground detection unit corresponding to the ground detection value to determine the ground detection position. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0025] Figure 1 A schematic diagram of multiple ground detection units provided in an embodiment of the present application being arranged at the bottom of a robot;

[0026] Figure 2 A schematic diagram of the circuit structure of a ground detection control circuit provided in an embodiment of the present application;

[0027] Figure 3 A schematic diagram of aligning a signal period of a pulse drive signal provided in an embodiment of the present application with a clock period;

[0028] Figure 4 A schematic diagram of aligning a signal period of a pulse drive signal provided in an embodiment of the present application with two clock periods;

[0029] Figure 5A schematic diagram of the circuit structure of a ground detection control circuit provided in another embodiment of the present application;

[0030] Figure 6 A schematic diagram of the circuit structure of a ground detection control circuit provided in yet another embodiment of the present application;

[0031] Figure 7 for Figure 2 A schematic diagram of a circuit structure when the transmitting unit provided is an infrared transmitting unit;

[0032] Figure 8 for Figure 2 A schematic diagram of a circuit structure when the receiving unit provided is an infrared receiving unit;

[0033] Fig. 9 A schematic diagram of a circuit structure in which the pulse generator provided in the embodiment of the present application is a counter;

[0034] Fig.10 Based on Fig. 9 The timing diagram of the counter shown;

[0035] Fig.11 A schematic diagram of a process for determining a ground detection value and a ground detection unit corresponding to the ground detection value provided in an embodiment of the present application;

[0036] Fig.12 Based on Fig. 9 The schematic diagram of the structure of the counter cascade expansion is shown. DETAILED DESCRIPTION

[0037] In order to facilitate the understanding of the embodiments of the present application, the embodiments of the present application are described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is described as "fixed to" another element, it can be directly on another element or there can be one or more centered elements therebetween. When an element is described as "electrically connected" to another element, it can be directly connected to another element or there can be one or more centered elements therebetween. The orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", "bottom" etc. used in this specification is based on the orientation or positional relationship shown in the accompanying drawings, only for the convenience of describing the embodiments of 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 cannot be understood as a limitation on the embodiments of the present application. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0038] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art of the technical field of the embodiments of the present application. The terms used in the description of the embodiments of the present application are only for the purpose of describing specific embodiments and are not used to limit the embodiments of the present application. The term "and / or" used in this specification includes any and all combinations of one or more related listed items.

[0039] In addition, the technical features involved in different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0040] The present application embodiment provides a robot. Figure 1 The robot 10 is provided with a plurality of ground detection units 11 at the bottom, and the plurality of ground detection units 11 are distributed at different positions of the bottom of the robot 10 so as to detect the height difference at different positions.

[0041] The ground detection unit 11 can transmit a ground detection signal to the ground and receive the ground detection signal reflected back from the ground. Each ground detection unit 11 includes a transmitting unit and a receiving unit, the transmitting unit is used to transmit the ground detection signal, and the receiving unit is used to receive the reflected ground detection signal.

[0042] It can be understood that the ground detection signal can be an infrared signal or an ultrasonic signal, etc. Correspondingly, the ground detection unit 11 can be an infrared transceiver or an ultrasonic transceiver, etc.

[0043] The robot 10 walks on the ground according to a pre-planned path, carrying multiple ground detection units 11. When the robot 10 walks to the edge of the step area, the height difference detected by some ground detection units 11 is within the normal range, and the height difference detected by some ground detection units 11 exceeds the normal range. Therefore, the robot 10 re-plans the path to avoid the step area to prevent the robot 10 from falling into the step area.

[0044] As another aspect of the present application, the present application provides a ground detection control circuit. Figure 2 The ground detection control circuit 200 includes a controller 21, a pulse generator 22, a transmitting circuit 23 and a receiving circuit 24.

[0045] The controller 21 is used to output clock signals in sequence. The controller 21 is configured with a sampling pin, wherein the sampling pin is an ADC pin, supporting an ADC conversion function. It is understandable that the controller 21 can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, a single-chip microcomputer or an ARM, etc.

[0046] The pulse generator 22 is electrically connected to the controller 21 . It is understandable that the pulse generator 22 may be a counter or a chip composed of logic devices capable of sequentially outputting pulse drive signals.

[0047] The pulse generator 22 includes a plurality of target pulse output pins, wherein the pulse generator 22 is used to respond to the clock signals sequentially inputted by the controller 21 and sequentially output the pulse driving signals through different target pulse output pins. The target pulse output pins are pulse output pins electrically connected to the emission unit 23.

[0048] It can be understood that the signal period of the pulse driving signal is aligned with a preset number of clock periods.

[0049] In some embodiments, see Figure 3 , the preset number is a natural number 1, that is, the signal period of the pulse driving signal is aligned with 1 clock period.

[0050] In some embodiments, the preset number is an integer greater than the natural number 1. Figure 4 , the preset number is 2, that is, the signal period of the pulse driving signal is aligned with 2 clock periods.

[0051] This embodiment configures the pulse generator 22 to align the signal period of the pulse signal with an integer multiple of the clock period, which is beneficial for the pulse generator 22 to output pulse drive signals in sequence through different target pulse output pins according to the timing input by the controller 21.

[0052] The transmitting circuit 23 includes a plurality of transmitting units 25 , and one transmitting unit 25 is electrically connected to a target pulse output pin.

[0053] In some embodiments, all pulse output pins of the pulse generator 22 are target pulse output pins. Figure 5 The transmitting circuit 23 includes 5 transmitting units 25, and the set of the 5 transmitting units 25 is {W0, W1, W2, W3, W4}. The pulse generator 22 has 5 pulse output pins, and the set of the 5 pulse output pins is {Q0, Q1, Q2, Q3, Q4}. The 0th pulse output pin Q0 is electrically connected to the 0th transmitting unit W0, the 1st pulse output pin Q1 is electrically connected to the 1st transmitting unit W1, the 2nd pulse output pin Q2 is electrically connected to the 2nd transmitting unit W2, the 3rd pulse output pin Q3 is electrically connected to the 3rd transmitting unit W3, and the 4th pulse output pin Q4 is electrically connected to the 4th transmitting unit W4.

[0054] In some embodiments, some of the pulse output pins of the pulse generator 22 are target pulse output pins, and the other part of the pulse output pins are in a floating state. Figure 6The pulse generator 22 has 10 pulse output pins, and the set of 10 pulse output pins is {Q0, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9}. The 1st pulse output pin Q1, the 3rd pulse output pin Q3, the 5th pulse output pin Q5, the 7th pulse output pin Q7 and the 9th pulse output pin Q9 are suspended, the 0th pulse output pin Q0 is electrically connected to the 0th transmitting unit W0, the 2nd pulse output pin Q2 is electrically connected to the 1st transmitting unit W1, the 4th pulse output pin Q4 is electrically connected to the 2nd transmitting unit W2, the 6th pulse output pin Q6 is electrically connected to the 3rd transmitting unit W3, and the 8th pulse output pin Q8 is electrically connected to the 4th transmitting unit W4.

[0055] In some embodiments, the pulse generator 22 does not output a pulse driving signal to the suspended pulse output pin, but outputs a pulse driving signal to the pulse output pin electrically connected to the emission unit (ie, the target pulse output pin).

[0056] In some embodiments, the pulse generator 22 sequentially outputs pulse drive signals to all pulse output pins (including the target pulse output pin and the pulse output pin in the suspended state). For example, although the 1st pulse output pin Q1, the 3rd pulse output pin Q3, the 5th pulse output pin Q5, the 7th pulse output pin Q7 and the 9th pulse output pin Q9 are suspended, the pulse generator 22 still sequentially outputs pulse drive signals to the above 10 pulse output pins. However, since the 1st pulse output pin Q1, the 3rd pulse output pin Q3, the 5th pulse output pin Q5, the 7th pulse output pin Q7 and the 9th pulse output pin Q9 are suspended and not connected to the transmitting unit, the pulse drive signals output by the 1st pulse output pin Q1, the 3rd pulse output pin Q3, the 5th pulse output pin Q5, the 7th pulse output pin Q7 and the 9th pulse output pin Q9 will not act on the transmitting unit. However, the controller 21 can use the clock signal aligned with the pulse output pin in the suspended state to perform data sampling processing. Therefore, this embodiment can cleverly utilize the characteristics of the pulse generator 22 without changing the logical architecture of the pulse generator 22 to achieve signal transmission and data sampling.

[0057] The transmitting unit 25 is used for transmitting a ground detection signal in response to the pulse driving signal.

[0058] For example, please combine Figure 5The controller 21 sequentially inputs multiple clock signals to the pulse generator 22, and the multiple clock signals are arranged in chronological order, wherein the set of multiple clock signals is {T0, T1, T2, T3, T4, T5, ... Tn}, and the multiple pulse output pins of the pulse generator 22 are arranged in sequence, and the set of multiple pulse output pins is {Q0, Q1, Q2, Q3, Q4}.

[0059] The pulse generator 22 responds to the 0th clock signal T0, and outputs the pulse drive signal PT0 through the 0th pulse output pin Q0, and the other pulse output pins do not output the pulse drive signal, and the 0th transmitting unit W0 responds to the pulse drive signal PT0 and transmits the ground detection signal. Then, the pulse generator 22 responds to the 1st clock signal T1, and outputs the pulse drive signal PT1 through the 1st pulse output pin Q1, and the other pulse output pins do not output the pulse drive signal, and the 1st transmitting unit W1 responds to the pulse drive signal PT1 and transmits the ground detection signal. And so on, it is not repeated here.

[0060] For another example, please combine Figure 6 The controller 21 sequentially inputs multiple clock signals to the pulse generator 22, and the multiple clock signals are arranged in chronological order, wherein the set of multiple clock signals is {T0, T1, T2, T3, T4, T5, ... Tn}, and the multiple pulse output pins of the pulse generator 22 are arranged in sequence, and the set of multiple pulse output pins is {Q0, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9}.

[0061] The pulse generator 22 responds to the 0th clock signal T0 and outputs the pulse drive signal PT0 through the 0th pulse output pin Q0, and the other pulse output pins do not output the pulse drive signal. The 0th transmitting unit W0 responds to the pulse drive signal PT0 and transmits the ground detection signal. Then, the pulse generator 22 responds to the 1st clock signal T1 and outputs the pulse drive signal PT1 through the 1st pulse output pin Q1, and the other pulse output pins do not output the pulse drive signal. However, the 1st pulse output pin Q1 is in a suspended state, so no transmitting unit transmits the ground detection signal at this time. However, this embodiment can perform data sampling operations using the clock cycle aligned with the pulse drive signal PT1. Then, the pulse generator 22 responds to the 2nd clock signal T2 and outputs the pulse drive signal PT2 through the 2nd pulse output pin Q2, and the other pulse output pins do not output the pulse drive signal. The 1st transmitting unit W1 responds to the pulse drive signal PT2 and transmits the ground detection signal. And so on, which will not be repeated here.

[0062] The receiving circuit 24 includes a plurality of receiving units 26 , wherein one receiving unit 26 corresponds to one transmitting unit 25 and forms a ground detection unit, wherein the ground detection signal transmitted by the corresponding transmitting unit 25 can be received by the corresponding receiving unit 26 .

[0063] For example, please combine Figure 5 or Figure 6 The receiving circuit 24 includes five receiving units 26, receiving unit R0 corresponds to transmitting unit W0, receiving unit R1 corresponds to transmitting unit W1, receiving unit R2 corresponds to transmitting unit W2, receiving unit R3 corresponds to transmitting unit W3, and receiving unit R4 corresponds to transmitting unit W4. The ground detection signal transmitted by transmitting unit W0 can be received by receiving unit R0, and similarly, the ground detection signal transmitted by transmitting unit W1 can be received by receiving unit R1, and so on, which will not be repeated here.

[0064] As mentioned above, the ground detection unit may be an infrared transceiver or an ultrasonic transceiver, etc.

[0065] See also Figure 7 , the transmitting unit is an infrared transmitting unit. Figure 7 As shown, the infrared emitting unit 70 adopts a constant voltage driving mode, wherein the infrared emitting unit 70 includes an infrared emitting tube H1, a first resistor R1, a transistor Q1, a second resistor R2 and a third resistor R3. When a pulse driving signal is input to the infrared emitting unit 70, firstly, the pulse driving signal, under the action of the second resistor R2 and the third resistor R3, biases the transistor Q1 to generate a base voltage, and the base voltage can cause the transistor Q1 to meet the conduction condition, so that the transistor Q1 enters a saturated conduction state, and under the action of the external voltage VDD, current flows through the infrared emitting tube H1, and the infrared emitting tube H1 emits a ground detection signal.

[0066] See also Figure 8 , the receiving unit is an infrared receiving unit. Figure 8 As shown, the infrared receiving unit 80 adopts a pull-up sampling mode, wherein the infrared receiving unit 80 includes an infrared receiving tube H2 and a fourth resistor R4, and the infrared receiving tube H2 is used to receive the ground detection signal reflected by the ground. When the infrared receiving tube H2 receives the ground detection signal, the infrared receiving tube H2 enters the on state. When the infrared receiving tube H2 enters the on state, the external voltage VDD acts on the fourth resistor R4, so that the fourth resistor R4 generates a voltage, and the voltage is transmitted to the controller 21 through the sampling pin ADC.

[0067] As mentioned above, different ground detection units are arranged at different positions on the bottom of the robot.

[0068] It can be understood that in order to distinguish the ground detection units at different positions, the present embodiment can configure different position number IDs for different ground detection units. For example, the position number ID is directly in front, upper left, lower left, upper right or lower right, etc. The controller 21 determines that a step area appears based on the ground detection signal received by the ground detection unit, and the controller 21 further determines that the position of the step area is the position described by the position number of the ground detection unit. For example, the controller 21 determines that a step area appears based on the ground detection signal received by the ground detection unit directly in front, and the controller 21 further determines that a step area appears directly in front of the robot.

[0069] The plurality of receiving units 26 are electrically connected to the sampling pin ADC of the controller 21, wherein the controller 21 time-division multiplexes the sampling pin ADC, sequentially obtains the ground detection signals sampled by different receiving units 26, and determines the ground detection value and the ground detection unit corresponding to the ground detection value according to the ground detection signal. The ground detection value can be used to indicate the distance between the ground detection unit and the ground.

[0070] For example, please combine Figure 5 , the controller 21 sequentially inputs a plurality of clock signals to the pulse generator 22, and the set of the plurality of clock signals is {T0, T1, T2, T3, T4, T5, ... Tn}. The 0th transmitting unit W0 and the 0th receiving unit R0 form the 0th ground detection unit D0, the 1st transmitting unit W1 and the 1st receiving unit R1 form the 1st ground detection unit D1, the 2nd transmitting unit W2 and the 2nd receiving unit R2 form the 2nd ground detection unit D2, the 3rd transmitting unit W3 and the 3rd receiving unit R3 form the 3rd ground detection unit D3, and the 4th transmitting unit W4 and the 4th receiving unit R4 form the 4th ground detection unit D4.

[0071] The pulse generator 22 responds to the 0th clock signal T0 and outputs the pulse drive signal PT0 through the 0th pulse output pin Q0. The 0th transmitting unit W0 responds to the pulse drive signal PT0 and transmits the ground detection signal. The 0th receiving unit R0 receives the ground detection signal transmitted by the 0th transmitting unit W0. The controller 21 uses the sampling pin ADC at the 0th clock signal T0 to receive the ground detection signal transmitted by the 0th transmitting unit W0 through the sampling pin ADC, determines the ground detection value according to the ground detection signal, and determines that the ground detection unit of the ground detection value is the 0th ground detection unit D0. Since each ground detection unit is arranged at a different position at the bottom of the robot, this embodiment determines whether a step area appears at the position detected by the 0th ground detection unit D0 through the ground detection value.

[0072] Similarly, the pulse generator 22 responds to the first clock signal T1, outputs the pulse drive signal PT1 through the first pulse output pin Q1, and the first transmitting unit W1 responds to the pulse drive signal PT1 and transmits the ground detection signal. The first receiving unit R1 receives the ground detection signal transmitted by the first transmitting unit W1. The controller 21 uses the sampling pin ADC at the first clock signal T1 to receive the ground detection signal transmitted by the first transmitting unit W1 through the sampling pin ADC, determines the ground detection value according to the ground detection signal, and determines that the ground detection unit of the ground detection value is the first ground detection unit D1. And so on, it is not repeated here.

[0073] Since multiple receiving units 26 are electrically connected to the sampling pins of the controller 21, the controller 21 only needs to open up one sampling pin for multiple receiving units 26 to use, which can reduce the resources of too many sampling pins occupied by ground detection, and thus save ADC resources so that the controller can expand other functions, which is conducive to improving the expansion capability of the controller, thereby saving the cost of using too many ADC modules. In addition, the controller can also time-share sampling pins to ensure that the ground detection values ​​of different receiving units can be obtained, and can also determine the ground detection unit corresponding to the ground detection value to determine the ground detection position.

[0074] It is understandable that the controller 21 can determine the ground detection value by time-division multiplexing the sampling pins and sampling the ground detection signal transmitted by the corresponding receiving unit once. For example, when the controller 21 detects the falling edge of the current clock signal, it obtains the ground detection signal transmitted by the receiving unit, determines the ground detection value according to the ground detection signal, and determines the ground detection unit corresponding to the ground detection value according to the number of received clocks.

[0075] It can also be understood that the controller 21 time-division multiplexes the sampling pins, samples the two ground detection signals transmitted twice by the corresponding receiving unit, and then determines the ground detection value based on the two sampled ground detection signals, thereby ensuring accurate detection of whether the robot encounters a step area.

[0076] In the process of determining the ground detection value, the controller 21 determines the trigger edge of the current clock signal received by the pulse generator 22 and the number of received clocks, and time-division multiplexes the sampling pins according to the trigger edge of the current clock signal and the number of received clocks to determine the ground detection value, wherein the number of received clocks is the number of clock signals received by the pulse generator 22.

[0077] The trigger edge includes a rising edge or a falling edge. The rising edge is the instantaneous signal when the clock signal changes from a low level to a high level, and the falling edge is the instantaneous signal when the clock signal changes from a high level to a low level.

[0078] When the controller 21 detects that the trigger edge of the current clock signal is a falling edge, if the number of received clocks is an odd number, the sampling pin is time-division multiplexed to obtain the first sampling data transmitted via the sampling pin; if the number of received clocks is an even number, the sampling pin is time-division multiplexed to obtain the second sampling data transmitted via the sampling pin. The controller subtracts the second sampling data from the first sampling data to obtain the ground detection value.

[0079] Each time the controller 21 detects a rising edge of the current clock signal, it adds the saved historical count value to the natural number 1 to obtain the number of received clocks. The historical count value is the number of clock signals transmitted to the pulse generator before the current time.

[0080] For example, please combine Figure 6 , the controller 21 sequentially inputs a plurality of clock signals to the pulse generator 22 , and the set of the plurality of clock signals is {T0, T1, T2, T3, T4, T5, … Tn}.

[0081] The historical count value n=0. The pulse generator 22 responds to the 0th clock signal T0 and outputs the pulse drive signal PT0 through the 0th pulse output pin Q0. The 0th transmitting unit W0 responds to the pulse drive signal PT0 and transmits the ground detection signal.

[0082] First, within the clock cycle of the 0th clock signal T0, when the 0th clock signal T0 changes from a low level to a high level, the controller 21 detects the rising edge of the 0th clock signal T0, and adds the saved historical count value to the natural number 1 to obtain the number of received clocks, that is, the number of received clocks is 1=0+1.

[0083] Next, when the 0th clock signal T0 changes from a high level to a low level, the controller 21 detects the falling edge of the 0th clock signal T0. Since the received clock number 1 is an odd number, the controller 21 time-division multiplexes the sampling pin ADC to obtain the first sampling data Data1 transmitted via the sampling pin ADC.

[0084] Then, in the clock cycle of the first clock signal T1, since the first pulse output pin Q1 is suspended, the pulse driving signal output by the first pulse output pin Q1 does not act on any transmitting unit. However, the controller 21 can still detect the first clock signal T1.

[0085] During the clock cycle of the first clock signal T1, when the first clock signal T1 changes from a low level to a high level, the controller 21 detects the rising edge of the first clock signal T1, adds the saved historical count value to the natural number 1, and obtains the number of received clocks, that is, the number of received clocks is 2=1+1, and the historical count value n=2 at this time.

[0086] Next, when the first clock signal T1 changes from a high level to a low level, the controller 21 detects the falling edge of the first clock signal T1. Since the number of received clocks 2 is an even number, the controller 21 time-division multiplexes the sampling pin ADC to obtain the second sampling data Data2 transmitted via the sampling pin ADC. The controller 21 subtracts the second sampling data Data2 from the first sampling data Data1 to obtain the ground detection value ΔData. And so on, which will not be repeated here.

[0087] At this point, the controller 21 has completed the sampling operation on the ground detection unit ID0. However, for the machine, the controller 21 has not yet known that the ground detection value ΔData corresponds to the ground detection unit ID0. Therefore, the controller 21 still needs to determine whether the ground detection value ΔData corresponds to the ground detection unit ID0.

[0088] In some embodiments, when the count value of the pulse generator reaches the specified count value, the pulse generator sends a count overflow signal to the controller, so that the controller resets the historical count value to the initial value according to the count overflow signal. The specified count value is customized by the designer based on engineering experience, such as the specified count value is 5 or 10. The initial value is a value customized by the designer based on engineering experience, such as the initial value is 0.

[0089] For example, please combine Figure 6 , the designated count value is 10, and the initial value is 0. When the historical count value n=10, it means that the pulse generator 22 has received 10 clock signals input by the controller 21. When the controller inputs the 11th clock signal to the pulse generator again, the pulse generator sends a count overflow signal carryQ, so that the controller resets the historical count value to 0 according to the count overflow signal carryQ. Then, the controller 21 can enter another cycle to re-time-multiplex the sampling pins, re-sequentially obtain the ground detection signals sampled by different receiving units, re-determine the ground detection value according to the ground detection signal, and re-determine the ground detection unit corresponding to the ground detection value, thereby improving the robustness of the ground detection control circuit.

[0090] In the process of determining the ground detection unit corresponding to the ground detection value, the controller 21 determines the ground detection unit corresponding to the ground detection value according to the trigger edge of the current clock signal and the number of received clocks.

[0091] Each ground detection unit is configured with a position number. When the controller 21 detects that the trigger edge of the current clock signal is a falling edge and the number of received clocks is an even number, it determines the time difference between the output pulse drive signals of two adjacent target pulse output pins, and determines the target position number based on the time difference and the number of received clocks, wherein the ground detection unit corresponding to the target position number is the ground detection unit corresponding to the ground detection value.

[0092] The time difference between the output pulse drive signals of two adjacent target pulse output pins is equal to the specified number of clock cycles. Therefore, in this embodiment, a ground detection value and a ground detection unit corresponding to the ground detection value can be determined every specified number of clock cycles. For example, if the specified number is 2, in this embodiment, a ground detection value and a ground detection unit corresponding to the ground detection value can be determined every 2 clock cycles. For example, please combine Figure 6 , the controller 21 can determine the ground detection value sampled by the ground detection unit ID0 at the 0th clock signal T0 and the 1st clock signal T1, can determine the ground detection value sampled by the ground detection unit ID2 at the 2nd clock signal T2 and the 3rd clock signal T3, can determine the ground detection value sampled by the ground detection unit ID2 at the 2nd clock signal T2 and the 3rd clock signal T3, and so on, which will not be repeated here.

[0093] The controller divides the number of received clocks by the time difference to obtain a result, and subtracts the natural number 1 from the result to obtain the target position number. For example, k=n / 2-1. After the 0th clock signal T0 and the 1st clock signal T1, n=2. When the controller 21 detects that the trigger edge of the current clock signal is a falling edge, and n=2, therefore, k=2 / 2-1=0, then the target position number is 0. Therefore, the 0th ground detection unit ID0 can be determined. At this point, the controller 21 has known that the ground detection value ΔData corresponds to the ground detection unit ID0.

[0094] In some embodiments, the pulse generator is a counter. In this embodiment, a counter of model CD4017 or other models may be selected.

[0095] See also Fig. 9 The counter 90 is configured with a plurality of pulse output pins arranged in sequence, and the states of the pulse output pins include a connected state or a suspended state. The pulse output pin in the connected state is the target pulse output pin, and the pulse output pin in the suspended state is located between two adjacent target pulse output pins.

[0096] The 0th pulse output pin Q0 is electrically connected to the 0th transmitting unit W0, the 2nd pulse output pin Q2 is electrically connected to the 1st transmitting unit W1, the 4th pulse output pin Q4 is electrically connected to the 2nd transmitting unit W2, the 6th pulse output pin Q6 is electrically connected to the 3rd transmitting unit W3, and the 8th pulse output pin Q8 is electrically connected to the 4th transmitting unit W4.

[0097] The 1st pulse output pin Q1, the 3rd pulse output pin Q3, the 5th pulse output pin Q5, the 7th pulse output pin Q7 and the 9th pulse output pin Q9 are suspended. Among them, the 1st pulse output pin Q1 is located between the 0th pulse output pin Q0 and the 2nd pulse output pin Q2, the 3rd pulse output pin Q3 is located between the 2nd pulse output pin Q2 and the 4th pulse output pin Q4, the 5th pulse output pin Q5 is located between the 4th pulse output pin Q4 and the 6th pulse output pin Q5, the 7th pulse output pin Q7 is located between the 6th pulse output pin Q6 and the 8th pulse output pin Q8, and the 9th pulse output pin Q9 is located between the 8th pulse output pin Q8 and the 0th pulse output pin Q0.

[0098] The counter 90 responds to the clock signals sequentially inputted from the controller 21 and sequentially outputs each pulse driving signal through different pulse output pins, wherein the signal period of the pulse driving signal is aligned with the clock period of the clock signal.

[0099] See also Fig.10 The counter 90 responds to the 0th clock signal T0 input by the controller 21, outputs a pulse drive signal through the 0th pulse output pin Q0, responds to the 1st clock signal T1 input by the controller 21, outputs a pulse drive signal through the 1st pulse output pin Q1, responds to the 2nd clock signal T2 input by the controller 21, outputs a pulse drive signal through the 2nd pulse output pin Q2, and so on, which will not be repeated here.

[0100] In some embodiments, the target transmitting unit responds to the pulse drive signal output by the target pulse output pin in the target clock cycle, transmits a ground detection signal, and stops transmitting the ground detection signal in the next clock cycle adjacent to the target clock cycle. The target transmitting unit is the transmitting unit of the target pulse output pin, and the target clock cycle is a clock signal aligned with the pulse drive signal output by the target pulse output pin.

[0101] When the controller 21 detects a falling edge in the target clock cycle, it time-multiplexes the sampling pin to obtain the first sampling data transmitted via the sampling pin. When it detects a falling edge in the next clock cycle, it time-multiplexes the sampling pin to obtain the second sampling data transmitted via the sampling pin. The second sampling data is subtracted from the first sampling data to obtain the ground detection value.

[0102] For example, please combine Fig.10 , the counter responds to the 0th clock signal T0 and outputs the pulse drive signal PT0 through the 0th pulse output pin Q0 (target pulse output pin). Among them, the 0th transmitting unit W0 transmits the ground detection signal according to the pulse drive signal in the clock cycle of the 0th clock signal T0 (target clock cycle), and stops transmitting the ground detection signal in the clock cycle of the 1st clock signal T1 (the next clock cycle adjacent to the target clock cycle).

[0103] When the controller 21 detects a falling edge within the clock cycle of the 0th clock signal T0, it time-division multiplexes the sampling pin to obtain the first sampling data transmitted via the sampling pin. When the controller 21 detects a falling edge within the clock cycle of the 1st clock signal T1, it time-division multiplexes the sampling pin to obtain the second sampling data transmitted via the sampling pin. The second sampling data is subtracted from the first sampling data to obtain the ground detection value.

[0104] Similarly, the counter responds to the second clock signal T2 and outputs the pulse drive signal PT2 through the second pulse output pin Q2 (target pulse output pin). Among them, the second transmitting unit W2 transmits the ground detection signal according to the pulse drive signal in the clock cycle of the second clock signal T2 (target clock cycle), and stops transmitting the ground detection signal in the clock cycle of the third clock signal T3 (the next clock cycle adjacent to the target clock cycle). And so on, it is not repeated here.

[0105] In order to explain the embodiments of the present application in detail, Fig.10 and Fig.11 The detailed description is as follows:

[0106] S11: Determine whether the counter outputs a count overflow signal. If the counter outputs a count overflow signal, execute step S12; if the counter does not output a count overflow signal, execute step S13.

[0107] S12: Assign n=0 and proceed to step S13.

[0108] S13: Determine whether the rising edge of the clock signal is detected. If detected, proceed to step S14; if not detected, proceed to step S15.

[0109] S14: Assign n=n+1, and return to step S11.

[0110] S15: Determine whether the falling edge of the clock signal is detected. If detected, proceed to step S16; if not detected, return to step S11.

[0111] S16: Determine whether n is an even number. If n is not an even number, proceed to step S17; if n is an even number, proceed to step S18.

[0112] S17: Obtain the first sampling data Data1, and return to step S11.

[0113] S18: Obtain the second sampling data Data2, ΔData=Data1-Data2, k=n / 2-1, and return to step S11.

[0114] Please combine Fig.10 , the historical count value n=0. When the controller detects the rising edge of the 0th clock signal T0, n=0+1, and returns to step S11. When the controller detects the falling edge of the 0th clock signal T0, n is not an even number, then the controller time-division multiplexes the sampling pin ADC to obtain the first sampling data Data1, and returns to step S11. At this point, the 0th clock signal T0 has finished.

[0115] When the controller detects the rising edge of the first clock signal T1, n=1+1=2, and returns to step S11. When the controller detects the falling edge of the first clock signal T1, n is an even number, then the controller time-division multiplexes the sampling pin ADC to obtain the second sampling data Data2, ΔData=Data1-Data2, k=2 / 2-1=0, and returns to step S11. At this point, the controller has obtained the ground detection value ΔData of the 0th ground detection unit.

[0116] Next, when the controller detects the rising edge of the second clock signal T2, n=2+1=3, and returns to step S11. When the controller detects the falling edge of the second clock signal T2, n is not an even number, then the controller time-division multiplexes the sampling pin ADC to obtain the first sampling data Data1, and returns to step S11. At this point, the second clock signal T0 has finished.

[0117] When the controller detects the rising edge of the third clock signal T1, n=3+1=4, and returns to step S11. When the controller detects the falling edge of the third clock signal T1, n is an even number, then the controller time-division multiplexes the sampling pin ADC to obtain the second sampling data Data2, ΔData=Data1-Data2, k=4 / 2-1=1, and returns to step S11. At this point, the controller has obtained the ground detection value ΔData of the first ground detection unit.

[0118] And so on, I won’t go into details here.

[0119] In general, this embodiment cleverly utilizes the characteristics of the counter outputting a pulse drive signal, and can utilize the clock cycles of all clock signals to sample data within the entire clock cycle, thereby being able to obtain more accurate and reliable ground detection values. In addition, by time-sharing the same sampling pin, the corresponding ground detection unit can also be determined, thereby reducing the occupancy of ADC resources and improving pin utilization.

[0120] In some embodiments, see Fig.12 The embodiment of the present application also sets up multiple counters, and the multiple counters are connected in series to expand the ground detection function to support more ground detection units. When the count value of the upper-level counter reaches the specified count value, the upper-level counter sends a count overflow signal to the lower-level counter, so that the lower-level counter starts to work according to the working principle described in the above embodiment, which is not repeated here.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, rather than to limit them. Under the idea of ​​the embodiments of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the embodiments of the present application as described above. For the sake of simplicity, they are not provided in detail. Although the embodiments of the present application are described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the embodiments of the present application.

Claims

1. A ground detection control circuit, characterized in that: include: A controller, used to output clock signals in sequence, wherein the controller is provided with a sampling pin; A pulse generator, electrically connected to the controller, the pulse generator comprising a plurality of target pulse output pins, wherein the pulse generator is used to respond to clock signals sequentially input from the controller and sequentially output pulse drive signals through different target pulse output pins; A transmitting circuit, comprising a plurality of transmitting units, one of the transmitting units being electrically connected to one of the target pulse output pins, and the transmitting unit being used to respond to the pulse drive signal and transmit a ground detection signal; The receiving circuit includes multiple receiving units, one receiving unit corresponds to one transmitting unit and forms a ground detection unit, and the multiple receiving units are electrically connected to the sampling pin of the controller, wherein the controller time-multiplexes the sampling pin, sequentially obtains the ground detection signals sampled by different receiving units, and determines the ground detection value and the ground detection unit corresponding to the ground detection value according to the ground detection signal.

2. The ground detection control circuit according to claim 1, characterized in that: In the process of determining the ground detection value, the controller determines the trigger edge of the current clock signal received by the pulse generator and the number of received clocks, and time-division multiplexes the sampling pins to determine the ground detection value based on the trigger edge of the current clock signal and the number of received clocks, wherein the number of received clocks is the number of clock signals received by the pulse generator.

3. The ground detection control circuit according to claim 2, characterized in that: When the controller detects that the trigger edge of the current clock signal is a falling edge, if the number of received clocks is an odd number, the sampling pin is time-division multiplexed to obtain the first sampling data transmitted via the sampling pin; if the number of received clocks is an even number, the sampling pin is time-division multiplexed to obtain the second sampling data transmitted via the sampling pin; The controller subtracts the second sampling data from the first sampling data to obtain a ground detection value.

4. The ground detection control circuit according to claim 2, characterized in that: Each time the controller detects a rising edge of the current clock signal, the controller adds the saved historical count value to the natural number 1 to obtain the number of received clocks, wherein the historical count value is the number of clock signals transmitted to the pulse generator before the current time.

5. The ground detection control circuit according to claim 4, characterized in that: When the count value of the pulse generator reaches a specified count value, the pulse generator sends a count overflow signal to the controller, so that the controller resets the historical count value to an initial value according to the count overflow signal.

6. The ground detection control circuit according to claim 2, characterized in that: In the process of determining the ground detection unit corresponding to the ground detection value, the controller determines the ground detection unit corresponding to the ground detection value according to the trigger edge of the current clock signal and the number of received clocks.

7. The ground detection control circuit according to claim 6, characterized in that: Each of the ground inspection and detection units is provided with a position number; When the controller detects that the trigger edge of the current clock signal is a falling edge and the number of received clocks is an even number, it determines the time difference between the output pulse drive signals of two adjacent target pulse output pins, and determines the target position number according to the time difference and the number of received clocks, wherein the ground detection unit corresponding to the target position number is the ground detection unit corresponding to the ground detection value.

8. The ground detection control circuit according to any one of claims 1 to 7, characterized in that: The pulse generator is a counter, and the counter is configured with a plurality of pulse output pins arranged in sequence. The states of the pulse output pins include a connected state or a suspended state. The pulse output pin in the connected state is a target pulse output pin, and the pulse output pin in the suspended state is located between two adjacent target pulse output pins. The counter responds to the clock signals sequentially inputted by the controller and sequentially outputs each pulse driving signal through different pulse output pins, wherein the signal period of the pulse driving signal is aligned with the clock period of the clock signal.

9. The ground detection control circuit according to claim 8, characterized in that: The target transmitting unit responds to the pulse driving signal output by the target pulse output pin in the target clock cycle, transmits the ground detection signal, and stops transmitting the ground detection signal in the next clock cycle adjacent to the target clock cycle, the target transmitting unit is the transmitting unit of the target pulse output pin, and the target clock cycle is the clock signal aligned with the pulse driving signal output by the target pulse output pin; When the controller detects a falling edge in the target clock cycle, the controller time-multiplexes the sampling pin to obtain the first sampling data transmitted via the sampling pin; when the controller detects a falling edge in the next clock cycle, the controller time-multiplexes the sampling pin to obtain the second sampling data transmitted via the sampling pin, and subtracts the second sampling data from the first sampling data to obtain a ground detection value.

10. A robot, characterized in that: The invention comprises a ground detection control circuit as claimed in any one of claims 1 to 9.