Six-bit color filter turntable control system based on embedded real-time operating system

Optimizing the microscope color filter control system through the three-zone upgrade architecture and the state machine motor switching strategy, solving the shortcomings of firmware upgrade stability and motor control, achieving efficient communication and real-time monitoring, and improving the stability and response speed of the system.

CN120335102APending Publication Date: 2025-07-18BEIJING NANOINSIGHTS-TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510377771.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing microscope color filter control system has stability risks during firmware upgrade process, the motor control logic lacks dynamic adjustment capabilities, low communication efficiency, lacks real-time monitoring and fault tolerance mechanisms, which affects the stability, accuracy and response speed of the system.

Method used

It adopts three-partition upgrade architecture, state machine motor switching strategy, low-latency communication design and real-time monitoring module, including independent Bootloader, Application and Back Application program blocks, optimizes data analysis and task scheduling, and adopts adaptive dynamic adjustment and multi-threaded scheduling to achieve efficient data transmission and real-time monitoring.

Benefits of technology

Ensure the safe and reliable firmware upgrade, the stable motor operation, the improved communication response speed, and the improved system reliability, meeting the needs of fast switching and precise positioning of high-end microscopes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335102A_ABST
    Figure CN120335102A_ABST
Patent Text Reader

Abstract

The invention discloses a six-bit color filter turntable control system based on an embedded real-time operating system. The six-bit color filter turntable control system comprises a three-partition upgrading architecture, a command console data analysis architecture, a state machine motor switching strategy, a low-delay communication design and a real-time monitoring module. The three-partition upgrading architecture comprises A / B / C partitions. The command line console data analysis architecture comprises four steps of task creation, data acquisition, data analysis and data processing. The state machine motor switching strategy adopts a self-adaptive dynamic adjustment strategy and has three color filter switching modes. According to the low-delay communication design, the instruction response speed of the system is improved by optimizing a data processing and task scheduling mechanism. The real-time monitoring module comprises a temperature data module, a position detection module and a multi-thread scheduling mechanism. The invention provides an improved color filter switching control scheme for overcoming the defects of an existing color filter control system, and comprehensive optimization of system performance is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a color filter control system in the field of microscope applications, and particularly to a six-position color filter turntable control system based on an embedded real-time operating system. Background Art

[0002] The microscope color filter control system plays an important role in modern microscope technology. Its development has experienced a process from simple to complex and from manual to automatic. In the early stage, the control of microscope color filters was relatively basic, and it was usually necessary to manually replace the color filters to meet different observation requirements. With the progress of technology, automation and intelligence elements have gradually been introduced into the microscope color filter control system. Some high-end microscopes are equipped with color filter control systems that can quickly switch different color filter combinations to meet diverse fluorescence imaging requirements. Especially in biological microscope applications, the color filter control system needs to meet the requirements of high speed, high precision, and low jitter. However, the existing technologies have obvious deficiencies in the following aspects: 1. Firmware upgrade is coupled with system operation, presenting stability risks, and there is a lack of an independent security mechanism to ensure the normal operation of the system during the upgrade process. During the firmware upgrade process, the system needs to stop running in some cases, affecting the continuous use of the device. If the upgrade fails, it may lead to system crashes and even inability to resume normal operation. 2. The motor control logic is simple and lacks the ability of dynamic adjustment, which easily causes switching jitter or timeout. The motor control strategies of existing color filter turntables are usually relatively fixed and cannot be adaptively adjusted according to load changes or operating states. There may be vibrations during the motor startup, stop, and position calibration processes, affecting the accurate positioning of the color filters. Moreover, the optimization accuracy of the acceleration and deceleration curves is lacking, resulting in large speed fluctuations during the movement process and affecting the overall stability. 3. The communication efficiency is low and cannot support fast instruction response. The existing system uses low-speed serial communication (such as traditional UART) and lacks efficient communication protocol optimization, resulting in long instruction response times, affecting the fast switching ability, low command parsing and execution efficiency, causing color filter switching delays, and affecting the microscope experiment or observation process. 4. There is a lack of real-time monitoring and fault tolerance mechanisms, and the system reliability is insufficient. The existing system lacks real-time monitoring of key states and a complete self-diagnosis and fault recovery mechanism, and cannot detect operating abnormalities in a timely manner. In case of operating abnormalities (such as motor jams, color filters not in place), the system cannot make timely adjustments, resulting in misoperations or equipment damage. Most operating abnormalities require manual intervention, and the reliability and usability are insufficient. These technical deficiencies affect the stability, precision, and response speed of the color filter control system, and targeted optimization is needed to improve the overall performance and reliability.

