Control method and system of rotatable display screen

By performing zero point calibration and angular error correction after powering on the rotary display system, the rotation accuracy and stability problems caused by encoder offset are solved, and high-precision and stable rotation control are achieved.

CN120406235AInactive Publication Date: 2025-08-01SHENZHEN ZDHT INTELLIGENT SYST CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510478175.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the initial reference position is offset due to wear, temperature changes or structural gap changes of the mechanical encoder, which affects the rotation accuracy and control stability of the rotating display screen, which may lead to the system's misjudgment of position, causing position disorder or action conflict.

Method used

By performing zero point calibration after the system is powered on, the reference value of the current physical position is obtained, the angle error calculation is calculated using the main controller and the encoder, and the encoder signal is corrected by the preset compensation algorithm, and the motor rotation is adjusted in combination with the PID control algorithm until the angle error is less than the set threshold value and the rotation is stopped, and the position is locked.

Benefits of technology

It improves the rotation accuracy and control stability of the rotating display, avoids position drift and control errors, and improves the system's reliability and user experience in multi-task scheduling and long-term operation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406235A_ABST
    Figure CN120406235A_ABST
Patent Text Reader

Abstract

The invention discloses a control method and system for a rotatable display screen, and particularly relates to the technical field of display screen control. Precise rotation control is realized through module initialization and physical zero calibration after system power-on and in combination with angle error calculation and feedback control; a zero offset trend detection and dynamic compensation algorithm is particularly introduced, the offset of the reference position of the encoder is effectively corrected, the rotation precision and the system stability in a multi-task control environment are ensured, and the use reliability of equipment and the user experience are remarkably improved through real-time feedback, error closed-loop adjustment and state locking output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of display screen control, and particularly relates to a control method and system for a rotatable display screen. Background Art

[0002] The control of a rotatable display screen refers to the technical means for controlling how a rotatable display screen (such as a TV, tablet, smartphone, etc.) rotates. This method usually includes sensing devices (such as gyroscopes or acceleration sensors) to detect the current orientation of the screen or user operations, and then through the control system to drive the motor or actuator, so that the display screen automatically or manually rotates to a specified angle according to preset conditions, in order to achieve the best viewing experience or meet the needs of specific usage scenarios. This method improves the flexibility of the device and the intelligent level of human-computer interaction.

[0003] The prior art has the following deficiencies:

[0004] In the prior art, using the closed-loop control principle, the encoder real-time feedbacks the angle position, and the MCU issues a control signal to the motor according to the target angle for precise rotation. However, during the long-term use of the encoder, due to factors such as wear, temperature change, or structural clearance change of the mechanical encoder, the initial reference position thereof deviates. This physical drift will cause the system to deviate from the preset angle during each reset, affecting the rotation accuracy, and may cause the system to misjudge the current position and stop prematurely at the wrong position, thereby causing position confusion or action conflict in a multi-task control environment, seriously affecting the overall control stability and user experience. Summary of the Invention

[0005] The purpose of the present invention is to provide a control method and system for a rotatable display screen to solve the deficiencies in the background art.

[0006] To achieve the above purpose, the present invention provides the following technical solution: A control method for a rotatable display screen, comprising:

[0007] After the system is powered on, the main controller initializes the encoder, the motor drive module, and related control units;

[0008] When the rotating mechanism starts, it obtains the reference value of the current physical position through a zero-point calibration mechanism;

[0009] Receiving a target angle instruction input by the user or issued by the control system;

[0010] The main controller obtains the current rotation angle position from the encoder, compares it with the target angle, and calculates the angle error;

[0011] If it is detected that there is a deviation trend between the current position and the reference zero point, the zero point of the encoder signal is corrected through a preset compensation algorithm;

[0012] The main controller outputs a control signal according to the corrected angle error to drive the motor to perform rotational adjustment;

[0013] The encoder real-time feeds back the rotation angle, and the main controller continuously corrects the output signal according to the feedback until the angle error is less than the set threshold and then stops rotating;

[0014] The main controller confirms that the rotation action is completed and locks the current position, and outputs a status signal to the user interface.

[0015] Preferably, the zero-point calibration mechanism includes a photoelectric sensor, a Hall sensor, a mechanical limit switch or a magnetic encoder, which is used to detect the position where the rotating mechanism reaches the physical zero position.

[0016] Preferably, obtaining the current physical position reference value under the zero-point calibration mechanism is specifically as follows:

