Anti-interference serial port communication system and working method thereof

By pausing data transmission and buffering data at the moment of motor start-up and shutdown, and using a communication prohibition flag and a timer to determine the duration of communication interruption, the problem of serial communication distortion caused by AC motor interference is solved, and a cost-effective communication system design is achieved.

CN121880246APending Publication Date: 2026-04-17HUIZHOU NVC OPTOELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUIZHOU NVC OPTOELECTRONICS TECH CO LTD
Filing Date
2025-12-03
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

The high voltage spikes and electromagnetic interference generated when the AC motor starts and stops cause errors and packet loss in the serial communication data of the lighting control system. The existing buffer circuit increases the complexity and cost of the lighting control circuit, and the parameter adjustment requires precision, resulting in unsatisfactory performance.

Method used

By acquiring the motor start/stop control signal, data transmission is paused and buffered in the buffer. Data is then transmitted again after a communication interruption. The duration of the communication interruption is determined by a communication prohibition flag and a timer to avoid sending data at the moment of motor start/stop, thus ensuring accurate data transmission.

Benefits of technology

Without adding extra hardware circuitry and costs, data distortion is effectively avoided, production and debugging costs are reduced, and the reliability of communication signals is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121880246A_ABST
    Figure CN121880246A_ABST
Patent Text Reader

Abstract

The invention provides an anti-interference serial port communication system and a working method thereof, and the method comprises the steps: obtaining a start-stop control signal of a motor, obtaining a communication interruption duration, and taking a moment when the start-stop control signal is obtained as a starting moment of a communication interruption period; caching the communication data to be sent to a preset buffer during communication interruption; judging whether a communication interruption duration is reached or not, and if so, sequentially sending the data cached by the buffer in sequence; wherein the step of obtaining the start-stop control signal of the motor comprises the step of obtaining the start-stop control signal output by the motor controller to the motor driving circuit. The invention also provides an anti-interference serial port communication system for realizing the method. According to the invention, the controller can be prevented from sequentially sending data when the motor is started or stopped, so that the influence of electromagnetic interference formed by a large current peak on the data sent by the controller is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of serial communication, specifically to an anti-interference serial communication system and a method for operating such a system. Background Technology

[0002] With the widespread application of smart home technology, smart lighting fixtures have become the main type of lighting in homes. Currently, high-power smart lighting fixtures or those with intelligent control systems often require AC motors to drive their movements, such as rotating or translating. Additionally, during use, the controller needs to send control signals to regulate the operation of light-emitting devices such as LED chips, for example, adjusting the color temperature and brightness of the light fixture.

[0003] However, at the moment of starting and stopping of an AC motor, due to the inductive load characteristics of the motor coil, a high voltage spike lasting for several milliseconds and strong electromagnetic interference (EMI) are generated. This interference can be coupled to the control core (such as a microcontroller) and its communication lines (such as a UART serial port) of the lighting control system through the power supply and space, causing abnormal operation of the microcontroller. In particular, it can cause errors and packet loss in serial communication data, which seriously affects the reliability of communication between the lighting fixture and the control terminal (such as a remote control, smart panel, or host computer).

[0004] To address this issue, existing lighting fixtures incorporate a buffer circuit, a passive network for energy storage and dissipation. The core of this circuit is to suppress current spikes in the power circuit caused by the instantaneous switching action of the AC motor. However, buffer circuits typically consist of capacitors, resistors, and diodes. The capacitor, as an energy storage element, primarily absorbs and temporarily stores the energy of the peak current generated during motor start-up and shutdown. The resistor limits the peak current and smoothly releases the energy stored in the capacitor as heat. The diode mainly provides unidirectional conduction, ensuring efficient energy transfer.

[0005] While using a buffer circuit can quickly respond to current spikes generated during motor start-up and shutdown, effectively absorbing these spikes without affecting communication signal transmission, this method introduces additional passive components. This not only increases the complexity of the lighting control circuit and material costs, but also requires precise calculation and adjustment of the parameters of the RC or RCD elements based on specific load characteristics (such as inductance). If the design is improper, the suppression effect on current spikes will not be ideal, and communication signal distortion will still occur. Summary of the Invention

[0006] The first objective of this invention is to provide a method for operating an anti-interference serial communication system that does not increase the cost of lighting fixtures and ensures accurate transmission of communication signals.

[0007] The second objective of this invention is to provide an anti-interference serial communication system that implements the above-described method for operating an anti-interference serial communication system.