[0003] Content of the Application

[0004] In view of the technical bottlenecks of the existing microscope color filter control system in terms of firmware security, low-jitter operation, high-speed switching, and high-precision positioning, this application proposes a stable, efficient, and intelligent color filter control method and system. The above technical effects are achieved by updating the firmware upgrade architecture, optimizing the data parsing strategy, improving the state machine motor switching strategy, designing low-latency communication, and setting up a real-time monitoring module. The specific technical solutions and features are as follows:

[0005] A six-color filter turntable control system based on an embedded real-time operating system, including a three-partition upgrade architecture, a command console data parsing architecture, a state machine motor switching strategy, a low-latency communication design, and a real-time monitoring module. The three-partition upgrade architecture includes partitions A / B / C. Partition A is the Bootloader program segment, which is assigned an internal flash storage space with an address range of 0x0800000 - 0x801FFFF by the compiler, and a space size of 128KB. Partition B is the Bootloader APP program segment, which is assigned an address of 0x8020000 - 0x809FFFF by the compiler and has an internal storage size of 512KB. Partition C is the Bootloader BACK APP program segment, which is assigned an address of 0x80A0000 - 0x80FFFFF by the compiler and is allocated the remaining internal storage space. Partitions B and C are used to store the user's APP firmware. The command-line console data parsing architecture includes the following steps: S1. Create a serial port command console task, and start the corresponding command processing task according to the interactive serial port created by the user. Obtain the data in the serial port and the data obtained by the USB module through the UART+DMA method. S2. The serial port UART+DMA obtains data. Create a DMA cache data buffer with a size of 512B, and adopt a dual-buffer data storage method with a total cache space of 1KB. S3. When the DMA triggers a half-data interrupt or an idle interrupt, call the callback function to obtain the data received by the serial port, and store the obtained data in the corresponding message queue; when there is a packet loss due to excessive data volume, reasonably allocate the DMA buffer size and the message queue length according to the actual usage situation, and process the received instructions in the first-in, first-out principle. S4. Notify other tasks to process quickly through the semaphore for the parsed data. The state machine motor switching strategy adopts an adaptive dynamic adjustment strategy, with three color filter switching modes, namely the adjacent position switching mode, the alternate position switching mode, and the opposite position switching mode. According to different color filter switching modes, running trajectories, and load conditions, the control system parameters are optimized in real time through the shortest path algorithm and the configuration parameters required by the running mode, shortening the running path and thus shortening the time required for color filter switching within 75ms. By modifying the running configuration parameters, make its acceleration and deceleration smoother, ensuring the switching speed while improving the switching accuracy. After the switching is completed, perform precise position detection and dynamic fine-tuning. Combining the feedback of high-precision sensors, use the fine-tuning control algorithm logic to correct the position of the color filter in real time, improving the in-place accuracy and reducing the in-place accuracy error of the color filter to within 0.6°. The low-latency communication design, while continuing to use serial port UART and USB communication, improves the instruction response speed of the system by optimizing the data processing and task scheduling mechanisms. Specifically, it includes: 1. An efficient data parsing and caching mechanism.Use DMA to receive data, reducing the CPU workload. The baud rate is set to 115200 bps. After triggering the idle interrupt or half-full interrupt, the interrupt callback function is called, and the time interval is 86.8 μs - 173.6 μs. After receiving data through the serial port or USB, the system quickly parses the commands and stores them in the message queue buffer. 2. The task scheduling mechanism driven by semaphores. After data reception, the system immediately sends a semaphore to notify relevant tasks, avoiding polling waiting and improving the real-time performance of instruction processing. It can achieve real-time reception and storage of the next instruction while processing an instruction, enabling gapless and fast instruction processing, reducing data waiting time, and improving data processing efficiency. 3. Optimization of task priorities. The priority of critical tasks (such as color filter switching) is higher than that of ordinary tasks, ensuring that color filter switching instructions can be quickly responded to and executed, reducing switching delays. 4. DMA transfer acceleration. During data transfer, DMA (Direct Memory Access) is used to reduce the CPU burden, increase the data throughput rate, and ensure the fast transfer and processing of color filter control instructions. The real-time monitoring module described above includes a temperature data module, a position detection module, and a multi-threaded scheduling mechanism. The temperature data module collects and calibrates the temperature through an ADC. When the temperature exceeds the threshold, it triggers the TEMP_TOO_HIGH instruction alarm. The value of TEMP_TOO_HIGH is 60 °C. After triggering the alarm, it continuously sends an interrupt error alarm data packet. When the driver temperature reaches 80 °C, it will actively cut off the motor output power to avoid damaging the motor. The error handling module supports alarm clearing (eLoopClearAlarm) and timeout retry (up to 20 attempts). The position detection module checks the position message of the color filter turntable during motor switching operation. If the deviation is greater than the configured position error range, it will actively report an error. Within the error range, it will perform dynamic adjustment according to the configured mode. The position error range is generally ≤ 0.6°. The multi-threaded scheduling mechanism is based on RTOS (Real-Time Operating System), decoupling functional modules such as color filter control, communication management, and status monitoring to achieve parallel processing and improve the overall operation efficiency of the system. Through the task scheduling strategy driven by semaphores, resource competition and deadlock problems between tasks are avoided, ensuring that high-priority tasks (such as color filter switching) are promptly responded to and improving system stability. It has an exception detection and recovery mechanism. When an exception (such as motor stall, color filter not in place, etc.) is detected, the system automatically adjusts the control strategy or executes a self-recovery process to ensure the reliability of long-term operation.