[0017] After the main controller completes the system initialization, it judges whether zero-point calibration is required currently. If the condition is satisfied, it enters the zero-point calibration mode and prepares to execute the zeroing operation;

[0018] Set the rotation direction and load the control parameters for calibration operation;

[0019] The MCU issues a low-speed rotation control instruction to drive the motor to drive the display screen to rotate slowly; at the same time, poll or monitor the status of the zero-point detection device;

[0020] When the detection device outputs a zero-point signal, immediately stop the rotation action; record the current count value or angle value of the encoder, set it as the zero-point reference position of the system; and write it into the cache register or storage area;

[0021] The MCU sends the zeroing completion status to the user interface or the log recording module and updates the system flag bit.

[0022] Preferably, obtaining the current angle and calculating the angle error specifically includes:

[0023] The MCU reads the current output data of the encoder through the communication interface, including the current number of pulses N current ; use the conversion formula to convert the number of pulses into the current physical angle θ current : In the formula, θ current is the current angle, N total is the total number of pulses per revolution of the encoder; calculate the angle error Δθ, and the expression is: Δθ = θ target - θ current ; in the formula, θ targetTaking the target angle as the reference, the MCU determines whether |Δθ| is less than a preset tolerance range. If the error is within the tolerance range, the system determines that the target has been reached and the motor stops. If the error exceeds the range, the PID controller determines the output based on the error value.

[0024] Preferably, when the zero-point sensor is triggered, the current encoder output value N is recorded. Z,actual , which serves as the actual physical zero point, and the zero-point offset is calculated. The expression is: ΔN Z = N Z,actual - N Z,expected ; where N Z,expected is the ideal zero-point value, and ΔN Z is the zero-point pulse offset.

[0025] The ΔN Z is stored in the zero-point correction register of the system as the zero-point correction offset value, and the corrected encoder value is calculated. The expression is: N current = N measured - ΔN Z ; where N current is the corrected encoder value, N measured is the original encoder value actually read and obtained by the MCU in real time through the encoder interface. The corrected error is calculated. The expression is: e(t) = θ target - θ cct ; θ cct is the current angle after zero-point offset correction, and e(t) is the corrected error. The main controller adopts the PID control algorithm to dynamically calculate the control signal output value according to the corrected angle error to control the speed and rotation direction of the motor.

[0026] Preferably, during the control process, the main controller sets an error tolerance threshold and determines that the rotation action is completed only after the angle error is stably within the tolerance range for multiple consecutive control cycles.

[0027] Preferably, the main controller reads the current angle θ of the encoder once within a fixed control cycle. current The zero-point drift compensation amount Δθ is introduced. Z The corrected current angle is calculated: θ corrected = θ current - Δθ Z ; It is compared with the target angle θ target in real time, and the latest error Δθ is calculated.

[0028] If Δθ > 0: The target is in the clockwise direction of the current angle. If Δθ < 0: The target is in the counterclockwise direction of the current angle.

[0029] Preferably, after the rotation action is completed, the main controller controls the motor to lock the current position according to the system type, and the locking methods include servo locking, excitation holding, electromagnetic braking or mechanical stopping; after completing the rotation control, the main controller outputs status signals to the host computer or the user interface through the communication module, and the signals include the current position angle, control status, execution time and locking confirmation information.

[0030] The present invention provides a control system for a rotatable display screen, including an initialization module, a zero-point detection module, a human-computer interaction module, a position detection module, a compensation calculation module, a motor drive module, a control module and a user interface display module;

[0031] Initialization module: After the system is powered on, the main controller initializes the encoder, the motor drive module and related control units;

[0032] Zero-point detection module: When the rotating mechanism starts, it obtains the reference value of the current physical position through the zero-point calibration mechanism;

[0033] Human-computer interaction module: Receives the target angle instruction input by the user or issued by the control system;

[0034] Position detection module: The main controller obtains the current rotation angle position from the encoder, compares it with the target angle, and calculates the angle error;

[0035] Compensation calculation module: If it is detected that there is an offset trend between the current position and the reference zero point, the encoder signal is corrected for zero point through a preset compensation algorithm;

[0036] Motor drive module: The main controller outputs a control signal according to the corrected angle error to drive the motor to perform rotation adjustment;

[0037] Control module: The encoder continuously feeds back the rotation angle, and the main controller continuously corrects the output signal according to the feedback until the angle error is less than the set threshold and then stops rotating;

