Synchronous control method based on double-color vehicle lamp
Through modular design and algorithm optimization, the fast and reliable communication and accurate light-color switching control of the two-color car light system are realized, solving the problems of inaccurate signal delay and state recovery in the existing technology, and improving the stability and security of the system .
Patent Information
- Application Number
- CN202411847456.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The existing two-color car light control method has problems such as signal delay, false triggering and inaccurate state recovery in terms of master-slave communication, light-color switching response and power-off memory, which is difficult to meet the needs of complex vehicle-mounted environments.
Modular design and algorithm optimization are adopted, and through voltage monitoring, master-slave recognition, state synchronization, optical color switching control and power-off memory modules, fast and reliable communication and accurate optical color switching control are achieved, and single-line bidirectional communication protocol and non- Volatile memory performs state synchronization and power-off memory.
It significantly reduces the risk of signal loss, shortens the response time of light-color switching, improves the memory recovery rate of power-off, enhances the stability and security of the system, and ensures reliable performance in complex environments.
Smart Images

Figure CN119325165A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle light control methods, and more specifically, to a synchronous control method based on dual-color vehicle lights. Background Art
[0002] In the field of automotive lighting, two-color headlights have gradually become an industry standard because they can provide different lighting effects under different environmental conditions. However, existing two-color headlight control methods have many technical bottlenecks, especially in the implementation of key functions such as master-slave communication, light color switching response, and power-off memory. Traditional methods usually rely on multi-line communication or one-way signal transmission to achieve state synchronization between master and slave. This architecture is highly complex and has high wiring costs. At the same time, it is easily interfered by the vehicle's electromagnetic environment in actual use, resulting in signal loss or response delay.
[0003] What is more serious is that the existing technologies generally show high delays and error rates in terms of response speed and false triggering control of light color switching. Due to the extensive application of engine one-button start and automatic start-stop technology, higher requirements are placed on the ability of lamps to resist voltage mutation interference, especially in the scenarios of engine one-button start and automatic start-stop, which often cause false switching or abnormal light color. At the same time, after the power is restored, it is difficult for the existing control system to accurately restore the light color state before the power outage, which poses a hidden danger to user experience and safety.
[0004] The root cause of the above problems is that the existing system lacks effective communication protocol optimization and state management mechanisms. The traditional single-line communication solution fails to fully consider the complexity of the vehicle environment, and its signal reliability and response speed are difficult to meet actual needs. In addition, the power-off memory function has problems in design, such as imperfect storage mechanism and inaccurate state recovery, which makes the system unable to provide continuous and consistent performance. Summary of the invention
[0005] The present invention aims to address the deficiencies in the above-mentioned prior art and propose a synchronous control method based on two-color headlights. Through modular design and algorithm optimization, it realizes fast and reliable communication between the master and slave machines, precise light color switching control, and efficient memory and recovery in power-off state. The core problem of the present invention is how to coordinately optimize the five modules of voltage monitoring, master-slave machine identification, state synchronization, light color switching control and power-off memory in a complex vehicle environment to achieve a more efficient and stable control effect.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] The synchronous control method based on the dual-color vehicle light includes:
[0008] An acquisition step, acquiring a vehicle power supply signal through a voltage monitoring module, wherein the voltage monitoring module monitors and classifies the system voltage state in real time, and divides the system voltage into a reset area, a switching preparation area, a normal working area, a lighting working area, and a standard input voltage area;
[0009] The master-slave identification step is to identify the master as grounded and the slave as suspended based on the level state of the preset port of the single-chip microcomputer through the master-slave identification module;
[0010] The state synchronization step adopts a single-line two-way communication through the state synchronization module, the host sends the light color state information at a fixed period, and the slave returns a confirmation signal within a predetermined time, thereby forming master-slave state synchronization; the light color state information is sent in a communication frame format;
[0011] The light color switching step is to switch the current light color and update the light color state to the non-volatile memory through the light color switching control module according to the ON-OFF action of the user operation detection switch under the condition of satisfying the preset operation time window;
[0012] The power-off memory step stores the current light color state in a non-volatile memory through a power-off memory module after the vehicle power is cut off for more than a preset time, and restores the light color state when the power is turned on again.
[0013] Preferably, the voltage classification of the voltage monitoring module specifically includes:
[0014] The voltage range of the reset area is 0-1.2V, the voltage range of the switching preparation area is 1.2V-3V, the voltage range of the normal working area is 3V-5.5V, the voltage range of the lighting working area is 7-18V, and the voltage of the standard input voltage area is 9-18V;
[0015] The system enters initialization, standby, normal operation or shutdown state according to the actual voltage level in different voltage areas.
[0016] Preferably, the state synchronization step specifically includes:
[0017] The host sends a low pulse signal lasting 20ms to notify the slave to prepare to receive commands;
[0018] The host sends the light color status information frame in a 20ms period. The information frame contains the start bit, command type bit, color status bit and check bit. The slave returns a confirmation signal within 10ms after receiving the light color status information.
[0019] If the master does not receive a confirmation signal from the slave after five consecutive transmissions, it enters fault protection mode.
[0020] Preferably, the light color switching step comprises:
[0021] When the first OFF action occurs, record the OFF start time and enter the preliminary judgment;
[0022] If the second OFF action occurs within the cumulative time window of 2s and the OFF time is greater than 200ms, the light color switching is executed and the new light color state is stored in the non-volatile memory;
[0023] A single OFF will not change color. The next color will only be switched after the OFF-ONOFF-ON action is completed within 2 seconds. If the action times are insufficient or the timeout is exceeded, the color will not change, and the action count will be reset after more than 2 seconds.
[0024] If the OFF time exceeds 10s, the system will turn off the light output and restore the light color state stored in the EEPROM when it is powered on next time.
[0025] Preferably, the power-off memory step comprises:
[0026] Monitor the power supply voltage in real time. When the voltage drops below 1.2V and lasts for more than 5 seconds, the power-off memory mechanism is triggered.
[0027] The current light color state is stored in the EEPROM, and when the system is powered on again and the voltage is stable above 3V, the light color state is read from the EEPROM to restore the system lighting.
[0028] Preferably, the light color switching control module further includes de-jitter processing:
[0029] The switch signal is de-jittered for 100ms to filter out voltage fluctuations caused by misoperation or environmental noise, ensuring the accuracy of light color switching.
[0030] Preferably, the communication frame format includes a start bit (1 bit), a command type bit (2 bits), a light color status bit (2 bits) and a check bit (3 bits), and the check bit is generated by a CRC algorithm and is used to check the integrity of the communication data;
[0031] The host and the slave realize bidirectional information transmission through fixed timing. The host completes the data frame transmission within the 20ms transmission window, and the slave returns the confirmation frame within the 10ms response window.
[0032] Preferably, the power-off memory module adopts a dual backup storage method, verifies the data each time it is stored, and automatically switches to the backup storage data when the EEPROM data is abnormal.
[0033] Preferably, the method further comprises a fault protection step:
[0034] In fault mode, the system automatically switches to white light state, disables the light color switching function, and tries to re-establish communication with the slave every 1 second;
[0035] If communication returns to normal, the system exits fault mode and resumes normal light-color synchronization operation.
[0036] Preferably, the light color switching step works in conjunction with the power-off memory step to ensure the continuity and accuracy of the light color state between the user operation switching and the system power-off state switching.
[0037] The beneficial effects of the present invention are mainly reflected in the following aspects:
[0038] By proposing a new single-line two-way communication protocol, the present invention greatly improves the efficiency and reliability of state synchronization between the master and slave machines. In a complex electromagnetic interference environment, the communication protocol adopted by the present invention can ensure the stable transmission of the host state information and the timely response of the slave, thereby significantly reducing the risk of signal loss. Through the optimized communication timing design, for example, the host transmission cycle is fixed to 20ms and the slave response window is 10ms, the state synchronization time is controlled within 30ms, which is far better than the existing technology.
[0039] In order to prevent external abnormalities from interfering with the normal switching action judgment, a single OFF will not change color. The next color will not change until the OFF-ONOFF-ON action is completed within 2 seconds. The color will not change after the timeout. The above action settings can also completely eliminate the interference of the drastic fluctuation of the input voltage caused by the start and stop of the engine on the lamp. After the color is successfully switched, the host will write the current color into the non-volatile memory. If any OFF action lasts for more than 10 seconds, the next ON will give priority to reading the light color information stored in the non-volatile memory, thereby realizing the memory function.
[0040] The present invention further improves the light color switching control module to realize a double-click judgment mechanism based on the OFF action, effectively shortening the response time of light color switching to less than 50ms. At the same time, the anti-false touch protection function greatly reduces the probability of false triggering caused by switch jitter or power fluctuation through multi-condition judgment (including 100ms de-jitter processing and cumulative time verification).
[0041] In terms of the power-off memory module, the present invention proposes a dual backup storage mechanism, combined with the multiple write protection design of EEPROM, to ensure that the light color state before the power failure can be efficiently and accurately restored after the power failure. Experiments show that the recovery rate of power-off memory reaches more than 99.8%, which significantly improves the reliability of the system in complex use environments.
[0042] In addition, the present invention achieves a high degree of integration of the control process through the complementarity and coordinated optimization between modules. For example, the data interaction between the voltage monitoring module and the light color switching control module ensures that the light color switching operation is only triggered when the voltage is in a stable range, thereby further improving the stability and safety of the system. This organic combination and functional complementarity between modules enables the present invention to fully reflect the synergy between the designs of each module while realizing the technical functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 The figure is an overall flow chart of the method of the present invention.
[0044] Figure 2 It is a logic block diagram of the master-slave identification module of the present invention.
[0045] Figure 3 It is a logic flow chart of the program functions of the present invention.
[0046] Figure 4 for Figure 3 A magnified schematic diagram of center A.
[0047] Figure 5 for Figure 3 A magnified schematic diagram of point B in the middle.
[0048] Figure 6 for Figure 3 Enlarged schematic diagram of point C in the middle.
[0049] Figure 7 for Figure 3 Enlarged schematic diagram of point D in the middle. DETAILED DESCRIPTION
[0050] The scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. The embodiments in the present invention and all other embodiments obtained by ordinary persons in the art without making creative work are within the scope of protection of the present invention.
[0051] like Figure 1-7 As shown, the present invention provides a synchronous control method based on dual-color vehicle lights, including a voltage monitoring module 1, a master-slave identification module 2, a state synchronization module 3, a light color switching control module 4 and a power-off memory protection module 5, and the modules work together through a data bus and a control signal.
[0052] The voltage monitoring module 1 is the basis of the entire system and is responsible for real-time acquisition and classification of the vehicle power supply voltage status. Specifically, the module divides the voltage into a reset area of 0-1.2V, a switching preparation area of 1.2V-3V, a normal working area of 3V-5.5V, a lighting working area of 7-18V, and a standard input voltage area of 9-18V.
[0053] Preferably, in a specific embodiment of the present invention, when the system detects that the voltage is in the reset area, the reset operation is automatically triggered to ensure that all modules can start working from the initial state when powered on again. This division of voltage areas not only ensures the functional stability of the modules under different operating voltages, but also provides a safe and reliable control environment. If the voltage is abnormal, the system enters the fault mode, and when the voltage abnormality disappears, the system automatically restores the previous light color.
[0054] In one embodiment of the present invention, based on the voltage monitoring module 1, the master-slave identification module 2 can quickly determine the master and slave identities. Specifically, the module makes a judgment based on the level state of the preset port of the single-chip microcomputer, where the grounded state is defined as the master and the suspended state is defined as the slave.
[0055] The working process of the host includes: after receiving the vehicle's start signal, start the RX1 resistance status detection, if the detection is grounded, it is determined to be the host, read the memory light color in the EEPROM, send it to the slave, and send the current host status information at the same time;
[0056] Determine whether the status code of the slave is received. If not, determine that the communication is faulty, enter the fault mode, and switch to white light. If the status code is received, keep the current light color and enter the OFF action detection process.
[0057] Detect the OFF time. If the time is less than 2 seconds, wait for the second OFF operation. If the time is greater than 10 seconds, turn off the clock and output, and light up according to the light color stored in the EEPROM when it is turned on next time.
[0058] The working process of the light color switching control module 4 includes:
[0059] The second OFF action detection determines whether the cumulative time of OFF+ON+this OFF is less than 2 seconds. If it is less than 2 seconds, it switches to the next light color and writes the current light color into EEPROM.
[0060] If the accumulated time is greater than or equal to 2 seconds, it is further determined whether the current OFF time is greater than 10 seconds. If it is greater than 10 seconds, the clock and output are turned off, and the light is lit according to the light color in the EEPROM next time; otherwise, the current light color is maintained and the first OFF action detection is returned to wait.
[0061] The working process of the slave includes: if the RX1 resistance state detection is suspended, it is determined to be a slave, enters the slave program, and waits for the master status signal;
[0062] If the host status signal is not received, it enters the fault mode and switches to white light. If the host status signal is received, it analyzes the light color information, adjusts the light color state of the slave to synchronize with the host, and continues to monitor the OFF action.
[0063] If the OFF time is less than 2 seconds, return the host status signal to determine the wait; otherwise, determine whether it exceeds 10 seconds. If so, turn off the clock and output; otherwise, continue to wait for the host status signal.
[0064] In one embodiment of the present invention, the power-off memory protection module 5 writes the current light color state into the EEPROM when it detects that the power-off time exceeds the preset 5-second threshold; after the system is powered on again, the light color state is read from the EEPROM, and the last light color state is restored after the voltage returns to the normal working range.
[0065] In one embodiment of the present invention, the communication mechanism of the state synchronization module 3 adopts single-line bidirectional communication, including the timing control of the host sending the state information and the slave returning the confirmation signal, and the light color state information is sent in the communication frame format: the host sends the state information in a period of 20ms, and the slave returns the confirmation signal within 10ms after receiving the host state; the communication protocol includes a fixed frame format, including the start bit, command type, light color state and check bit. The state synchronization module 3 includes a fault detection mechanism: if the host does not receive the slave confirmation signal for three consecutive times, or the slave does not detect the host signal within 100ms, the system enters the fault mode and switches to the white light constant state.
[0066] The light color switching control module 4 includes an anti-false touch protection mechanism: the OFF signal is de-jittered through 20ms sampling filtering to ensure the stability of the detection signal; the validity of the ON-OFF operation is verified before triggering the switch, and the switching operation is performed only when the preset time conditions are met.
[0067] The voltage monitoring module 1 further includes abnormal fluctuation protection. When the voltage fluctuation range exceeds 0.5V, an alarm is triggered and the protection mode is entered to ensure the reliability of master-slave communication and light color switching.
[0068] The system initialization of the method includes: detecting that the VCC voltage is stable above 3V, reading the master-slave identity status, and establishing a master-slave communication link; loading the light color status stored in the EEPROM, and entering a normal working state to ensure the state consistency and reliability of the system from startup to normal operation.
[0069] This master-slave identification method preset by hardware is efficient and reliable, avoiding the complicated software configuration process. In practical applications, preferably, when the vehicle power supply voltage reaches the normal working range (3V-5.5V), the master-slave identification module can complete the identity recognition within 10ms, thereby ensuring that the master and slave can quickly enter the synchronous working state when the system starts.
[0070] In one embodiment of the present invention, the state synchronization module 3 is responsible for establishing communication between the master and slave, and realizing state synchronization through a single-line two-way communication mechanism. In the present invention, the master sends light color state information at a fixed 20ms period, and the slave needs to return a confirmation signal within 10ms after receiving it.
[0071] In order to ensure the accuracy and integrity of communication, the state synchronization module 3 adopts a fixed frame format, including a start bit, a command type bit, a color status bit and a check bit. Preferably, the check bit adopts a CRC (cyclic redundancy check) algorithm to ensure that data errors can be effectively detected and corrected even if they are interfered with by external factors during the communication process. In addition, when the host fails to receive a confirmation signal from the slave for three consecutive times, the system will automatically enter a fault protection mode and switch to a white light state to ensure that the vehicle still has basic lighting functions under abnormal conditions.
[0072] In one embodiment of the present invention, the light color switching control module 4 realizes real-time switching between white light and yellow light by monitoring the ON-OFF action of the vehicle switch. In the present invention, in order to avoid wrong switching caused by misoperation, the system sets a 2-second time window, and the detection of two OFF actions and the judgment of the accumulated time must be completed within this window.
[0073] Specifically, the module records the timestamp of each OFF action and calculates the cumulative time after the second OFF action. If the total duration of the last OFF+ON+this OFF is less than 2 seconds, the system will immediately switch the light color and write the new light color state into the EEPROM. Preferably, in order to improve the reliability of the system, the light color switching control module also includes a de-jitter processing function, which performs a 100ms de-jitter processing on each switch signal to ensure the accuracy of the detection and the consistency of the system response.
[0074] A single OFF will not change color. The next color will only be switched after the OFF-ON-OFF-ON action is completed within 2 seconds. If the action is not repeated enough or the timeout is exceeded, the color will not change, and the action count will be reset after more than 2 seconds.
[0075] If the OFF time exceeds 10s, the system will turn off the light output and restore the light color state stored in the EEPROM when it is powered on next time.
[0076] In one embodiment of the present invention, the power-off memory protection module 5 is a key innovation of the present invention, which monitors the supply voltage in real time when the vehicle power is off. When the voltage drops below 1.2V and lasts for more than 5 seconds, the module automatically writes the current light color state into the EEPROM for storage.
[0077] After the vehicle is powered on again, when the voltage stabilizes to above 3V, the module will read the stored light color status from the EEPROM and restore it during system initialization. This design effectively solves the problem of manually adjusting the light status after each restart of the vehicle, greatly improving the user experience. In addition, preferably, by adopting a dual backup storage mechanism, the reliability of data storage is further improved, ensuring the correct restoration of the light color status even in extreme cases.
[0078] The present invention constructs an efficient and reliable dual-color vehicle light synchronization control method by organically combining multiple modules such as voltage monitoring, master-slave identification, state synchronization, light color switching and power-off memory. It can not only adapt to complex vehicle environments, but also provide a good user experience. The application of each module in specific scenarios, especially the performance under voltage fluctuations and power outages, further highlights the technical advantages and innovation of the present invention.
[0079] In the present invention, the voltage monitoring protection module 1 further improves the adaptability and stability of the system in a complex vehicle environment. The module monitors the vehicle power supply voltage in real time and divides the system into a reset area, a preparation area, and a normal working area according to different voltage levels. Specifically, when the voltage is between 0-1.2V, the system enters the reset area; when the voltage is between 1.2V and 3V, the system is in the preparation area; when the voltage reaches 3V or more, the system enters the normal working area.
[0080] In order to better understand this division, preferably, in a specific embodiment of the present invention, the voltage monitoring protection module 1 controls the response time of voltage fluctuations to less than 1ms, ensuring that the system can perceive the changes in the power supply voltage in real time and quickly make corresponding adjustments. This fast response capability effectively prevents misoperation caused by power supply fluctuations. In addition, the module also has a hysteresis effect, that is, the voltage must remain stable in a certain area for more than 100ms before triggering a state switch, thereby avoiding misjudgments caused by short-term fluctuations.
[0081] In one embodiment of the present invention, the state synchronization module 3 of the present invention is not only responsible for the communication between the master and the slave, but also further improves the efficiency and reliability of the communication through the optimized communication protocol. Specifically, the module adopts a serial communication protocol with a fixed frame format, which includes a start bit, a command type bit, a data bit and a check bit. Preferably, the check part of the data frame uses a CRC cyclic redundancy check algorithm, which can effectively detect data errors caused by signal interference during the communication process. The communication frame format includes a start bit (1 bit), a command type bit (2 bits), a light color state bit (2 bits) and a check bit (3 bits). The check bit is generated using a CRC algorithm to verify the integrity of the communication data; wherein, the host and the slave realize bidirectional information transmission through a fixed timing, the host completes the data frame transmission within a 20ms transmission window, and the slave returns a confirmation frame within a 10ms response window.
[0082] Taking a specific embodiment as an example, while the host sends the light color status information every 20ms, the slave will return a confirmation signal within 10ms after receiving it. This design ensures that the information synchronization between the master and the slave can be completed within 30ms, thereby achieving fast and stable status updates. In addition, if the confirmation signal from the slave is not received three times in a row during the communication process, the system will automatically switch to the white light state. This fault protection mechanism can ensure the basic function of vehicle lighting when communication is abnormal.
[0083] In one embodiment of the present invention, in order to avoid color switching abnormalities caused by false triggering, the light color switching control module 4 of the present invention further includes an anti-false touch protection function. This function verifies the stability of each switch signal through de-jitter processing and ensures a duration of at least 20ms during signal acquisition.
[0084] In a specific embodiment, when the vehicle user quickly operates the switch in a short period of time, the system can accurately determine the validity of each operation and filter out false signals caused by switch jitter or electromagnetic interference. In addition, the light color switching control module verifies the operation sequence and cumulative time to ensure that the color switching is triggered only when the established conditions are met (such as two consecutive OFF operations with a cumulative time of less than 2 seconds). This multiple verification mechanism significantly improves the reliability of the system.
[0085] The storage management mechanism of the power-off memory protection module 5 ensures the preservation and restoration of the light color state of the vehicle in the event of a power outage. The module adopts a double backup storage strategy, that is, each time the light color state is stored in the EEPROM, two write operations are performed to ensure that the correct light color state can be restored through the backup data in the event of an unexpected power outage or other storage anomalies.
[0086] In a preferred embodiment of the present invention, the module triggers a write operation when the system detects that the power supply voltage is lower than 1.2V and lasts for more than 5 seconds. At the same time, after each write, the module will perform data verification to ensure data integrity. Even in extreme environments, such as when the vehicle is running in extremely cold or high temperature conditions, this mechanism can ensure the correct restoration of the light color state.
[0087] In one embodiment of the present invention, in order to ensure that the system can quickly enter a normal working state when powered on, the present invention provides a complete system initialization process. The process includes three stages: hardware initialization, software initialization, and working mode switching. In the hardware initialization stage, the system will check the port configuration, communication interface, and memory status; in the software initialization stage, the system will initialize variables, state machines, and interrupt settings.
[0088] In a specific embodiment, when the system detects that the power supply voltage reaches above 1.2V and remains stable for 100ms, it starts to read the preset port level status of the master-slave identification module, and loads the light color status information stored in the EEPROM according to the identification result. Subsequently, the status synchronization module establishes a communication link with the slave to ensure that the master and slave can quickly synchronize the working status after the system is started. This initialization process design effectively improves the startup speed and reliability of the system.
[0089] In order to verify the superiority of the present invention in the synchronous control of dual-color vehicle lights, the present invention designs a comparative test experiment. The experiment selects the specific embodiment of the present invention and the control method under the prior art as the comparison objects, and conducts comparative analysis through a unified test environment and indicators.
[0090] The test environment and methods are as follows:
[0091] 1. Test environment
[0092] The test is carried out in a standard in-vehicle environmental simulator with an ambient temperature of -20°C to 70°C, simulating the extreme conditions in actual vehicle operation.
[0093] Use a 9-18V vehicle power supply system and introduce typical vehicle electromagnetic interference conditions.
[0094] 2. Test indicators and standards
[0095] State synchronization time: the time required to complete state synchronization between the master and slave devices, the standard is ≤30ms.
[0096] Light color switching response time: the time from receiving the switching signal to completing the light color switching, the standard is ≤50ms.
[0097] False trigger rate: The number of false trigger events caused by vehicle power supply fluctuations or switch jitters, with a standard of ≤0.1%.
[0098] Power-off memory recovery rate: The accuracy of restoring the light color state before power failure after power failure, the standard is ≥99%.
[0099] Even if there is a very low probability of false switching in extreme environments, the system still has the ability to recover by itself as long as it is not physically damaged. After the interference disappears, the program will restore the light color before the interference in the next cycle (each signal cycle is about 30mS-300mS).
[0100] 3. Test Methods
[0101] State synchronization test: simulates different signal delays between the master and slaves and measures the time it takes to complete state synchronization.
[0102] Light color switching test: Perform a series of OFF-ON operations and record the time required for light color switching.
[0103] False trigger test: simulate various switch jitter frequencies and count false trigger events.
[0104] Power-off memory test: After multiple power outages, record the light and color status of the system recovery and calculate the recovery accuracy.
[0105] The following table shows the specific test results of the embodiments and comparative examples:
[0106]
[0107] It can be seen from the test results that the embodiments of the present invention are significantly better than the comparative examples in all test indicators.
[0108] 1. State synchronization time: The present invention controls the state synchronization time of the master and slave machines within 25ms through an optimized single-line two-way communication protocol, which is about 44% faster than the 45ms of the comparison ratio. This optimization ensures that the synchronization of the master and slave machines can be completed at a faster speed during high-speed driving of the vehicle, improving the real-time performance and safety of the system.
[0109] 2. Light color switching response time: In the embodiment of the present invention, the light color switching response time is 40ms, which is much lower than 65ms in the comparative example. This shows that the present invention can complete the light color switching operation more quickly after the switch signal is triggered, providing the driver with a more sensitive control experience.
[0110] 3. False trigger rate: The false trigger rate of the embodiment of the present invention is only 0.05%, while that of the comparative example is as high as 0.5%. This difference is mainly attributed to the anti-false touch protection module of the present invention, which adopts 20ms de-jitter processing and multiple condition judgment, effectively reducing false trigger events caused by switch jitter or electromagnetic interference.
[0111] 4. Power-off memory recovery rate: The power-off memory recovery rate of the present invention is as high as 99.8%, while the comparative example is only 90.5%. This difference shows that the dual backup storage mechanism of the present invention significantly improves the accuracy of state recovery after power failure, and the system can reliably recover to the light color state before power failure even in multiple power failures and extreme environments.
[0112] Based on the above tests, the embodiments of the present invention have shown significant technical advantages in terms of state synchronization, light color switching response, anti-false touch, power-off memory, etc. These improvements have greatly improved the practicality and reliability of the two-color headlights, and are particularly suitable for complex vehicle environments. While ensuring fast response and precise control, the present invention also ensures the stability of the system under various working conditions through multiple protection mechanisms.
[0113] The present invention not only improves the response speed and reliability of the dual-color headlight system through the coordinated optimization of multiple modules, but also effectively reduces the false trigger rate and the power-off memory recovery error rate, which has significant technical advantages. The test results fully verify the innovation and practicality of the present invention.
[0114] The synchronous control method based on the dual-color headlights of the present invention realizes the efficient integration of multiple functions such as voltage monitoring, master-slave identification, state synchronization, light color switching, and power-off memory through modular design. The modules are connected by precise logic to ensure the stability and reliability of the system under various working conditions, while providing users with an excellent user experience. Its innovations include accurate classification of power supply voltage, optimized design of communication protocol, protection against false touch, and power-off memory management, all of which have achieved significant improvements on the basis of existing technologies.
[0115] The above description is only a preferred specific implementation manner of the present invention; however, the protection scope of the present invention is not limited thereto; any person familiar with the art who, within the scope disclosed by the present invention, makes equivalent replacements or changes based on the scheme and improved concepts of the present invention shall be covered within the protection scope of the present invention.
Claims
1. A synchronous control method based on dual-color vehicle lights, characterized in that: The following steps are involved: An acquisition step, acquiring a vehicle power supply signal through a voltage monitoring module, wherein the voltage monitoring module monitors and classifies the system voltage state in real time, and divides the system voltage into a reset area, a switching preparation area, a normal working area, a lighting working area, and a standard input voltage area; The master-slave identification step is to identify the master as grounded and the slave as suspended based on the level state of the preset port of the single-chip microcomputer through the master-slave identification module; The state synchronization step adopts a single-line two-way communication through the state synchronization module, the host sends the light color state information at a fixed period, and the slave returns a confirmation signal within a predetermined time, thereby forming master-slave state synchronization; the light color state information is sent in a communication frame format; The light color switching step is to switch the current light color and update the light color state to the non-volatile memory through the light color switching control module according to the ON-OFF action of the user operation detection switch under the condition of satisfying the preset operation time window; The power-off memory step stores the current light color state in a non-volatile memory through a power-off memory module after the vehicle power is cut off for more than a preset time, and restores the light color state when the power is turned on again.
2. The synchronous control method according to claim 1, characterized in that: The voltage classification of the voltage monitoring module specifically includes: The voltage range of the reset area is 0-1.2V, the voltage range of the switching preparation area is 1.2V-3V, the voltage range of the normal working area is 3V-5.5V, the voltage range of the lighting working area is 7-18V, and the voltage of the standard input voltage area is 9-18V; The system enters initialization, standby, normal operation or shutdown state according to the actual voltage level in different voltage areas.
3. The synchronous control method according to claim 1, characterized in that: The state synchronization step specifically includes: The host sends a low pulse signal lasting 20ms to notify the slave to prepare to receive commands; The host sends the light color status information frame in a 20ms period. The information frame contains the start bit, command type bit, color status bit and check bit. The slave returns a confirmation signal within 10ms after receiving the light color status information. If the master does not receive a confirmation signal from the slave after five consecutive transmissions, it enters fault protection mode.
4. The synchronous control method according to claim 1, characterized in that: The light color switching step comprises: When the first OFF action occurs, record the OFF start time and enter the preliminary judgment; If the second OFF action occurs within the cumulative time window of 2s and the OFF time is greater than 200ms, the light color switching is executed and the new light color state is stored in the non-volatile memory; A single OFF will not change color. The next color will only be switched after the OFF-ONOFF-ON action is completed within 2 seconds. If the action times are insufficient or the timeout is exceeded, the color will not change, and the action count will be reset after more than 2 seconds. If the OFF time exceeds 10s, the system will turn off the light output and restore the light color state stored in the EEPROM when it is powered on next time.
5. The synchronous control method according to claim 1, characterized in that: The power-off memory step comprises: Monitor the power supply voltage in real time. When the voltage drops below 1.2V and lasts for more than 5 seconds, the power-off memory mechanism is triggered. The current light color state is stored in the EEPROM, and when the system is powered on again and the voltage is stable above 3V, the light color state is read from the EEPROM to restore the system lighting.
6. The synchronous control method according to claim 4, characterized in that: The light color switching control module also includes de-jitter processing: The switch signal is de-jittered for 100ms to filter out voltage fluctuations caused by misoperation or environmental noise, ensuring the accuracy of light color switching.
7. The synchronous control method according to claim 3, characterized in that: The communication frame format includes a start bit, a command type bit, a light color status bit and a check bit, and the check bit is generated by a CRC algorithm to check the integrity of the communication data; The host and the slave realize bidirectional information transmission through fixed timing. The host completes the data frame transmission within the 20ms transmission window, and the slave returns the confirmation frame within the 10ms response window.
8. The synchronous control method according to claim 5, characterized in that: The power-off memory module adopts a dual backup storage mode, verifies the data each time it is stored, and automatically switches to the backup storage data when the EEPROM data is abnormal.
9. The synchronous control method according to claim 1, characterized in that: The method further comprises a fail-safe step: In fault mode, the system automatically switches to white light state, disables the light color switching function, and tries to re-establish communication with the slave every 1 second; If communication returns to normal, the system exits fault mode and resumes normal light-color synchronization operation.
10. The synchronous control method according to claim 1, characterized in that: The light color switching step works in conjunction with the power-off memory step to ensure the continuity and accuracy of the light color state between the user operation switching and the system power-off state switching.
Citation Information
Patent Citations
Control system of trailer lamp
CN102101457A
Method of adjusting change in color and brightness of intelligent lamp by use of mechanical switch
CN105263222A
Lamplight adjustment method and device, intelligent table lamp and storage medium
CN108596972A
Bus protocol for dynamic lighting application
CN109729628A
Data transmission device, electronic equipment and method for switching data transmission path
CN115237838A