[0006] Further, during the firmware upgrade and burning process of the three-partition upgrade architecture, due to abnormal interruption and active exit, the complete firmware burning is not completed, and the upgrade process stays in the Bootloader upgrade program. The burning can be restarted through burning reset. The firmware upgrade flag bit is erased by powering off and then powering on again. Before jumping to the APP program segment, the firmware of the APP program segment is verified. If the verification device has firmware problems, it stays in the Bootloader program segment waiting for firmware upgrade.

[0007] Further, the efficient data parsing and caching mechanism of the low-latency communication design uses USB as a backup port to transfer data to the corresponding message queue in a polling manner. The interrupt release semaphore method can skip the 1ms task scheduling time. The baud rate is set to 115200bps, the processing time is 0 - 1ms, and the single-byte transmission time is 80us - 90us, greatly shortening the interval time from receiving data to processing.

[0008] Further, the message queue and the memory for receiving data in the system are in an independent state. Instructions can be continuously parsed and processed while continuously receiving data. When multiple consecutive data arrive at the message queue, the uninterrupted instruction processing mechanism can be adopted to avoid the time required for data transfer, and the parsing and execution of multiple instructions can be completed within a single task scheduling cycle, improving the concurrent processing ability.

[0009] Further, the multi-threaded scheduling mechanism also adopts a dynamic power management strategy to dynamically adjust the motor drive current according to the current state of the color filter (such as standby, running, stopped), reducing energy consumption. When the color filter is in the standby state, the standby current of the stepper motor remains at 50% of the rated power to maintain the position without deviation. When the color filter is in the moving state, the current is quickly increased to 100% of the rated power at the moment of starting to meet the power required for operation. When the color filter is in the off state, the current of the stepper motor is cut off.

[0010] In summary, in view of the deficiencies of the existing color filter control system in terms of switching speed, positioning accuracy, system stability, communication efficiency, and power consumption control, this application proposes an efficient, precise, stable, and low-power color filter switching control scheme. Through intelligent motion control, real-time task scheduling, and optimized communication mechanism, the overall performance of the system is optimized. The six-position color filter turntable control system based on an embedded real-time operating system proposed in this application has many significant advantages and positive effects, and the beneficial effects achieved are as follows:

[0011] 1. Three-program-segment isolation design to ensure secure and reliable firmware upgrade: Adopt an independent storage architecture of three program segments (Bootloader + Application + Back Application) to achieve physical isolation between firmware upgrade and system operation, avoiding system crashes caused by upgrade failures. Redundant backup mechanism: During the upgrade process, the system first enters the Bootloader program area to start the upgrade, writes the firmware to the backup storage area, and only performs the formal replacement after passing the verification, ensuring firmware integrity and system security. Support for serial / USB offline upgrade, with an independent upgrade management task. During the firmware upgrade process, it jumps from the APP program segment to the Bootloader program segment to start the upgrade. The color filter cannot operate normally temporarily during the non-APP program segment, reducing variable factors and improving the overall stability of the system..