[0038] User interface display module: The main controller confirms that the rotation action is completed and locks the current position, and outputs a status signal to the user interface.

[0039] In the above technical solution, the technical effects and advantages provided by the present invention:

[0040] 1. The present invention is based on the principle of closed-loop control. By the collaborative work of the main controller (MCU) with the encoder, motor driver, and various sensor modules, precise rotation control of the display screen is achieved. First, after the system is powered on, hardware initialization is completed, and the physical reference position of the rotation mechanism is obtained through a zero-point calibration mechanism to ensure the initial accuracy of angle control. The system receives target angle commands from local or remote sources. The main controller reads the current position of the encoder in real time, calculates the error by comparing it with the target angle, and when a zero-point offset trend is detected, a zero-point compensation algorithm is automatically introduced for correction, significantly improving the stability and repeatability accuracy during long-term operation.

[0041] 2. The present invention solves the problem of reference offset caused by long-term use of mechanical encoders in the prior art by introducing a zero-point drift detection and dynamic correction mechanism, avoiding position drift, control error, or task conflict after the system is reset. The main controller corrects the angle error in real time during rotation and uses the PID algorithm to adjust the motor control signal to ensure a smooth and precise rotation process. After the operation is completed, the system can perform locking control according to the structure type and feedback the current state to the user interface or the upper computer through the communication interface. The overall solution improves the accuracy, reliability, and user experience of the system in multi-task scheduling or long-term operation scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0043] Figure 1 It is the method mind map of the present invention.

[0044] Figure 2 It is the system module diagram of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0046] Example 1, please refer to Figure 1 As shown, a control method for a rotatable display screen in this embodiment includes:

[0047] After the system is powered on, the main controller initializes the encoder, the motor drive module, and related control units;

[0048] When starting up, the rotating mechanism obtains the reference value of the current physical position through the zero-point calibration mechanism;

[0049] Receive the target angle instruction input by the user or issued by the control system;

[0050] The main controller obtains the current rotation angle position from the encoder, compares it with the target angle, and calculates the angle error;

[0051] If it is detected that there is an offset trend between the current position and the reference zero point, the zero point of the encoder signal is corrected through a preset compensation algorithm;

[0052] The main controller outputs a control signal according to the corrected angle error to drive the motor to make a rotation adjustment;

[0053] The encoder real-time feeds back the rotation angle, and the main controller continuously corrects the output signal according to the feedback until the rotation stops when the angle error is less than the set threshold;

[0054] The main controller confirms that the rotation action is completed and locks the current position, and outputs a status signal to the user interface.

[0055] When the system is powered on, the main controller (MCU) initializes the encoder, the motor drive module, and related control units. This is a key starting link in the entire control method of the rotatable display screen, ensuring that each hardware module starts to work together in a stable and controllable basic state.

[0056] The MCU first detects whether the power supply voltage is within the allowable range, and only starts to load the system program after confirming the stable power supply; starts the built-in Bootloader to guide the operation of the main control program; enables the hardware watchdog timer to prevent subsequent program abnormal freezes and improve system stability.

[0057] According to the encoder type (incremental, absolute), configure the corresponding communication protocol and pin resources, such as SPI, I 2 C, PWM or ABZ pulse input; send an initialization instruction to read the current position value to confirm that the encoder can normally output the angle signal; set the number of pulses per revolution of the encoder (such as 1024PPR, 4096PPR); calibrate the signal polarity (forward / reverse direction) and the counting direction; encoder status monitoring: detect whether there are abnormalities such as disconnection, short circuit, and no output; some high-end systems also support reading additional status information such as temperature and fault codes.

[0058] Initialize the control communication interface with the motor driver, such as the PWM output port, current detection pin, and enable (EN) control line; if it is an intelligent driver (such as a CAN or RS485 interface), the address and baud rate need to be configured to establish protocol communication; set the initial operation mode (such as open-loop / closed-loop control, position / speed mode); clear the internal historical errors or the remaining status of the previous operation in the driver; configure key parameters matching the motor: upper current limit, speed range, braking mode, inertia compensation, etc.; turn on or off the soft start function to prevent instant impact on the motor or the screen mechanism.

