Synchronous control method based on dual-color vehicle lamps
Through modular design and algorithm optimization, the voltage monitoring, master-slave recognition, status synchronization, light-color switching control and power-off memory modules in the dual-color car light system are solved, and the problems of low efficiency and poor reliability of the dual-color car light control method in the existing technology in complex vehicle environments are achieved, achieving a more efficient and stable control effect.
Patent Information
- Application Number
- CN202411847456.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The existing two-color car light control method has problems such as low efficiency and poor reliability in master-slave communication, light-color switching response, and power-off memory, especially in complex vehicle-mounted environments, which are difficult to achieve stable and consistent performance.
Modular design and algorithm optimization are adopted, and through the coordinated optimization of modules such as voltage monitoring, master-slave recognition, state synchronization, light-color switching control and power-off memory, fast and reliable communication between master and slave, accurate light-color switching control and efficient memory and recovery under power-off memory.
It significantly improves the efficiency and reliability of master-slave state synchronization, shortens the response time of light-color switching, reduces the false trigger rate, and improves the accuracy of power-off memory recovery, ensuring efficient and stable operation of the system in complex vehicle-mounted environments.
Smart Images

Figure CN119325165B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle lamp control systems, and more particularly to a synchronous control method based on dual-color vehicle lamps. Background Art
[0002] In the field of automotive lighting, dual-color vehicle lamps have gradually become an industry standard because they can provide different lighting effects under different environmental conditions. However, there are many technical bottlenecks in existing dual-color vehicle lamp control methods, 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 unidirectional signal transmission to achieve state synchronization between the master and slave devices. This architecture has high complexity and large wiring costs, and is also vulnerable to interference from the in-vehicle electromagnetic environment during actual use, resulting in signal loss or response delay.
[0003] More seriously, existing technologies generally exhibit high latency and error rates in terms of the response speed and false trigger control of light color switching. Due to the widespread application of one-touch engine start and automatic start-stop technologies, higher requirements are imposed on the ability of lamps to resist voltage mutation interference. Especially in the scenarios of one-touch engine start and automatic start-stop, false switching or abnormal light color often occurs. At the same time, after power-off recovery, it is difficult for existing control systems to accurately restore to the light color state before power-off, posing potential risks to user experience and safety.
[0004] The root cause of the above problems lies in the lack of effective communication protocol optimization and state management mechanisms in existing systems. Traditional single-line communication schemes do not fully consider the complexity of the in-vehicle environment, and their signal reliability and response speed are difficult to meet actual requirements. In addition, the power-off memory function has problems such as imperfect storage mechanisms and inaccurate state recovery in design, resulting in the system being unable to provide consistent performance. Summary of the Invention
[0005] The present invention aims to address the above deficiencies in the prior art by proposing a synchronous control method based on dual-color vehicle lamps. Through modular design and algorithm optimization, fast and reliable communication between the master and slave devices, precise light color switching control, and efficient memory and recovery in the power-off state are achieved. The core problem of the present invention is how to synergistically optimize the five modules of voltage monitoring, master-slave identification, state synchronization, light color switching control, and power-off memory in a complex in-vehicle environment to achieve more efficient and stable control effects.
[0006] To solve the above technical problems, the present invention adopts the following technical solutions:
[0007] A synchronous control method based on dual-color vehicle lamps, comprising:
[0008] Obtaining step: Obtain the vehicle power supply signal through the voltage monitoring module. Among them, the voltage monitoring module monitors and classifies the system voltage status 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] Master-slave identification step: Based on the level status of the preset port of the single-chip microcomputer through the master-slave identification module, when it is grounded, it is identified as the master, and when it is floating, it is identified as the slave;
[0010] Status synchronization step: Adopt single-wire bidirectional communication through the status synchronization module. The master sends the light color status information at a fixed cycle, and the slave returns a confirmation signal within a predetermined time to form master-slave status synchronization; the light color status information is sent in the format of a communication frame;
[0011] Light color switching step: Through the light color switching control module, detect the ON-OFF action of the switch according to the user operation, and switch the current light color and update the light color status to the non-volatile memory under the condition of meeting the preset operation time window condition;
[0012] Power-off memory step: Through the power-off memory module, after the vehicle power supply is powered off for more than the preset duration, store the current light color status in the non-volatile memory, and restore the light color status when power is restored.
[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] Among them, the system enters the initialization, standby, normal operation, or shutdown state according to the actual voltage level in different voltage areas.
[0016] Preferably, the status synchronization step specifically includes:
[0017] The master sends a low pulse signal lasting for 20ms to notify the slave to prepare to receive commands;
[0018] The master sends the light color status information frame at a 20ms cycle. The information frame includes a start bit, a command type bit, a color status bit, and a check bit. The slave returns a confirmation signal within 10ms after receiving the light color status information;
[0019] If the master does not receive the confirmation signal from the slave after continuously sending five times, it enters the fault protection mode.
[0020] Preferably, the light color switching step includes:
[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 2 s and the OFF time is greater than 200 ms, perform the light color switching and store the new light color state in the non-volatile memory;
[0023] A single OFF will not change the color. It will switch to the next color only after completing the OFF-ON-OFF-ON action within 2S. If the number of actions is insufficient or the action is completed after the timeout, the color will not change, and the action count will be reset after exceeding 2S;
[0024] If the current OFF time exceeds 10 s, the system will turn off the light output and restore the light color state stored in the EEPROM when the power is turned on next time.
[0025] Preferably, the power-off memory step includes:
[0026] Monitor the supply voltage in real time. When the voltage drops below 1.2 V and lasts for more than 5 seconds, trigger the power-off memory mechanism;
[0027] Store the current light color state in the EEPROM, and read the light color state from the EEPROM to restore the system lights when the system is powered on again and the voltage is stable above 3V.
[0028] Preferably, the light color switching control module further includes debounce processing:
[0029] Perform 100 ms of debounce processing on the switch signal to filter out voltage fluctuations caused by misoperations or environmental noise and ensure 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 state bit (2 bits), and a check bit (3 bits). The check bit is generated using the CRC algorithm and is used to verify the integrity of the communication data;
[0031] Among them, the host and the slave achieve two-way information transmission through a fixed timing sequence. The host completes the data frame transmission within a 20 ms transmission window, and the slave returns an acknowledgment frame within a 10 ms response window.
[0032] Preferably, the power-off memory module adopts a dual-backup storage method, verifies the data during each storage, and automatically switches to the backup storage data when the EEPROM data is abnormal.
[0033] Preferably, the method further includes a fault protection step:
[0034] In the fault mode, the system automatically switches to the white light state, disables the light color switching function, and attempts to re - establish communication with the slave every 1 second.
[0035] If the communication resumes normally, the system exits the fault mode and resumes normal light color synchronization operation.
[0036] Preferably, the light color switching step and the power - off memory step work together to ensure the continuity and accuracy of the light color state between user - operated switching and 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 - wire bidirectional communication protocol, the present invention greatly improves the efficiency and reliability of state synchronization between the master and slave devices. 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 device, thus significantly reducing the risk of signal loss. Through the optimized communication timing design, such as the fixed host sending period of 20 ms and the slave response window of 10 ms, the state synchronization time is controlled within 30 ms, which is far better than the prior art.
[0039] To prevent external abnormal interference from normal switching action determination, a single OFF will not change color. It will only switch to the next color after completing the OFF - ON - OFF - ON action within 2S, and no color change will occur even if the time limit is exceeded; the above action settings can also completely eliminate the interference of the drastic voltage fluctuation caused by engine start - stop to the lamp; after successfully switching the color, the host will write the current color into the non - volatile memory; if any OFF action lasts for more than 10S, the next ON will preferentially read the light color information stored in the non - volatile memory, thus realizing the memory function.
[0040] The present invention further improves through the light color switching control module to implement a double - click determination mechanism based on the OFF action, effectively shortening the response time of light color switching to less than 50 ms. At the same time, the anti - accidental touch protection function reduces the probability of accidental triggering caused by switch jitter or power fluctuation through multi - condition judgment (including 100 - ms debounce 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 it can efficiently and accurately restore to the light color state before power - off after power - off. Experiments show that the recovery rate of power - off memory reaches more than 99.8%, significantly improving the reliability of the system in complex usage environments.
[0042] In addition, through the complementarity and collaborative optimization among modules, the present invention achieves a high degree of integration of the control process. 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 triggered only when the voltage is within a stable range, thereby further enhancing the stability and security of the system. This organic combination and functional complementarity among modules enable the present invention to fully embody the synergistic effect among the designs of various modules while realizing the technical functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is the overall flowchart of the method of the present invention.
[0044] Figure 2 is the logic block diagram of the master-slave identification module of the present invention.
[0045] Figure 3 is the program function logic flowchart of the present invention.
[0046] Figure 4 is Figure 3 the enlarged schematic diagram at position A in
[0047] Figure 5 is Figure 3 the enlarged schematic diagram at position B in
[0048] Figure 6 is Figure 3 the enlarged schematic diagram at position C in
[0049] Figure 7 is Figure 3 the enlarged schematic diagram at position D in DETAILED DESCRIPTION OF THE EMBODIMENTS
[0050] Next, the solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art without creative efforts in the embodiments of the present invention belong to the scope protected by the present invention.
[0051] As Figures 1-7 shown, the present invention provides a synchronous control method for dual-color vehicle lights, including a voltage monitoring module 1, a master-slave identification module 2, a status synchronization module 3, a light color switching control module 4, and a power-off memory protection module 5. Each module works collaboratively through a data bus and control signals.
[0052] The voltage monitoring module 1 is the foundation of the entire system and is responsible for real-time acquisition and classification of the vehicle power supply voltage status. Specifically, this 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, a reset operation is automatically triggered to ensure that all modules can start working from the initial state when power is reapplied. This division of voltage regions not only ensures the functional stability of the module under different working voltages but also provides a safe and reliable control environment. In case of voltage anomaly, the system enters the fault mode. When the voltage anomaly disappears, the system will automatically restore the previous light color.
[0054] In an embodiment of the present invention, based on the voltage monitoring module 1, the master - slave identification module 2 can quickly determine the master - slave identity. Specifically, this module makes a judgment based on the level status of the preset port of the single - chip microcomputer. Among them, the grounded state is defined as the master, and the floating state is defined as the slave.
[0055] The working process of the master includes: after receiving the vehicle start signal, start the RX1 resistor status detection. If the detection shows it is grounded, it is determined as the master, read the memory light color in the EEPROM, send it to the slave, and at the same time send the current master status information;
[0056] Judge whether the status code of the slave is received. If not received, it is determined that there is a communication fault, enter the fault mode, and switch to white light always on; if the status code is received, maintain 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 starting next time.
[0058] The working process of the light color switching control module 4 includes:
[0059] The second OFF action detection, judge whether the cumulative time of OFF + ON + this OFF is less than 2 seconds. If less than 2 seconds, switch to the next light color and write the current light color into the EEPROM;
[0060] If the cumulative time is greater than or equal to 2 seconds, further judge whether the current OFF time is greater than 10 seconds. If greater than 10 seconds, turn off the clock and output, and light up according to the light color in the EEPROM next time; otherwise, maintain the current light color and return to wait for the first OFF action detection.
[0061] The working process of the slave device includes: if the RX1 resistor state is detected as floating, it is determined as a slave device, enters the slave device program, and waits for the host device status signal;
[0062] If the host device status signal is not received, it enters the fault mode and switches to white light always on; if the host device status signal is received, it parses the light color information, adjusts the light color state of the slave device to be synchronized with the host device, and continues to monitor the OFF operation;
[0063] If the OFF time is less than 2 seconds, it returns to wait for the determination of the host device status signal; otherwise, it judges whether it exceeds 10 seconds. If it exceeds, it turns off the clock and output; otherwise, it continues to wait for the host device status signal.
[0064] In an embodiment of the present invention, the power-off memory protection module 5, when detecting that the power-off time exceeds the preset 5-second threshold, writes the current light color state into the EEPROM; after the system is powered on again, it reads the light color state from the EEPROM and restores the previous light color state after the voltage returns to the normal working area.
[0065] In an embodiment of the present invention, the communication mechanism of the status synchronization module 3 adopts single-wire bidirectional communication, including the timing control of the host device sending status information and the slave device returning an acknowledgment signal. The light color status information is sent in the format of a communication frame: the host device sends status information at a period of 20 ms, and the slave device returns an acknowledgment signal within 10 ms after receiving the host device status; the communication protocol includes a fixed frame format, including a start bit, a command type, a light color status, and a check bit. The status synchronization module 3 includes a fault detection mechanism: if the host device does not receive the slave device acknowledgment signal continuously for 3 times, or the slave device does not detect the host device signal within 100 ms, the system enters the fault mode and switches to the white light always on state.
[0066] The light color switching control module 4 includes an anti-misoperation protection mechanism: it performs debouncing processing on the OFF signal through 20-ms sampling filtering to ensure the stability of the detection signal; it verifies the validity of the ON-OFF operation before triggering the switch, and only performs the switching operation under the condition of meeting the preset time conditions.
[0067] The voltage monitoring module 1 further includes abnormal fluctuation protection. When the voltage fluctuation range exceeds 0.5 V, it triggers an alarm and enters the protection mode to ensure the reliability of the master-slave device communication and light color switching.
[0068] The system initialization of this method includes: detecting that the VCC voltage is stable above 3 V, reading the master-slave device identity status, establishing a master-slave device communication link; loading the light color state stored in the EEPROM, and entering the normal working state to ensure the state consistency and reliability of the system from startup to normal operation.
[0069] This master-slave identification method pre-set by hardware has high efficiency and reliability, avoiding complex software configuration processes. 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 identification within 10ms, thus ensuring that the master and slave can quickly enter the synchronous working state when the system starts.
[0070] In an embodiment of the present invention, the status synchronization module 3 is responsible for establishing communication between the master and slave, and realizing status synchronization through a single-wire bidirectional communication mechanism. In the present invention, the master sends the light color status information at a fixed 20ms cycle, and the slave needs to return an acknowledgement signal within 10ms after receiving it.
[0071] To ensure the accuracy and integrity of communication, the status 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 the CRC (Cyclic Redundancy Check) algorithm to ensure that even if affected by external interference during the communication process, data errors can be effectively detected and corrected. In addition, when the master does not receive the slave acknowledgement signal three times in a row, the system will automatically enter the fault protection mode and switch to the white light state to ensure that the vehicle still has basic lighting functions under abnormal conditions.
[0072] In an 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 actions of the vehicle switch. In the present invention, to avoid incorrect switching caused by misoperation, the system sets a 2-second time window, and it is necessary to complete the detection of two OFF actions and the judgment of the cumulative time within this window.
[0073] Specifically, this module records the timestamp of each OFF action and calculates the cumulative time after the second OFF action. If the total duration of the previous OFF + ON + the current OFF is less than 2 seconds, the system will immediately switch the light color and write the new light color status into the EEPROM. Preferably, to improve the reliability of the system, the light color switching control module also includes a debounce processing function, which performs 100ms of debounce processing on each switch signal to ensure the accuracy of detection and the consistency of system response.
[0074] A single OFF will not change the color. It will switch to the next color only after completing the OFF-ON-OFF-ON actions within 2S. If the number of actions is insufficient or the time limit is exceeded, the color will not change, and the action count will be reset after exceeding 2S;
[0075] If the current OFF time exceeds 10s, the system will turn off the light output and restore the light color status stored in the EEPROM when powering on next time.
[0076] In an embodiment of the present invention, the power-off memory protection module 5 is a key innovation of the present invention. It monitors the supply voltage in real time when the vehicle power supply is cut 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 above 3V, the module reads the stored light color state from the EEPROM and restores it during system initialization. This design effectively solves the problem that the light state needs to be adjusted manually every time the vehicle is restarted, 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 state even in extreme cases.
[0078] The present invention combines multiple modules such as voltage monitoring, master-slave recognition, status synchronization, light color switching, and power-off memory organically to construct an efficient and reliable dual-color headlight synchronization control method. It can not only adapt to complex in-vehicle environments but also provide a good user experience. The application of each module in specific scenarios, especially its performance under voltage fluctuations and power-off conditions, further highlights the technical advantages and innovation of the present invention.
[0079] In the present invention, the voltage monitoring and protection module 1 further improves the adaptability and stability of the system in complex in-vehicle environments. By monitoring the vehicle power supply voltage in real time, the module 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 - 3V, the system is in the preparation area; when the voltage reaches above 3V, the system enters the normal working area.
[0080] To better understand this division, preferably, in a specific embodiment of the present invention, the response time of the voltage monitoring and protection module 1 to voltage fluctuations is controlled within 1ms, ensuring that the system can sense the change of the power supply voltage in real time and make corresponding adjustments quickly. This fast response ability effectively prevents misoperations caused by power supply fluctuations. In addition, the module also has a hysteresis effect, that is, the voltage needs to remain stable in a certain area for more than 100ms before triggering a state switch, thus avoiding misjudgment caused by short-term fluctuations.
[0081] In an 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 slave devices, but also further improves the communication efficiency and reliability through an 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, data bits, and a check bit. Preferably, the check part of the data frame uses the 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 by the CRC algorithm and is used to verify the integrity of the communication data. Among them, the master and slave devices achieve two-way information transmission through a fixed timing sequence. The master device completes the data frame transmission within a 20 ms transmission window, and the slave device returns an acknowledgment frame within a 10 ms response window.
[0082] Taking a specific embodiment as an example, while the master device sends the light color state information every 20 ms, the slave device will return an acknowledgment signal within 10 ms after receiving it. Such a design ensures that the information synchronization between the master and slave devices can be completed within 30 ms, thus achieving fast and stable state updates. In addition, if the acknowledgment signal from the slave device is not received continuously three times 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 in case of communication anomalies.
[0083] In an embodiment of the present invention, in order to avoid abnormal color switching caused by accidental triggering, the light color switching control module 4 of the present invention further includes an anti-accidental triggering protection function. This function verifies the stability of each switch signal through debounce processing and ensures that there is at least a 20 ms duration during the signal acquisition process.
[0084] In a specific embodiment, when the vehicle user quickly operates the switch within a short period of time, the system can accurately judge the validity of each operation and filter out false signals generated by switch jitter or electromagnetic interference. In addition, the light color switching control module ensures that the color switching is triggered only when the established conditions are met (such as two consecutive OFF operations and the cumulative time is less than 2 seconds) by verifying the operation sequence and cumulative time. 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 case of power-off. The module adopts a dual-backup storage strategy, that is, each time the light color state is stored in the EEPROM, two write operations will be performed to ensure that the correct light color state can be restored through the backup data in case of accidental power-off 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 supply voltage is lower than 1.2V and lasts for more than 5 seconds. At the same time, after each write, the module performs data verification to ensure data integrity. Even in extreme environments, such as when the vehicle is operating under extremely cold or hot conditions, this mechanism can ensure the correct restoration of the light color state.
[0087] In an embodiment of the present invention, in order to ensure that the system can quickly enter the normal working state when powered on, the present invention provides a complete system initialization process. This process includes three stages: hardware initialization, software initialization, and working mode switching. In the hardware initialization stage, the system checks the port configuration, communication interface, and memory status; in the software initialization stage, the system initializes variables, state machines, and interrupt settings.
[0088] In a specific embodiment, when the system detects that the 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 their working states after the system starts. This initialization process design effectively improves the startup speed and reliability of the system.
[0089] 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 method are as follows:
[0091] 1. Test environment
[0092] The test is carried out in a standard vehicle-mounted environment simulator, with the environmental temperature ranging from -20°C to 70°C, simulating extreme conditions in actual vehicle operation.
[0093] A 9 - 18V vehicle-mounted power supply system is used, and typical vehicle-mounted electromagnetic interference conditions are introduced.
[0094] 2. Test indicators and standards
[0095] Status synchronization time: The time required for the master and slave to complete status synchronization, with the standard being ≤30ms.
[0096] Light color switching response time: The time from receiving the switching signal to the completion of the light color switching, with the standard being ≤50ms.
[0097] False trigger rate: The number of false trigger events caused by vehicle power supply fluctuations or switch jitters, with the standard being ≤0.1%.
[0098] Power-off memory recovery rate: The accuracy rate of recovering to the light color state before power-off after power-off, with the standard being ≥99%.
[0099] Even in the extremely low-probability case of false switching in extreme environments, as long as the system is not physically damaged, it still has the ability to recover on its own. 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] Status synchronization test: Simulate different signal delays between the host and slave devices and measure the status synchronization completion time.
[0102] Light color switching test: Conduct 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 the false trigger events.
[0104] Power-off memory test: Record the light color states restored by the system after multiple power-offs and calculate the recovery accuracy rate.
[0105] The following table shows the specific test results of the examples and comparative examples:
[0106]
[0107] It can be seen from the test results that the examples of the present invention are significantly superior to the comparative examples in all test indicators.
[0108] 1. Status synchronization time: Through the optimized single-wire bidirectional communication protocol, the present invention controls the status synchronization time between the host and slave devices within 25ms, which is about 44% improved compared to 45ms of the comparative example. This optimization ensures that during the high-speed driving of the vehicle, the synchronization between the host and slave devices can be completed at a faster speed, improving the real-time performance and safety of the system.
[0109] 2. Light color switching response time: In the examples of the present invention, the light color switching response time is 40ms, which is much lower than 65ms of 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 a more sensitive control experience for the driver.
[0110] 3. False trigger rate: The false trigger rate of the examples 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 trigger protection module of the present invention, which adopts 20ms debounce processing and multiple conditional judgments, effectively reducing the false trigger events caused by switch jitters 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 that of the comparative example is only 90.5%. This gap indicates that the dual-backup storage mechanism of the present invention significantly improves the accuracy of state recovery after power-off. Even under multiple power-offs and extreme environments, the system can reliably recover to the light color state before power-off.
[0112] Based on the above tests, the embodiments of the present invention have shown significant technical advantages in aspects such as state synchronization, light color switching response, anti-misoperation, and power-off memory. These improvements greatly enhance the practicability and reliability of the dual-color vehicle lamp, especially suitable for complex in-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] Through the collaborative optimization of multiple modules, the present invention not only improves the response speed and reliability of the dual-color vehicle lamp system, but also effectively reduces the mis-triggering rate and power-off memory recovery error rate, with significant technical advantages. The test results fully verify the innovation and practicability of the present invention.
[0114] The synchronous control method based on the dual-color vehicle lamp 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. Through precise logical connection between modules, the stability and reliability of the system under various working conditions are ensured, while providing an excellent user experience for users. Its innovations include the precise classification of the power supply voltage, the optimized design of the communication protocol, anti-misoperation protection, and power-off memory management, all of which have achieved significant improvements on the basis of the existing technology.
[0115] The above; only the preferred specific embodiments of the present invention; but the protection scope of the present invention is not limited thereto; any person familiar with the art within the scope disclosed by the present invention; according to the solution and improvement concept of the present invention, making equivalent replacements or changes; should be covered by 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; A power-off memory step, in which the current light color state is stored in a non-volatile memory through a power-off memory module after the vehicle power supply is disconnected for more than a preset time, and the light color state is restored when the power is turned on again; 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 turns off the light output and restores the light color state stored in the EEPROM when it is powered on next time; 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. Store the current light color status to EEPROM, and read the light color status from EEPROM to restore the system lighting when the system is powered on again and the voltage is stable above 3V; 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.
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 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.
5. The synchronous control method according to claim 1, 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.
6. 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.
7. 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
Method of adjusting change in color and brightness of intelligent lamp by use of mechanical switch
CN105263222A
Bus protocol for dynamic lighting application
CN109729628A
Data transmission device, electronic equipment and method for switching data transmission path
CN115237838A
Vehicle-mounted instrument control method, intelligent terminal and storage medium
CN117719333A