[0012] 2. Dynamic state machine control to optimize motor operation characteristics and achieve precise and stable switching; Adopt a multi-state machine control strategy to dynamically adjust motor operation parameters according to the current state of the color filter (stationary, accelerating, decelerating, calibrating, abnormal, etc.), improving motion stability. Make the color filter switching smoother, with a significant reduction in jitter, and the maximum switching time ≤ 75 ms. The in-place accuracy error ≤ 0.6°, meeting the precise alignment and fast shooting requirements of high-end optical systems.

[0013] 3. Efficient instruction parsing and hierarchical processing to improve communication response speed: Adopt an instruction hierarchical parsing mechanism to independently process single-character fast instructions and complex control instructions, avoiding communication blockages and improving system response speed. Dual-buffer and DMA data transfer: Use a double-buffer Double Buffering + DMA direct transfer mechanism when receiving data to ensure that instructions can be immediately parsed, avoiding data loss or delays. Multi-threaded task scheduling and semaphore notification: After receiving an instruction, the system immediately parses it and notifies the corresponding task to execute through a semaphore, ensuring the timely processing of high-priority tasks and improving concurrent efficiency. Achieve an increase in instruction parsing efficiency, a 30% acceleration in the response speed of complex instructions, and an increase in data throughput. Ensure that real-time tasks are given priority to meet the requirements of high-frequency instruction control.

[0014] 4. Comprehensive closed-loop monitoring mechanism to improve system security and long-term stable operation ability: Multi-dimensional state monitoring: Real-time monitor the motor position, temperature, current, and abnormal states, and perform trend analysis on key parameters to ensure the long-term stable operation of the equipment. Temperature protection can continuously alarm and remind when the system temperature rises abnormally, avoiding hardware damage. Position detection can actively and dynamically adjust position information to ensure in-place accuracy. Provide accurate state feedback and fault diagnosis to improve system security and reliability. Description of the Drawings

[0015] Figure 1This is the adjacent position switching waveform diagram of the color filter of the present application;

[0016] Figure 2 This is the alternate position switching waveform diagram of the color filter of the present application;

[0017] Figure 3 This is the opposite position switching waveform diagram of the color filter of the present application; Detailed implementation manners

[0018] The special term "embodiment" used herein. Any embodiment described as "exemplary" does not have to be construed as superior to or better than other embodiments. For the performance index tests in the embodiments of the present application, unless otherwise specified, conventional test methods in the art are adopted. It should be understood that the terms described in the present application are only used to describe specific implementation manners and are not used to limit the content disclosed in the present application.

[0019] Unless otherwise specified, the technical and scientific terms used herein have the same meanings as those commonly understood by those of ordinary skill in the technical field to which the present application belongs; the test methods and technical means not specifically noted in the present application refer to the experimental methods and technical means commonly adopted by those of ordinary skill in the art.

[0020] The terms "substantially" and "about" used herein are used to describe small fluctuations. For example, they can refer to less than or equal to ±5%, such as less than or equal to ±2%, such as less than or equal to ±1%, such as less than or equal to ±0.5%, such as less than or equal to ±0.2%, such as less than or equal to ±0.1%, such as less than or equal to ±0.05%. The numerical data presented in range format herein is used only for convenience and brevity and should therefore be interpreted flexibly to include not only the values explicitly listed as the limits of the range, but also all the individual values or sub-ranges included within the range. For example, the numerical range of "1-5%" should be interpreted to include not only the explicitly listed values from 1% to 5%, but also the individual values and sub-ranges within the indicated range. Thus, within this numerical range, individual values such as 2%, 3.5%, and 4% are included, and sub-ranges such as 1%-3%, 2%-4%, and 3%-5% are included, etc. This principle also applies to ranges that list only one numerical value. In addition, such an interpretation applies regardless of the width of the range or the characteristics described.

[0021] In this document, including in the claims, conjunctions such as "comprising", "including", "carrying", "having", "containing", "involving", "accommodating", etc. are understood to be open-ended, that is, meaning "including but not limited to". Only the conjunctions "consisting of" and "composed of" are closed conjunctions.

[0022] To better illustrate the content of this application, numerous specific details are provided in the following specific embodiments. Those skilled in the art should understand that this application can still be implemented without certain specific details. In the embodiments, some methods, means, instruments, devices, etc. that are well-known to those skilled in the art are not described in detail in order to highlight the gist of this application.