[0059] Initialize other control units, including: Sensor module (such as zero position sensor, limit switch, Hall element): Initialize each input pin and set it to the pull-up / pull-down input mode; detect the current status of the sensor to determine whether there is an un-returned or initial error; configure the interrupt response (such as generating an interrupt after triggering the zero position to reset the encoder position); Human-machine interaction interface: Initialize user input devices such as the display screen buttons, touch panel, and voice module; turn on the LED indicator, emit a startup prompt sound, or display the prompt "System starting up". Initialize the communication module (such as communicating with the host computer): Configure the communication serial port (UART / CAN / RS485), initialize the baud rate, data bits, parity bit, etc.; establish a handshake connection with the main control system and prepare to receive task instructions such as the target angle.

[0060] The MCU sequentially tests the encoder reading value, motor response, and sensor status to confirm that each module is in a controllable state; if the initialization of a certain module fails, the system records the error code and enters the fault standby mode; if the system is configured to automatically return to zero upon power-on, after initialization is completed, it will enter the zero position seeking or position calibration process; if it is in the manual return to zero mode, it will wait for the user instruction to trigger and then enter the next stage. Send a "Initialization completed" signal to the upper system; update the status display of the user interface to prompt that the operation can start.

[0061] In summary, the initialization process after the system is powered on is not only the startup action of the hardware, but also the basic preparation for the entire closed-loop control system to enter precise, efficient, and safe operation. It ensures the accuracy and reliability of the encoder data, the stable state of the motor drive, and the normal operation of all sensors and communication interfaces, providing a solid guarantee for subsequent angle control, rotation execution, and real-time feedback.

[0062] The specific steps to obtain the current physical position reference value under the zero point calibration mechanism include:

[0063] Step 1: After the main controller (MCU) completes the system initialization, determine whether zero point calibration is required currently (which can be set to trigger on the first power-on, regular calibration, or when an offset is detected); if the condition is met, enter the zero point calibration mode and prepare to execute the zeroing operation.

[0064] Step 2: Set the rotation direction (usually a single direction, such as clockwise) to avoid error accumulation caused by multiple reversals; load the control parameters for calibration operation, such as: rotation speed (generally low speed); maximum stroke (to prevent infinite rotation); calibration end threshold (for example: sensor trigger determination signal).

[0065] Step 3: The MCU issues a low-speed rotation control instruction to drive the motor to drive the display screen to rotate slowly; at the same time, poll or monitor the status of the zero-point detection device, including: Photoelectric switch: Detecting a reflecting surface or an occluder is the zero position; Hall sensor: Detecting the passing of a magnet is the zero position; Mechanical limit switch: Forming a trigger signal after contact is regarded as the physical zero point; Magnetic encoder reference position: Judging whether it is the reference point through the calibration code of the absolute encoder.

[0066] Step 4: When the detection device outputs a zero-point signal, immediately stop the rotation action; record the current encoder count value or angle value, set it as the zero-point reference position of the system; write this value into the cache register or storage area for use as the reference origin for subsequent position control; if the system supports, write it into the non-volatile memory (such as EEPROM) to achieve power-off preservation.

[0067] Step 5: The MCU sends the zeroing completion status to the user interface or the log recording module, and updates the system flag bit to allow subsequent execution of angle control or task actions.

[0068] Receiving the target angle instruction input by the user or issued by the control system specifically includes:

[0069] The system continuously listens through a series of interfaces for whether there is an angle control instruction incoming. Common input methods include:

[0070] Local input device: Physical buttons: Function keys such as "turn left", "turn right", "reset", etc.; Touch screen menu: The user selects the rotation angle through the graphical interface (such as clicking "rotate 90°"); Knob or dial device: Converting the rotation action into an angle instruction. Remote control signal: Wireless remote control: Sending infrared or Bluetooth signals, and parsing them into specific angle commands through the receiving module; Voice recognition module: Recognizing the user's voice, such as "rotate 45 degrees", and converting it into a digital instruction; Smart terminal (such as APP): Sending control instructions to the main control system through Wi-Fi, Bluetooth, serial port, etc.; Central control system / master controller (host computer): Issuing instructions through bus communication protocols such as RS485, CAN, Ethernet, etc.

[0071] After the MCU receives the original input, it parses, verifies, and extracts it;

[0072] Format the received information into "target angle value" and convert it into units recognizable by the system (such as degrees, encoder pulses, mechanical angles, etc.); determine whether the angle value is within the safe allowable range (for example: restricted to 0° to 180° or 0° to 360°), if it exceeds the limit, reject the execution and feedback an error message.