[0008] To achieve the first objective of this invention, the working method of the anti-interference serial communication system provided by this invention includes acquiring the start-stop control signal of the motor and acquiring the communication interruption duration, with the moment when the start-stop control signal is acquired serving as the start time of the communication interruption period; during the communication interruption period, buffering the communication data to be sent into a preset buffer; determining whether the communication interruption duration has been reached, and if so, sequentially sending the data buffered in the buffer; wherein, acquiring the start-stop control signal of the motor includes: acquiring the start-stop control signal output by the motor controller to the motor drive circuit.

[0009] As can be seen from the above scheme, upon receiving the motor start / stop control signal, the controller will pause data transmission and buffer the data to be transmitted in a register. It will then wait for the required communication interruption time before sending the data from the register. In this way, during the period of peak current generated at the moment of motor start / stop, the controller will not send data via the serial port. Instead, it will send data via the serial port only after the peak current has passed. This avoids sending data during the duration of the peak current, effectively preventing data distortion during serial port transmission.

[0010] In this way, there is no need to add extra passive components for the lighting fixtures. On the one hand, this will not increase the production cost of the lighting fixtures, and on the other hand, there is no need to debug the passive components, which can reduce debugging costs.

[0011] A preferred approach is to set the communication prohibition flag after acquiring the start / stop control signal, and then reset the communication prohibition flag after the communication interruption duration has elapsed.

[0012] Therefore, by setting a communication prohibition flag to indicate whether the current time is during a communication interruption, the controller can be effectively prevented from sending data during a communication interruption.

[0013] A further approach is to obtain the status of the communication prohibition flag before sending communication data, and then process the communication data to be sent based on the status of the communication prohibition flag.

[0014] A further approach is to process the communication data to be sent according to the state of the communication prohibition flag, including: while the communication prohibition flag is set, buffering the communication data to be sent into a preset buffer, and after the communication prohibition flag is reset, sending the data buffered in the buffer sequentially.

[0015] Therefore, before the controller needs to send data, it must first obtain the status of the communication prohibition flag. This ensures that the time of each data transmission does not occur during a communication interruption, thus ensuring that the data can be sent without distortion.

[0016] A further approach is to process the communication data to be sent based on the state of the communication prohibition flag, including: if the communication prohibition flag is in a reset state, then the data to be sent is sent directly.

[0017] Therefore, when the communication prohibition flag is in the reset state, that is, when the current state is not a communication interruption period, the controller directly sends data without buffering the data to ensure that the data can be sent in a timely manner.

[0018] A further approach is to obtain the communication interruption duration by retrieving the communication interruption duration that matches the current motor type from a preset register.

[0019] Therefore, different communication interruption durations can be preset according to different types of motors and stored in a register in advance. In this way, the communication interruption duration can be read from the corresponding register according to the current type of motor to adapt to different types of motors.

[0020] A further approach is to limit the duration of the communication interruption to a duration longer than the voltage spikes generated during the start-up and shutdown of this type of motor.

[0021] A further approach is to start a timer after obtaining the start / stop control signal and the duration of the communication interruption, with the timer's duration being the duration of the communication interruption.

[0022] Therefore, it can be seen that by starting the timer inside the controller, no additional hardware circuitry is needed, and distortion-free signal transmission can be achieved without increasing the production cost of the lamps.

[0023] To achieve the second objective described above, the anti-interference serial communication system provided by the present invention includes a controller that can execute the various steps of the working method of the anti-interference serial communication system described above.

[0024] A further approach is to connect one of the controller's signal pins to the motor controller's control pin, through which the motor controller outputs start / stop control signals to the motor drive circuit.

[0025] Therefore, it can be seen that the controller can receive the start and stop control signal output by the motor controller directly through a signal pin, which can ensure that the controller can accurately and timely receive the start and stop control signal of the motor, thereby accurately controlling the timing of data transmission. Attached Figure Description

[0026] Figure 1 This is a structural block diagram of the anti-interference serial communication system of the present invention.

[0027] Figure 2 This is a flowchart illustrating an embodiment of the working method of the anti-interference serial communication system of the present invention.

[0028] Figure 3 This is a flowchart illustrating the processing of the communication prohibition flag in an embodiment of the working method of the anti-interference serial communication system of the present invention.

[0029] The present invention will be further described below with reference to the accompanying drawings and embodiments. Detailed Implementation

[0030] The anti-interference serial communication system of this invention is applied to intelligent or high-power lighting fixtures. These fixtures have LED chips as lighting modules and a controller. The controller can receive signals from external devices and send data to external devices, such as smartphones or host computers. Therefore, the fixture has a serial interface for data interaction with external devices. Furthermore, the fixture has an AC motor to drive its movement. The anti-interference serial communication system of this invention primarily avoids electromagnetic interference caused by the large current spikes generated during the start-up and shutdown of the AC motor, which could interfere with the serial communication.