[0023] On the premise of no conflict, the technical features disclosed in the embodiments of this application can be combined arbitrarily, and the obtained technical solutions belong to the content disclosed in the embodiments of this application. It should be noted that the terms "center", "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. mentioned in this application indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing technical features 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, so it cannot be understood as a limitation to this application, unless it conflicts with the context. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance, unless it conflicts with the context.

[0024] The following describes the specific implementation manners of this application to facilitate the understanding of this application by those skilled in the art. However, it should be clear that this application is not limited to the scope of the specific implementation manners. For those ordinary skilled in the art in this technical field, as long as various changes are within the spirit and scope of this application defined and determined by the appended claims, these changes are obvious, and all application creations using the concept of this application are within the scope of protection.

[0025] Embodiment

[0026] Please refer to Figures 1 to 3 , to implement a six-color filter turntable control system based on an embedded real-time operating system proposed in this application, this application divides the switching of each color filter of the six-color filter turntable into three switching position changes, namely adjacent position switching, alternate position switching, and opposite position switching. Figure 1 This is the waveform diagram of the adjacent position switching of the color filter in this application. Figure 2 This is the waveform diagram of the alternate position switching of the color filters in this application. Figure 3 This is the waveform diagram of the opposite position switching of the color filters in this application. For example, if the No. 1 color filter and the No. 2 color filter switch back and forth, it is the adjacent switching of two color filters, which is adjacent position switching; if the No. 1 color filter and the No. 3 color filter switch back and forth, it is the adjacent switching of two color filters, which is alternate position switching; if the No. 1 color filter and the No. 4 color filter switch back and forth, it is the adjacent switching of two color filters, which is opposite position switching, and so on.

[0027] This application provides an embodiment, and the specific implementation manner is as follows:

[0028] 1. Three-segment startup process: After power-on, the BootLoader program runs to check if firmware update is needed. If there is a corresponding firmware upgrade flag bit in the system's RCC register, enter the firmware upgrade step and then jump to the BootLoader program segment; if there is no update requirement, jump to the BootLoader APP program segment to initialize the peripherals (HAL library, FreeRTOS scheduler).

[0029] 2. Process of entering the command console to parse data: When creating the user interaction port, use xQueueCreate(uxQueueLength, uxItemSize) to create a queue for storing instructions. The data received by the serial port + DMA and USB are stored in the corresponding message queues. Parse the instructions by obtaining the data in the corresponding message queues. To improve communication speed, define the characters '1' to 'Z' as fast processing instructions, which are compatible with conventional command-line instructions. Use the CLI (Command Line Interface) provided by the official to complete the development of the command console. Conventional instructions end with the string "\r\n". When it is detected that the data ends with "\r\n", use the FreeRTOS_CLIProcessCommand function provided by FreeRTOS for parsing and processing;

[0030] 3. State machine controls motor switching and startup: When the user sends commands "co start" and "co stop", the command console parses the commands and issues semaphores to turn on / off the motor power supply. Sending single-character commands "1 - 6" switches to the 1st - 6th color filters, and "7 - 8" are for the color filter to rotate clockwise by 0.6 degrees and counterclockwise by 0.6 degrees respectively. Different configuration operation parameters are required for switching between different intervals. The corresponding intervals can be classified into 4 operation modes (adjacent position, alternate position, opposite position, fine tuning). The movement can be divided into 2 directions. To shorten the reaction time required for configuring operation parameters, shorten the operation travel, and thus shorten the total operation time; use the shortest path algorithm to plan the movement direction and interval position required for this operation, and then use the interval mode algorithm to select the corresponding operation parameter data that needs to be pre-configured. Different parameter data have a great impact on the smoothness, in-place accuracy, and in-place jitter of the operation. Therefore, in order to improve the repeat positioning accuracy and quickly reach stability, operation parameter configuration is required before each operation. If the operation modes are the same for two consecutive operations, the operation parameter configuration can be skipped, which can shorten the operation time by 10%. The state machine enters eLoopCompute from eLoopStoped1, adjusts the operation configuration message, and then switches to eLoopGapRun to execute rotation; if there is no need to adjust the operation configuration information, eLoopCompute is skipped. The in-place mode is confirmed through encoder feedback or the in-place return completion signal is confirmed through the operation end signal mode, which can be selected through configuration. Confirming the in-place mode through encoder feedback can improve the in-place accuracy and can be dynamically adjusted according to the error. Dynamic adjustment can be performed within the error range where the system can operate. If the deviation is too large, the system reports an error and needs to be reset and repaired.