[0073] The system determines which control mode it belongs to currently: single-point control (only performs one angle movement); continuous control (changes continuously following user input); automatic scene linkage control (such as automatically rotating to 120° when receiving "conference mode"); in a multi-source input scenario (such as local + remote + voice), determine the priority, for example: local emergency stop takes precedence; commands from the host computer are higher than ordinary remote controls; automatic programs can be interrupted manually.

[0074] Write the target angle command into the task buffer or register; update the status flags, such as "target angle valid", "waiting to execute"; if the system is in an idle state, the rotation control process can be executed immediately; if an action is currently being executed, the new command can be added to the queue or overwrite the old command, depending on the control strategy.

[0075] Obtain the current angle and calculate the angle error, specifically including:

[0076] The MCU reads the current output data of the encoder through a communication interface (such as SPI, I 2 C, PWM input, ABZ pulses); the data output by the encoder is usually a digital encoded value, such as the current pulse number N current ; for an incremental encoder, it is necessary to combine the previous position value or the zeroing reference to calculate the current position; for an absolute encoder, it directly outputs a unique angle position value (usually a code value from 0 to 4095).

[0077] Use the conversion formula to convert the pulse number or code value into the current physical angle θ current : In the formula, θ current is the current angle (unit: °), N total is the total number of pulses per revolution of the encoder (such as 1024, 2048, 4096).