[0031] Example of an anti-interference serial communication system: See Figure 1 The anti-interference serial communication system of this embodiment includes a controller 10, which can communicate with external devices, such as sending data to external devices. Additionally, the lamp has a motor 14. To control the motor 14, the lamp also includes a motor controller 11, a Darlington transistor 12, and a motor drive circuit 13. The motor controller 11 can be a microcontroller, with one of its control pins outputting a control signal to the Darlington transistor 12. This control signal can be output to the motor drive circuit 13, which drives the motor 14 to operate. Preferably, the control signal output by the motor controller 11 includes a motor start / stop control signal, which is used to control the motor 14 to start or stop operating.

[0032] One signal pin of controller 10 is connected to motor controller 11 and receives the start / stop control signal output by motor controller 11. This determines whether motor 14 is at the moment of starting or stopping. When motor 14 is at the moment of starting or stopping, data transmission is paused to avoid interference from the large current spike generated at the moment of starting or stopping motor 14 on the serial interface, which could lead to data distortion.

[0033] Example of how an anti-interference serial communication system works: The following is combined Figure 2 The working method of the anti-interference serial communication system described above is introduced. First, step S1 is executed. During the operation of the lamp, the controller 10 determines whether data needs to be sent to an external device, that is, whether there is data to be sent. If there is no data to be sent, it continues to wait. If there is data to be sent, step S2 is executed to obtain the status of the communication prohibition flag set by the controller. In this embodiment, the controller 10 sets a communication prohibition flag. At the instant the motor starts or stops, it is set to a communication interruption period, and the communication prohibition flag is set during the communication interruption period. Outside of the communication interruption period, the communication prohibition flag is reset. Therefore, the communication prohibition flag includes two states: reset and set.

[0034] After obtaining the status of the communication prohibition flag in step S2, step S3 is executed to determine whether the communication prohibition flag is in the set state. If it is not in the set state, it means that the communication prohibition flag is in the reset state, indicating that the motor is not in the instant of starting or stopping at the current moment. Therefore, step S4 can be executed, and the controller 10 can directly send data, that is, send the data directly to the external device through the serial interface.

[0035] If the signal is set, it indicates that the motor is currently in the instant of starting or stopping, which will generate a large current spike. If data is transmitted at this time, the interference from the large current will cause the transmitted data signal to be distorted. Therefore, data transmission will be suspended while the communication prohibition flag is set. Specifically, step S5 will be executed to buffer the data to be transmitted into a preset buffer. For example, a buffer dedicated to buffering the data to be transmitted can be set in the controller 10. While the communication prohibition flag is set, the controller 10 will buffer the data to be transmitted in chronological order in this buffer.

[0036] Then, step S6 is executed to determine whether the communication prohibition flag has been reset, which means determining whether the interference time of the large current spike generated at the moment of motor start-up or stop has passed. If the communication prohibition flag has not been reset, that is, it is still in the set state, then continue to wait. If the communication prohibition flag has been reset, then proceed to step S7, and send the data buffered in the buffer to the external device in chronological order. Preferably, the buffer can be a first-in, first-out buffer, so that the data stored in the buffer is stored in the buffer in chronological order, and when reading the data from the buffer, it will be read in the order in which each piece of data was written. This ensures that the external device can receive data with the correct timing.

[0037] The following is combined Figure 3This section describes how controller 10 manages the state of the communication prohibition flag based on the motor's start / stop control signals. In the initial state, since the motor is not at the moment of starting or stopping, the communication prohibition flag is in a reset state. At this time, controller 10 needs to execute step S11 to determine whether it has received a start / stop control signal from the motor controller. Since the motor controller needs to send controller signals to the motor drive circuit to drive the motor, such as a PWM signal, when the motor starts, the motor controller needs to send a start signal, and when the motor needs to stop, it needs to send a stop signal. The motor's start / stop control signals include the aforementioned start and stop signals. For example, the start signal is a transition signal from low to high, while the stop signal is a transition signal from high to low.

[0038] If the controller 10 does not receive a start / stop control signal from the motor, it continues to wait. If a start / stop control signal is received, step S12 is executed to obtain the communication interruption duration corresponding to the moment the motor starts or stops. Since the duration of the large current spike generated at the moment of start-up or stop varies for different types of motors, a matching communication interruption duration needs to be preset for different types of motors. This communication interruption duration needs to be longer than the duration of the large current spike generated at the moment the motor starts or stops to ensure that the controller 10 does not send data during the duration of the large current spike generated at the moment the motor starts or stops.