[0031] 4. Design of low-latency communication rules: In the FreeRtos task priority, set the task priority of controlling the motor to the highest priority. When the task successfully waits for the semaphore, it can immediately perform operation control. Use the UART + DMA method to receive control commands, reduce the CPU burden, and improve the data throughput rate. Use the message queue method to store control commands, enabling pre-storage of multiple commands that need to be executed, and processing the corresponding commands in sequence, avoiding the one-to-one data interaction method and shortening the communication time required. The time required for releasing a regular semaphore to waiting requires an interval of 1 ms in a time cycle. Releasing the semaphore through the interrupt method can be immediately acquired by other tasks, thus skipping the 1 ms scheduling time and reducing the task scheduling time required.

[0032] 5. Real-time monitoring module enabled: Temperature anomaly handling ensures that the maximum operating ambient temperature of the motor is 80°C. The control board detects the actual temperature of the MCU through ADC. When the temperature exceeds 60°C, it triggers the TEMP_TOO_HIGH alarm. By collecting the temperature of the MCU in the control board, the approximate temperature of the entire control board is indirectly judged, eliminating the use of an external environmental temperature sensor and reducing the volume of the board. The system records the error flag. If it does not recover within 60 seconds, it reports an interrupt signal through the serial port. Position detection ensures that the position information of the color filter turntable is checked during the motor switching operation. If the deviation is greater than the configured error range, it actively reports an error. Within the error range, it is dynamically adjusted according to the configured mode to ensure that the error ≤ 0.6°. The multi-threaded scheduling mechanism adopts a task scheduling strategy driven by semaphores to avoid resource competition and deadlock problems between tasks, ensuring that high-priority tasks are promptly responded to and improving the system stability.

[0033] In summary, in view of the deficiencies of the existing color filter control system in terms of switching speed, positioning accuracy, system stability, communication efficiency, monitoring and control, etc., this application proposes an efficient, precise, stable, and low-power color filter switching control solution. Through intelligent motion control, real-time task scheduling, and optimized communication mechanism, the overall performance of the system is optimized.

[0034] In addition, it should be understood that although this specification is described according to the embodiments, not every embodiment only contains an independent technical solution. This narrative way of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

[0035] The technical solutions disclosed in this application and the technical details disclosed in the embodiments are only exemplary explanations of the application concept of this application, and do not constitute a limitation on the technical solutions of this application. Any conventional changes, substitutions, or combinations made to the technical details disclosed in the embodiments of this application have the same application concept as this application and are within the protection scope of the claims of this application.

Claims