[0078] In the previous steps of the system, the target angle θ target input by the user or the control system has been stored in a variable, usually a numerical variable, with the unit of angle (°). The basic expression for the angle error Δθ is: Δθ = θ target - θ current ; the Δθ obtained from this formula can be positive or negative, indicating the need to rotate clockwise or counterclockwise; if the control strategy requires the shortest rotation path (for example, select the shortest angle within 360°), the circumferential angle error optimization formula can be used: Δθ = ((θ target-θ current ((θ + 540) mod 360) - 180; where θ current is the current angle (unit: °), and Δθ is the angle error.

[0079] The MCU determines whether |Δθ| is less than a preset tolerance range (e.g., ±0.5°); if the error is within the tolerance range, the system determines that the target has been reached and the motor stops; if the error exceeds the range, it enters the next closed-loop adjustment, and the PID controller determines the output based on the error value.

[0080] The system actively or periodically determines whether the current encoder zero point has shifted under specific conditions. Common detection methods include:

[0081] Periodic zeroing comparison: The system performs zero calibration each time it starts; compares the current encoder zero point value with the historically recorded zero point value; if the difference between the two exceeds a set threshold (such as ±5 pulse counts or ±0.5°), it is determined that there is a shift.

[0082] Multiple zero return offset cumulative judgment: The system records the offset trend of the encoder value during multiple zero return operations; if the multiple offset directions are the same and gradually expand, it is determined to be a systematic offset trend caused by mechanical wear or temperature drift.

[0083] When the zero point sensor is triggered, record the current encoder output value N Z,actual , as the actual physical zero point, calculate the zero point offset, and the expression is: ΔN Z = N Z,actual - N Z,expected ; where N Z,expected is the previous or ideal zero point value (for example, the theoretical value is 0); ΔN Z is the zero point pulse offset.

[0084] Store ΔN Z in the zero point correction register of the system as the zero point correction offset value, and calculate the corrected encoder value. The expression is: N current = N measured - ΔN Z ; where N current is the corrected encoder value, that is, the effective encoder position used in subsequent angle calculations or control logic. The system considers the current position to be this corrected value. N measured is the original value of the encoder actually read, which is obtained in real time by the MCU through the encoder interface and is the original position data without correction processing (usually pulse counts or digital code values). In subsequent angle calculations, all angle values obtained from the encoder need to be corrected by introducing this offset.

[0085] The main controller (MCU) calculates the angle difference in the previous stage to obtain the corrected error, and the expression is: e(t) = θ target - θ cct ; θ cct is the current angle after zero-offset correction, and e(t) is the corrected error.

[0086] The error value may need to be converted into the number of pulses, PWM duty cycle or voltage control quantity according to the specific control method: N total is the total number of pulses per revolution of the encoder (such as 4096).

[0087] The main controller selects a suitable motor control strategy according to the error magnitude and system configuration. Common control methods include:

[0088] For example, use the PID control algorithm to adjust the output signal: u(t) is the output control signal (such as PWM duty cycle); K p 、K i 、K d are the proportional, integral, and differential coefficients.

[0089] Control signal output forms: PWM waveform: control the speed of the stepper motor or BLDC motor; digital instruction: send to the intelligent driver to adjust the angle or speed; analog voltage (DAC): control the input of the speed loop / position loop of the servo drive module.

[0090] The MCU outputs a pulse-width modulation signal through the PWM channel according to the calculation result to control the speed and direction of the motor (by switching high / low levels or direction pins); turn on the EN (Enable) enable pin of the driver to allow the motor to start; for a servo motor system, the MCU sends the target position or speed to the internal controller of the driver through a bus (such as CAN, Modbus, RS485), and its internal PID processes it.

[0091] The motor responds to the control signal and starts to rotate, driving the display screen to rotate; the controller continuously monitors the encoder feedback, continuously updates and adjusts the error, and forms a closed-loop action; during the action execution process, the control output is adjusted according to the real-time error magnitude to prevent overshoot, oscillation or position jump.

[0092] When the error is less than the set tolerance threshold (such as ±0.5°) and remains for a certain period of time (such as 100 ms), it is determined that the action is completed; the MCU immediately outputs a stop signal (set the PWM duty cycle to zero or cut off the enable), and the motor brakes; for a servo motor, a locking command can be issued to maintain the position.

[0093] The encoder provides real-time feedback on the rotation angle, and the main controller continuously corrects the output signal based on the feedback until the angle error is less than the set threshold, at which point the rotation stops. Specifically, it includes:

[0094] The main controller (MCU) reads the current angle θ of the encoder once within a fixed control period (e.g., every 10 ms). current ; If the system uses an incremental encoder, the number of pulses is read and converted to an angle value; if an absolute encoder is used, the current angle is directly obtained.

[0095] Introduce the zero-drift compensation amount Δθ Z , and calculate the corrected current angle: θ corrected = θ current - Δθ Z ; Compare it with the target angle θ target in real-time, and calculate the latest error Δθ.

[0096] If Δθ > 0: The target is in the clockwise direction of the current angle; if Δθ < 0: The target is in the counterclockwise direction of the current angle; the controller adjusts the motor rotation direction pin accordingly.

[0097] Use the PID algorithm or step logic control to convert the error into a control quantity (PWM duty cycle, voltage, pulse frequency); as the error gradually decreases, the controller automatically reduces the control output to avoid overshoot.

[0098] The system presets an allowable error threshold ε (e.g., ±0.5°); after each error update, it is judged whether |Δθ| ≤ ε is satisfied; to prevent premature stop due to encoder jitter, mechanical backlash, or error oscillation, a time stability judgment is added: if the error condition is satisfied in N consecutive control periods, it is considered that the target position has been stably reached, otherwise the rotation adjustment continues.

[0099] The controller sets the control quantity to zero or minimum, turns off the motor PWM output; disconnects the driver enable pin, or sends a lock position command (for servo systems); the motor stops immediately, and the display is locked at the target angle.

[0100] Set an internal flag bit to feedback the action completion status to the host computer, user interface, or execution system; if the system is in task queue mode, enter the next task scheduling.

[0101] For example, if the target angle is 180°, the set error tolerance is ±0.5°, the current corrected angle is 179.6°, and the error is 0.4°, and the controller detects that the error is less than 0.5° in 3 consecutive updates, it is judged that the target has been reached, and the control output is immediately terminated and the screen position is locked.

[0102] After the rotation control system completes the target angle adjustment, the main controller (MCU) monitors the angle value fed back by the encoder in real time and determines whether the error between it and the target angle continuously meets the set tolerance condition (such as ±0.5°) for a certain period to confirm that the current display screen has accurately reached the target position. While confirming the completion of the rotation action, the main controller immediately stops outputting the motor control signal and terminates the rotation action.

[0103] To prevent angle deviation caused by external force disturbance or natural rotation of the motor, the system locks the current position through one or more of the following methods:

[0104] If a servo motor system is adopted, the current position is maintained by keeping the servo lock position command; if it is a stepper motor system, the angle is maintained by continuously keeping the excitation state; if the device is equipped with an electromagnetic brake or a mechanical stop device, the brake mechanism is automatically activated; if the device is in the low-power mode, a mechanical limit point combined with an electromagnetic lock can be used to achieve static positioning.

[0105] Subsequently, the main controller converts the "rotation completed" state into structured data (such as flag bits, encoded values, status codes, etc.) and sends the status information to the user interface or the upper system through a communication interface (such as UART, CAN, RS485, I 2 C), including the following content:

[0106] The currently reached angle value (such as 90°, 180°); the current action status (such as: "completed", "locking"); the rotation time consumption statistics (which can be used for performance analysis); the lock confirmation flag (such as lock success / failure); whether the system is in the standby, ready or abnormal state.

[0107] At the same time, the local interface (such as the liquid crystal display screen, LED indicator, buzzer, etc.) also synchronously displays or prompts the operation completion status, enabling the user to clearly know that the device has completed the rotation process and entered the stable state, facilitating the next operation or task continuation.

[0108] For example, the user selects "rotate to 135°" through the touch screen. After the screen completes the rotation, the MCU detects that the angle error is less than 0.5° for 3 consecutive times, confirms the completion of the action, immediately stops the motor and locks the position, and at the same time sends a data packet of "angle = 135°, status = completed, lock = TRUE" to the main control interface of the screen through the serial port, and the interface displays "rotation completed, current position: 135°".

[0109] Example 2, please refer to Figure 2 As shown, the control system of a rotatable display screen described in this embodiment includes an initialization module, a zero point detection module, a human-computer interaction module, a position detection module, a compensation calculation module, a motor drive module, a control module, and a user interface display module;

[0110] Initialization module: After the system is powered on, the main controller initializes the encoder, the motor drive module, and related control units;

[0111] Zero point detection module: When the rotating mechanism starts, it obtains the reference value of the current physical position through the zero point calibration mechanism;

[0112] Human-machine interaction module: Receives the target angle command input by the user or issued by the control system;

[0113] Position detection module: The main controller obtains the current rotation angle position from the encoder, compares it with the target angle, and calculates the angle error;

[0114] Compensation calculation module: If it is detected that there is an offset trend between the current position and the reference zero point, the zero point of the encoder signal is corrected through a preset compensation algorithm;

[0115] Motor drive module: The main controller outputs a control signal according to the corrected angle error to drive the motor to perform rotational adjustment;

[0116] Control module: The encoder continuously feeds back the rotation angle, and the main controller continuously corrects the output signal according to the feedback until the angle error is less than the set threshold and then stops rotating;

[0117] User interface display module: The main controller confirms that the rotation action is completed and locks the current position, and outputs a status signal to the user interface.

[0118] The above formulas are all dimensionless and take their numerical values for calculation. The formulas are obtained by collecting a large amount of data and performing software simulation to get a formula closest to the actual situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0119] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Among them, A and B can be singular or plural. In addition, the character " / " in this article generally represents an "or" relationship between the front and rear associated objects, but it may also represent an "and / or" relationship, which can be specifically understood by referring to the context.

[0120] [[ID=

[0121] As described above, it is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application.

Claims

1. A control method for a rotatable display screen, characterized in that: Including: After the system is powered on, the main controller initializes the encoder, motor drive module and related control units; When starting up, the rotating mechanism obtains the reference value of the current physical position through the zero-point calibration mechanism; Receive the target angle instruction input by the user or issued by the control system; The main controller obtains the current rotation angle position from the encoder, compares it with the target angle, and calculates the angle error; If it is detected that there is an offset trend between the current position and the reference zero point, the zero point of the encoder signal is corrected through a preset compensation algorithm; The main controller outputs a control signal according to the corrected angle error to drive the motor to perform rotation adjustment; The encoder continuously feeds back the rotation angle, and the main controller continuously corrects the output signal according to the feedback until the rotation stops when the angle error is less than the set threshold; The main controller confirms that the rotation action is completed and locks the current position, and outputs a status signal to the user interface.

2. The control method of a rotatable display screen according to claim 1, wherein: The zero-point calibration mechanism includes a photoelectric sensor, a Hall sensor, a mechanical limit switch or a magnetic encoder, which is used to detect the position where the rotating mechanism reaches the physical zero position.

3. The control method of a rotatable display screen according to claim 1, wherein: Specifically, obtaining the reference value of the current physical position under the zero-point calibration mechanism is as follows: After the main controller completes the system initialization, it judges whether zero-point calibration is required currently. If the condition is satisfied, it enters the zero-point calibration mode and prepares to execute the zeroing operation; Set the rotation direction and load the control parameters for calibration operation; The MCU issues a low-speed rotation control instruction to drive the motor to drive the display screen to rotate slowly; at the same time, poll or monitor the status of the zero-point detection device; When the zero-point signal is output by the detection device, immediately stop the rotation action; record the current count value or angle value of the encoder, set it as the zero-point reference position of the system; and write it into the cache register or storage area; The MCU sends the zeroing completion status to the user interface or the log recording module and updates the system flag bit.

4. A control method for a rotatable display screen according to claim 3, characterized in that: Obtaining the current angle and calculating the angle error specifically includes: The MCU reads the current output data of the encoder through the communication interface, including the current pulse number N current ; uses the conversion formula to convert the pulse number into the current physical angle θ current : In the formula, θ current is the current angle, N total is the total number of pulses per revolution of the encoder; calculates the angle error Δθ, and the expression is: Δθ = θ target - θ current ; in the formula, θ target is the target angle, and the MCU judges whether |Δθ| is less than the preset tolerance range; if the error is within the tolerance range, the system determines that the target has been reached and the motor stops; if the error exceeds the range, the PID controller determines the output according to the error value.

5. The control method of a rotatable display screen according to claim 4, wherein: When the zero-point sensor is triggered, record the current encoder output value N Z,actual , as the actual physical zero point, calculate the zero-point offset, and the expression is: ΔN Z = N Z,actual - N Z,expected ; In the formula, N Z,expected is the ideal zero-point value, and ΔN Z is the zero-point pulse offset; Store ΔN Z into the zero-point correction register of the system as the zero-point correction offset value, and calculate the corrected encoder value. The expression is: N current = N measured - ΔN Z ; where N current is the corrected encoder value, N measured is the original encoder value actually read, which is obtained in real time by the MCU through the encoder interface. Calculate the corrected error. The expression is: e(t) = θ target - θ cct ; θ cct is the current angle after zero-point offset correction, and e(t) is the corrected error; the main controller adopts the PID control algorithm to dynamically calculate the control signal output value according to the corrected angle error to control the rotation speed and rotation direction of the motor.

6. The control method of a rotatable display screen according to claim 5, wherein: During the control process, the main controller sets the error tolerance threshold, and determines that the rotation action is completed only after the angle error is stably within the tolerance range for multiple consecutive control cycles.

7. A control method for a rotatable display screen according to claim 6, characterized in that: The main controller reads the current encoder angle θ once within a fixed control period current ; introduce the zero-drift compensation amount Δθ Z , and calculate the corrected current angle: θ corrected = θ current - Δθ Z ; compare with the target angle θ target in real time and calculate the latest error Δθ; If Δθ>0: The target is in the clockwise direction of the current angle; if Δθ<0: The target is in the counterclockwise direction of the current angle.

8. A control method for a rotatable display screen according to claim 7, characterized in that: After the rotation action is completed, the main controller controls the motor to lock the current position according to the system type. The locking methods include servo locking, excitation holding, electromagnetic braking or mechanical stopping; after completing the rotation control, the main controller outputs a status signal to the host computer or the user interface through the communication module. The signal includes the current position angle, control status, execution time and locking confirmation information.

9. A control system for a rotatable display screen, which is used to implement the control method of a rotatable display screen according to any one of claims 1-8, characterized in that: Including an initialization module, a zero-point detection module, a human-computer interaction module, a position detection module, a compensation calculation module, a motor drive module, a control module and a user interface display module; Initialization module: After the system is powered on, the main controller initializes the encoder, motor drive module and related control units; Zero-point detection module: When starting up, the rotating mechanism obtains the reference value of the current physical position through the zero-point calibration mechanism; Human-computer interaction module: Receive the target angle instruction input by the user or issued by the control system; Position detection module: The main controller obtains the current rotation angle position from the encoder, compares it with the target angle, and calculates the angle error; Compensation calculation module: If there is an offset trend between the detected current position and the reference zero point, the encoder signal is corrected for zero point through a preset compensation algorithm; Motor drive module: The main controller outputs a control signal according to the corrected angle error to drive the motor to make a rotational adjustment; Control module: The encoder continuously feedbacks the rotation angle, and the main controller continuously corrects the output signal according to the feedback until the rotation stops when the angle error is less than the set threshold; User interface display module: The main controller confirms that the rotation action is completed and locks the current position, and outputs a status signal to the user interface.

Citation Information

Cited By

  • Self-adaptive adjustment method and device for visual angle of paperless display screen and medium

    CN121091898A

  • Self-calibration high-precision angle measurement turntable control system and method

    CN121349172A