A tracking control method based on white light sensor
Through the tracking control method based on white light sensors, automatic calculation and real-time feedback of light intensity are solved, and the problem of difficult sensor debugging and low precision detection success rate in robot tracking control is achieved, achieving higher accuracy and stability.
Patent Information
- Application Number
- CN202011002675.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-22
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2040-09-22
AI Technical Summary
In the prior art, sensor debugging is difficult in robot tracking control, accurate detection success rate is low, and sensor light intensity adjustment accuracy error is large.
The tracking control method based on a white light sensor is adopted, and the light intensity is automatically calculated through the white light sensor and feedback is carried out in real time. The cooperation between the upper and lower computers is achieved automatically adjusting and precise control.
It improves the accuracy and success rate of robot tracking control, reduces the complexity and manual intervention of sensor debugging, and enhances the stability and anti-interference ability of the system.
Smart Images

Figure CN112055447B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of sensor control, and in particular relates to a tracking control method based on a white light sensor. Background Art
[0002] At present, sensors are widely used in the field of detection. Common sensors include infrared sensors and color mark sensors, which are often used in the field of robot line patrol detection. They emit infrared and other light as receivers, and trigger signal responses as detection after receiving them. False detections are prone to occur during the detection process.
[0003] Color mark sensors and infrared sensors are commonly used in robot tracking control on the market. Generally, manual visual inspection is required to debug the sensors. Users can only make manual adjustments based on experience and usually use a screwdriver to adjust the adjustable resistor on the grayscale sensor. This adjustment is quite troublesome and prone to problems, resulting in low accuracy, large measurement errors, and a cumbersome debugging process. Summary of the invention
[0004] In view of this, in order to solve the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a tracking control method based on a white light sensor, which automatically calculates the light intensity and provides real-time feedback, thereby solving the serious problems of difficulty in sensor debugging and low success rate of sensor accurate detection.
[0005] To achieve the above purpose, the technical solution adopted by the present invention is:
[0006] A tracking control method based on a white light sensor, the control system used in the tracking control method includes an upper computer and a lower computer, the upper computer includes a main control module, a DC adjustable step-down voltage-stabilized power supply module, a driver and a motor, the main control module is connected to the driver, the driver is connected to the motor, the lower computer includes a single-chip microcomputer and a white light sensor, the main control module of the upper computer is connected to the single-chip microcomputer of the lower computer; the white light sensor includes an LED light module, a sampling trigger module, an analog-to-digital conversion module, a calculation and comparison module, and an output interface module;
[0007] The tracking control method comprises the following steps:
[0008] S1: If the line patrol robot is placed on the line trace, the white light sensor induction indicators on the line trace are all on, and the white light sensor indicators outside the line trace are off; otherwise, the internal parameters of the white light sensor are recalibrated through the Bluetooth serial port;
[0009] S2: The white light sensor on the line patrol robot detects the light intensity in the forward direction in real time, generates a real-time analog quantity, and converts the real-time light intensity analog quantity into a real-time voltage signal value through analog-to-digital conversion;
[0010] S3: Compare the real-time voltage signal with the average voltage signal of the sampled light intensity, and output a control signal to the host computer through the output interface module according to the comparison result;
[0011] S4: By setting parameters, the host computer can realize 15-channel sensor control through 8-channel A / D module;
[0012] S5: The host computer transmits the signal from the output port of the white light sensor, and divides the signal into two channels, which are represented by binary respectively. By sharing the middle channel, the left and right channels are divided into seven channels. The high and low levels of each channel are represented by binary, ranging from 00000000-11111111, and the decimal representation is from 0-128. By setting the six-level line patrol program, the robot is controlled to patrol the line normally.
[0013] Furthermore, the step S5 specifically includes the following sub-steps:
[0014] S51: There are two sub-level line patrol programs in the first-level line patrol program, which are used to control the width of the line trace;
[0015] S52: The following five-level line patrol uses the binary signal sent back by the white light sensor to analyze the range of the decimal number converted from the binary, and controls the speed of the left and right wheel motors to enable the robot to accurately track;
[0016] S53: Return to step S2 and loop downward in sequence, analyze the binary data collected by the white light sensor, and accurately control the robot to move forward.
[0017] Furthermore, the LED light module, sampling trigger module, analog-to-digital conversion module, calculation and comparison module, and output interface module are connected in sequence, and the LED light module, sampling trigger module, analog-to-digital conversion module, calculation and comparison module, and output interface module are all connected to the single-chip microcomputer.
[0018] Furthermore, after the LED light module is powered on, it emits white light to illuminate the detection surface. When the light intensity of the detection surface changes, it is received and processed by the sampling trigger module; when the sampling trigger module finds that the light intensity has changed, the sampling trigger module detects the intensity of this light based on the principle of different reflection intensities of different detection surfaces and changes in its resistance to detect the light intensity of the object under test, and then transmits the feedback signal to the analog-to-digital conversion module; the analog-to-digital conversion module converts the sampled light intensity analog signal from the sampling trigger module into high and low level digital signals, the calculation and comparison module processes the data and compares it with the reference value, and outputs a control signal to the output interface module based on the comparison result.
[0019] Furthermore, the calculation and comparison module includes a storage, an average value calculation module and a comparator.
[0020] Furthermore, the output interface module uses an 8-bit IO port for data output and a 4-bit IO port for data output control.
[0021] Furthermore, the LED lamp module is composed of 15 LED lamps, and the sampling trigger module is composed of 15 photoresistors.
[0022] Furthermore, the host computer is used for line patrol control, and the slave computer is used for white light sensor light intensity detection and control.
[0023] The beneficial effects of the present invention are:
[0024] The present invention provides a tracking control method based on a white light sensor, which automatically calculates the light intensity and provides real-time feedback, and can better solve the problem of large error in robot tracking and sensor light intensity adjustment accuracy. Specifically, it includes the following:
[0025] The white light sensor uses an organic combination of analog signal sensor and MCU. It can be used permanently after burning the program once. It is convenient to debug and adapt to complex environments: the mobile phone APP can be used to adjust the parameters of the comparator through Bluetooth communication to adapt to the new environment, so that it does not need to use manual visual methods to adjust the grayscale contrast value when the robot is following the track in the past. The user can only roughly estimate the comparison state based on experience and make manual adjustments, usually by adjusting the adjustable resistor on the sensor with a screwdriver. This is not only quite troublesome to adjust, but also prone to large deviations in the contrast value, causing the robot to make mistakes when following the track. It has power-off / power-off protection to prevent the loss of internal programs, while reducing the burden of data processing on the host computer main control module. The collected voltage value is highly accurate, and the BandGap voltage is used to accurately measure the external input voltage value. The system also has the advantages of high operating stability, accurate data processing, and strong anti-interference ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 It is a schematic diagram of the control system principle of the present invention;
[0028] Figure 2 Send program flow chart for mobile phone serial port;
[0029] Figure 3 Receive program flow chart for white light sensor;
[0030] Figure 4 It is the system program flow chart of white light sensor;
[0031] Figure 5 This is the flow chart of the six-level line patrol program of the upper computer;
[0032] Markings in the figure: 1. Host computer, 2. Single chip microcomputer, 3. White light sensor, 4. LED light module, 5. Sampling trigger module, 6. Analog-to-digital conversion module, 7. Calculation and comparison module, 8. Output interface module. DETAILED DESCRIPTION
[0033] The following specific examples are given to further clearly, completely and in detail illustrate the technical solution of the present invention. This example is the best example based on the technical solution of the present invention, but the protection scope of the present invention is not limited to the following examples.
[0034] A tracking control method based on a white light sensor, the control system used in the tracking control method includes an upper computer 1 and a lower computer, the upper computer 1 includes a main control module, a DC adjustable step-down voltage-stabilized power supply module, a driver and a motor, the main control module is connected to the driver, the driver is connected to the motor, the lower computer includes a single-chip computer 2 and a white light sensor 3, the main control module of the upper computer 1 is connected to the single-chip computer 2 of the lower computer; the white light sensor 3 includes an LED lamp module 4, a sampling trigger module 5, an analog-to-digital conversion module 6, a calculation and comparison module 7, and an output interface module 8; further, in this embodiment, the main control module of the upper computer 1 is an STM32F103ZET6 main control, the DC adjustable step-down voltage-stabilized power supply module is an LM2596S DC adjustable step-down voltage-stabilized power supply module, and the single-chip computer 2 of the lower computer is an STC15W4K60S4 single-chip computer main control;
[0035] The tracking control method comprises the following steps:
[0036] S1: If the line patrol robot is placed on the line trace, the sensing indicators of the white light sensor 3 on the line trace are all on, and the indicators of the white light sensor 3 outside the line trace are off; otherwise, the internal parameters of the white light sensor 3 are recalibrated through the Bluetooth serial port;
[0037] S2: The white light sensor 3 on the line patrol robot detects the light intensity in the forward direction in real time, generates a real-time analog quantity, and converts the real-time light intensity analog quantity into a real-time voltage signal value through analog-to-digital conversion;
[0038] S3: Compare the real-time voltage signal with the average voltage signal of the sampled light intensity, and output a control signal to the host computer 1 through the output interface module 8 according to the comparison result;
[0039] S4: By setting parameters, the host computer 1 can realize 15-channel sensor control through the 8-channel A / D module;
[0040] S5: The upper computer 1 transmits the signal from the output port of the white light sensor 3, divides the signal into two paths, left and right, respectively, and uses binary representation. By sharing the middle path, the left and right are divided into seven paths. The high and low levels of each signal are represented by binary, ranging from 00000000-11111111, and the decimal representation is from 0-128. By setting the six-level line patrol program, the robot is controlled to patrol the line normally.
[0041] Furthermore, the step S5 specifically includes the following sub-steps:
[0042] S51: There are two sub-level line patrol programs in the first-level line patrol program, which are used to control the width of the line trace;
[0043] S52: The following five-level line patrol uses the binary signal sent back by the white light sensor 3 to analyze the range of the decimal number converted from the binary, and controls the speed of the left and right wheel motors to enable the robot to accurately track;
[0044] S53: Return to step S2 and loop downward in sequence, analyze the binary data collected by the white light sensor 3, and accurately control the robot to move forward.
[0045] Furthermore, the LED light module 4, sampling trigger module 5, analog-to-digital conversion module 6, calculation and comparison module 7, and output interface module 8 are connected in sequence, and the LED light module 4, sampling trigger module 5, analog-to-digital conversion module 6, calculation and comparison module 7, and output interface module 8 are all connected to the single-chip computer 2.
[0046] Further, the LED light module 4 emits white light to illuminate the detection surface after being powered on. When the light intensity of the detection surface changes, it is received and processed by the sampling trigger module 5; when the sampling trigger module 5 finds that the light intensity has changed, the sampling trigger module 5 detects the intensity of the light based on the principle of the different reflection intensities of different detection surfaces and the change of its resistance value, and converts it into a feedback voltage to detect the light intensity of the object under test, and then transmits the feedback signal to the analog-to-digital conversion module 6; the analog-to-digital conversion module 6 converts the sampled light intensity analog signal from the sampling trigger module 5 into a high-low level digital signal, and the calculation and comparison module 7 processes the data and compares it with the reference value, and outputs a control signal to the output interface module 8 according to the comparison result. Further, the analog-to-digital conversion module 6 mainly adopts the A / D module in the single-chip microcomputer 2, namely the STC15W4K60S4 single-chip microcomputer, which usually refers to an electronic component that converts an analog signal into a digital signal. A common analog-to-digital converter converts an input voltage signal into an output digital signal. Since the digital signal itself has no practical meaning, it only represents a relative size. Therefore, any analog-to-digital converter needs a reference analog quantity as the conversion standard. The most common reference standard is the maximum convertible signal size. The output digital quantity represents the size of the input signal relative to the reference signal.
[0047] Furthermore, the calculation and comparison module 7 includes a storage, an average value calculation module and a comparator. First, the white light sensor 3 is connected through the Bluetooth module, the white light sensor 3 is placed in a relatively bright position, the mobile phone serial port assistant APP is opened, and a relatively bright instruction is sent to store the voltage signal corresponding to the current light intensity of the white light sensor 3 in the storage. The storage is stored through the STC15W4K60S4 single-chip microcomputer PRROM memory. The average value calculation module uses the minimum value algorithm to derive the data transferred from the 15-channel white light sensor through the A / D module, and then calculates the minimum value to find the average value of the data, compares it with the reference value stored in the storage through the comparator, and outputs a control signal to the output interface according to the comparison result.
[0048] Furthermore, the output interface module 8 uses an 8-bit IO port for data output and a 4-bit IO port for data output control.
[0049] Furthermore, the LED lamp module 4 is composed of 15 LED lamps, and the sampling trigger module 5 is composed of 15 photoresistors.
[0050] Furthermore, the host computer 1 is used for line patrol control, and the slave computer is used for white light sensor light intensity detection and control. The single chip microcomputer 2 of the slave computer is mainly used for white light sensor system control processing.
[0051] Furthermore, the system software design of the white light sensor 3 adopts a modular programming concept, and the program can be divided into three parts: a white light sensor parameter adjustment and calibration program, a white light sensor system program, and a white light sensor host computer program;
[0052] The white light sensor parameter adjustment tutorial program mainly consists of two parts, namely the mobile phone serial port sending program and the white light sensor receiving program;
[0053] First, turn on the Bluetooth of the mobile phone and connect the Bluetooth to the Bluetooth module on the white light sensor 3. When the connection is successful, start sending commands. First, send the 00 command to clear the EEROM memory of the main control chip of the white light sensor 3. Open the command line mode, edit 00 and send it, and wait for the white light sensor 3 to return OK. At this time, the data has been cleared. If the data is not returned, please resend the command. After the white light sensor 3 returns the data, adjust the position of the white light sensor 3 and start the light calibration. Edit the command 01 and send it. If the data returned is relatively stable, the light calibration is successful. If the returned data is found to be relatively unstable, re-calibrate the light.
[0054] First, connect the Bluetooth module to the white light sensor 3. First, the system starts to initialize. When the Bluetooth is not connected, the system waits for the Bluetooth connection. When the connection is completed, it waits for instructions. If the instruction is 00, the EEROM memory is cleared and OK is returned. When the instruction received is 01, the voltage signal corresponding to the current light intensity is stored in the EEROM, and the 15-channel voltage signal is returned to the mobile phone serial port assistant app;
[0055] The system program of white light sensor 3 consists of initialization module, EEPROM change, ADC reading, basic comparison processing, output module, LED module and other modules. First, the system is initialized, and then the LED module is controlled to be always on to illuminate the detection surface. When the ADC module reads the data, it is compared with the parameters in the EEROM memory. If it is higher than the average parameter, the signal is output to the host computer through the output module, and then the data is read in a loop until the power is cut off and the work stops.
[0056] In summary, the tracking control method based on the white light sensor of the present invention automatically calculates the light intensity and provides real-time feedback, which can better solve the problem of large error in robot tracking and sensor light intensity adjustment accuracy.
[0057] The above shows and describes the main features, basic principles and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements according to actual conditions, and these changes and improvements fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A tracking control method based on white light sensor, Features: The control system used in the tracking control method comprises an upper computer (1) and a lower computer, wherein the upper computer (1) comprises a main control module, a DC adjustable step-down voltage-stabilized power supply module, a driver and a motor, wherein the main control module is connected to the driver, and the driver is connected to the motor, wherein the lower computer comprises a single-chip computer (2) and a white light sensor (3), wherein the main control module of the upper computer (1) is connected to the single-chip computer (2) of the lower computer; the white light sensor (3) comprises an LED light module (4), a sampling trigger module (5), an analog-to-digital conversion module (6), a calculation comparison module (7), and an output interface module (8); the LED light module (4) comprises 15 LED lights, and the sampling trigger module (5) comprises 15 photoresistors. The tracking control method comprises the following steps: S1: If the line patrol robot is placed on the line trace, the sensing indicator lights of the white light sensor (3) on the line trace are all lit, and the indicator lights of the white light sensor (3) outside the line trace are off; otherwise, the internal parameters of the white light sensor (3) are recalibrated through the Bluetooth serial port; S2: The white light sensor (3) on the line patrol robot detects the light intensity in the forward direction in real time, generates a real-time analog quantity, and converts the real-time light intensity analog quantity into a real-time voltage signal value through analog-to-digital conversion; S3: comparing the real-time voltage signal with the average value of the voltage signal of the sampled light intensity, and outputting a control signal to the host computer (1) through the output interface module (8) according to the comparison result; S4: The host computer (1) realizes 15-channel sensor control through the 8-channel A / D module by setting parameters; S5: The host computer (1) receives the signal transmitted from the output port of the white light sensor (3), divides the signal into two left and right paths, and expresses them in binary respectively. By sharing the middle path, the left and right paths are divided into seven paths. The high and low levels of each path are expressed in binary, ranging from 00000000 to 11111111, and the decimal expression is from 0 to 128. By setting a six-level line patrol program, the robot is controlled to patrol the line normally. The step S5 specifically includes the following sub-steps: S51: There are two sub-level line patrol programs in the first-level line patrol program, which are used to control the width of the line trace; S52: The next five-level line patrol uses the binary signal sent back by the white light sensor (3) to analyze the range of the decimal number converted from the binary signal, and controls the speed of the left and right wheel motors to enable the robot to accurately track the line; S53: Return to step S2 and loop downwards in sequence, analyze the binary data collected by the white light sensor (3), and accurately control the robot to move forward; After being powered on, the LED light module (4) emits white light to illuminate the detection surface. When the light intensity of the detection surface changes, it is received and processed by the sampling trigger module (5); when the sampling trigger module (5) finds that the light intensity has changed, the sampling trigger module (5) detects the intensity of the light based on the principle of the change of resistance value due to the difference in reflection intensity of different detection surfaces and converts the light into a feedback voltage to detect the light intensity of the object to be detected, and then transmits the feedback signal to the analog-to-digital conversion module (6); the analog-to-digital conversion module (6) converts the sampled light intensity analog signal from the sampling trigger module (5) into a high-low level digital signal, and the calculation and comparison module (7) processes the data and compares it with the reference value, and outputs a control signal to the output interface module (8) according to the comparison result.
2. A tracking control method based on a white light sensor according to claim 1, Features: The LED light module (4), the sampling trigger module (5), the analog-to-digital conversion module (6), the calculation and comparison module (7), and the output interface module (8) are connected in sequence, and the LED light module (4), the sampling trigger module (5), the analog-to-digital conversion module (6), the calculation and comparison module (7), and the output interface module (8) are all connected to the single-chip computer (2).
3. The tracking control method based on a white light sensor according to claim 1, Features: The calculation and comparison module (7) comprises a storage, an average value calculation module and a comparator.
4. The tracking control method based on a white light sensor according to claim 1, Features: The output interface module (8) uses an 8-bit IO port for data output and a 4-bit IO port for data output control.
5. The tracking control method based on a white light sensor according to claim 1, Features: The upper computer (1) is used for line patrol control, and the lower computer is used for white light sensor light intensity detection and control.
Citation Information
Patent Citations
Grayscale sensor and tracking control method based on grayscale sensor
CN103970136A