1. A six-color filter turntable control system based on an embedded real-time operating system, characterized in that: It includes a three - partition upgrade architecture, a command console data parsing architecture, a state machine motor switching strategy, a low - latency communication design, and a real - time monitoring module. The three - partition upgrade architecture includes partitions A / B / C. Partition A is the Bootloader program segment, partition B is the Bootloader APP program segment, and partition C is the Bootloader BACK APP program segment. Partitions B and C are used to store the user's APP firmware. The command - line console data parsing architecture includes the following steps: S1. Create a serial port command console task, and start the corresponding command - processing task according to the interactive serial port created by the user. Obtain the data in the serial port and the data obtained by the USB module through the UART + DMA method. S2. The serial port UART + DMA obtains data, creates a DMA cache data buffer, and the cache space adopts a double - buffer data storage method. S3. When the DMA triggers a half - data - received interrupt or an idle interrupt, call the callback function to obtain the data received by the serial port, and store the obtained data in the corresponding message queue; when packet loss occurs due to excessive data volume, reasonably allocate the DMA buffer size and the message queue length according to the actual usage, and process the received instructions in the first - in - first - out principle. S4. Notify other tasks to process quickly through the semaphore for the parsed data. The state machine motor switching strategy adopts an adaptive dynamic adjustment strategy, including three color filter switching modes, namely adjacent - position switching mode, alternate - position switching mode, and opposite - position switching mode. According to different color filter switching modes, running trajectories, and load conditions, the control system parameters can be optimized in real time through the shortest - path algorithm and the configuration parameters required by the running mode, shortening the running path and thus shortening the time required for color filter switching. The switching accuracy can be improved by modifying the running configuration parameters. After the switching is completed, perform precise position detection and dynamic fine - tuning, and use the fine - tuning control algorithm logic to correct the color filter position in real time to further reduce the color filter in - place accuracy error. The low - latency communication design includes optimizing the data - processing and task - scheduling mechanisms. Specifically, it includes: S1. An efficient data - parsing and caching mechanism. Use DMA to receive data, set the baud rate to 115200bps, and enter the interrupt callback function after triggering the idle interrupt or half - full interrupt. After the data is received by the serial port or USB, the system quickly parses the command and stores it in the message - queue buffer. S2. A semaphore - driven task - scheduling mechanism. After the data is received, the system immediately sends a semaphore to notify the relevant tasks, omitting the polling wait. S3. Task - priority optimization. Set the priority of critical tasks higher than that of ordinary tasks. When critical tasks and ordinary tasks arrive at the same time, give priority to processing critical tasks. S4. DMA transfer acceleration. Use the DMA (Direct Memory Access) method during data transfer. The real - time monitoring module includes a temperature - data module, a position - detection module, and a multi - thread scheduling mechanism.The described temperature data module collects and calibrates the temperature through ADC, and triggers the TEMP_TOO_HIGH instruction alarm when the threshold is exceeded. The TEMP_TOO_HIGH instruction is set in two stages. After triggering the first-stage alarm, an interrupt error alarm data packet is continuously sent. After triggering the second-stage alarm, the motor output power is actively cut off. The position detection module checks the position information of the color filter turntable during the motor switching operation. If the deviation is greater than the configured position error range, an error is actively reported. If it is within the position error range, the error is dynamically adjusted according to the configured mode. The multi-threaded scheduling mechanism is based on RTOS, and its functions include module decoupling, task scheduling, exception detection and recovery. The module decoupling decouples functional modules such as color filter control, communication management, and status monitoring to achieve parallel processing. The task scheduling uses a semaphore-driven task scheduling strategy to avoid resource competition and deadlock problems between tasks and ensure that high-priority tasks are promptly responded to. The exception detection and recovery automatically adjusts the control strategy or executes a self-recovery process when an exception is detected.

2. The six-color filter turntable control system based on an embedded real-time operating system according to claim 1, wherein: In the described three - partition upgrade architecture, Partition A is allocated 128 KB of internal storage space, Partition B is allocated 512 KB of internal storage space, and Partition C is allocated the remaining internal storage space.

3. The six-color filter wheel control system based on an embedded real-time operating system according to claim 1, characterized in that: The size of the DMA cache data buffer is 512 B, and the total size of the dual - buffer storage space is 1 KB.

4. The six-color filter turntable control system based on an embedded real-time operating system according to claim 1, characterized in that: The control system parameters involved in the state - machine motor switching module include the rotational speed and torque of the stepper motor.

5. The six-color filter turntable control system based on an embedded real-time operating system according to claim 1, wherein: In the described state - machine motor switching strategy, the time required for the color filter to switch is less than or equal to 75 ms, and the positioning accuracy error of the color filter is less than or equal to 0.6°.

6. The six-color filter turntable control system based on an embedded real-time operating system according to claim 1, wherein: In the described low - latency communication design, the time interval for entering the interrupt callback function after triggering the idle interrupt or half - full interrupt is 86.8 μs - 173.6 μs.

7. The six-color filter wheel control system based on an embedded real-time operating system according to claim 1, characterized in that: In the described low - latency communication design, the task priority is determined by weight. The weight of critical tasks is set to 5, and the weight of ordinary tasks is set to 1.

8. The six-color filter turntable control system based on an embedded real-time operating system according to claim 1, characterized in that: In the described temperature data module, the threshold for the first stage of the TEMP_TOO_HIGH instruction is 60 °C, and the threshold for the second stage is 80 °C.

9. The six-color filter turntable control system based on an embedded real-time operating system according to claim 1, wherein: The position error range of the color filter turntable in the described position detection module is less than or equal to 0.6°.

10. The six-color filter turntable control system based on an embedded real-time operating system according to claim 1, characterized in that: The described multi - thread scheduling mechanism also adopts a dynamic power management strategy to dynamically adjust the motor drive current according to the current state of the color filter. When the color filter is in the standby state, the standby current of the stepper motor remains at 50% of the rated power. When the color filter is in the moving state, the current is quickly increased to 100% of the rated power at the moment of startup. When the color filter is in the off state, the current of the stepper motor is cut off.

Citation Information

Cited By

  • Motor control system and motor control method of ion implanter

    CN120750264A