[0039] For example, for a certain type of motor, after the motor controller sends a start or stop signal, a large current spike will occur in the 4th millisecond of the AC motor's start / stop cycle, and this spike will last for 1 millisecond. To address this, the communication interruption duration can be set to 10 milliseconds. This set interruption duration will exceed the duration of the large current spike after the motor controller sends the start or stop signal.

[0040] Preferably, to accommodate different types of motors with varying communication interruption durations, the controller 10 pre-stores communication interruption durations corresponding to multiple motor types, with each type stored in a separate register. Therefore, step S12 involves obtaining the communication interruption duration corresponding to the current motor type.

[0041] Furthermore, after receiving the start / stop control signal of the motor, the controller 10 also needs to execute step S13 to set the communication prohibition flag, thereby ensuring that the controller 10 cannot send data to external devices during the communication interruption.

[0042] Next, the controller 10 executes step S14, which calls the timer to start timing. Preferably, the controller 10 uses an internal timer for timing, thus eliminating the need for additional hardware circuitry. The controller 10 uses the moment it receives the motor start / stop control signal as the timing trigger moment, and uses the communication interruption duration obtained in step S12 as the timing duration, thereby performing the timing operation.

[0043] Then, step S15 is executed to determine whether the communication interruption duration has been reached, that is, whether the timing has ended. If it has not ended, the timing operation continues. If the timing duration has been reached, step S16 is executed to reset the communication prohibition flag, that is, to change the state of the communication prohibition flag again. In this way, the controller 10 can send the data buffered in the buffer to the external device.

[0044] As can be seen, this invention enables the controller to enter a short communication interruption period after the motor sends a start or stop signal. During this interruption, the controller does not send data to external devices but instead buffers the data to be sent in a buffer until the interruption ends. This completely avoids sending data during the period of high current spikes generated when the motor starts or stops, effectively preventing signal distortion caused by sending data during these high current spikes.

[0045] In addition, the present invention does not require the addition of extra hardware circuits, which can reduce the material cost of the lamps and thus reduce the production cost of the lamps; on the other hand, it does not require debugging of the additional hardware circuits, which can also reduce debugging time and cost, effectively reducing the cost of the lamps.

[0046] Finally, it should be emphasized that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. The working method of an anti-interference serial communication system, characterized in that, include: The start / stop control signal of the motor is obtained, and the duration of the communication interruption is obtained. The time when the start / stop control signal is obtained is taken as the start time of the communication interruption period. During the communication interruption, the communication data to be sent is buffered in a preset buffer; Determine whether the communication interruption duration has been reached; if so, send the data cached in the buffer sequentially. The process of acquiring the motor start / stop control signal includes: acquiring the start / stop control signal output by the motor controller to the motor drive circuit.

2. The working method of the anti-interference serial communication system according to claim 1, characterized in that: After acquiring the start / stop control signal, the communication prohibition flag is set; after the communication interruption duration is reached, the communication prohibition flag is reset.

3. The working method of the anti-interference serial communication system according to claim 2, characterized in that: Before sending the communication data, the status of the communication prohibition flag is obtained, and the communication data to be sent is processed according to the status of the communication prohibition flag.

4. The working method of the anti-interference serial communication system according to claim 3, characterized in that: Processing the communication data to be sent according to the state of the communication prohibition flag includes: during the period when the communication prohibition flag is set, buffering the communication data to be sent into a preset buffer, and after the communication prohibition flag is reset, sending the data buffered in the buffer sequentially.

5. The working method of the anti-interference serial communication system according to claim 3, characterized in that: Processing the communication data to be sent according to the state of the communication prohibition flag includes: if the communication prohibition flag is in a reset state, then the data to be sent is sent directly.

6. The method of operating the anti-interference serial communication system according to any one of claims 1 to 5, characterized in that: Obtaining the communication interruption duration includes: obtaining the communication interruption duration matching the current motor type from a preset register based on the current motor type.

7. The working method of the anti-interference serial communication system according to claim 6, characterized in that: The duration of the communication interruption is greater than the duration of the voltage spike generated when the motor of this type starts or stops.

8. The working method of the anti-interference serial communication system according to claim 7, characterized in that: After obtaining the start / stop control signal and the communication interruption duration, a timer is started to keep track of the duration of the communication interruption.

9. An anti-interference serial communication system, including a controller, characterized in that, The controller is capable of performing each step of the operating method of the anti-interference serial communication system as described in any one of claims 1 to 8.

10. The anti-interference serial communication system according to claim 9, characterized in that: One signal pin of the controller is connected to the control pin of the motor controller, and the motor controller outputs the start / stop control signal to the motor drive circuit through the control pin.