Remote control signal copying method, remote control replicator and storage medium
By receiving and processing remote control signals, switching local oscillator clock frequency and performing mixing processing, determining the transmission frequency value to copy the remote control signal, solving the problem that remote control function is difficult to achieve in long distances in the prior art, and simplifying user operations and the effect of reducing safety risks.
Patent Information
- Application Number
- CN202411441765.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-15
AI Technical Summary
The existing technology is difficult to realize remote control function at a long distance, and when users add multiple remote controls, it is difficult to find the correct remote control model. Different manufacturers have different remote control learning matching processes, resulting in complex operation and safety risks. .
By receiving the remote control signal of the remote control device to be copied, switching different local oscillator clock frequency values, and performing frequency mixing processing, an intermediate frequency signal is obtained. When the intermediate frequency signal is a continuous and stable square wave signal, determine the target local oscillator clock frequency value and the frequency values of multiple intermediate frequency signals, determine the working mode of the remote control signal, and use the corresponding frequency determination rules to process the frequency value of the intermediate frequency signal, and determine the The transmission frequency value is finally copied by analyzing the transmission frequency value.
It realizes that the remote control function can still be realized at long distances, simplifies the process of users adding multiple remote controls, reduces the difficulty of purchasing the correct remote control of the model, and reduces operational complexity and safety risks.
Smart Images

Figure CN119418512A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of remote controllers, and in particular to a remote control signal duplication method, a remote control duplicator, and a storage medium. Background Art
[0002] With the continuous development of the market economy and the large-scale application of wireless remote control technology, a large number of products using wireless remote controls have appeared on the market, such as electric vehicles, rolling shutters, gates, electric railings, etc. These electrical products can often be remotely turned on or off through the matching wireless remote controls. The problem that arises is that when users need to add multiple remote controls, they need to find matching electrical appliance manufacturers to purchase special remote controls and learn to match the new remote controls according to specific operating procedures so that the newly purchased remote controls can be used.
[0003] There are two difficulties. First, ordinary users may not be able to buy the correct model of remote control. There are many types of remote controls on the market, and even remote controls that look exactly the same are not universal. Second, different manufacturers often have different remote control learning and matching processes. Some manufacturers even need to disassemble the host box and open the circuit board to perform the learning and matching operation of the new remote control. This poses a certain risk of electric shock or difficulty in operation for ordinary users who are not professionals. The traditional method is to achieve data replication of wireless remote controls by comparing the signal power under different frequency working conditions. However, the remote control copied by the traditional method will only realize the remote control function when the distance is close. Summary of the invention
[0004] Based on this, it is necessary to provide a remote control signal duplication method, a remote control copier and a storage medium to address the above technical problems, so that the remote control function can still be realized at a long distance.
[0005] A remote control signal duplication method, the method comprising:
[0006] receiving a remote control signal from a remote control device to be copied;
[0007] Switching to different local oscillator clock frequency values, for each local oscillator clock frequency value, performing mixing processing according to the received remote control signal and each local oscillator clock frequency value to obtain an intermediate frequency signal;
[0008] When the intermediate frequency signal is a continuous and stable square wave signal, obtaining a corresponding target local oscillator clock frequency value, and obtaining frequency values of the intermediate frequency signal multiple times;
[0009] Determining the operating mode of the remote control signal according to multiple frequency values of the intermediate frequency signal;
[0010] Processing the frequency values of the plurality of intermediate frequency signals and the target local oscillator clock frequency value using the frequency determination rule in the working mode to determine the transmission frequency value of the remote control signal;
[0011] Based on the decoding rule corresponding to the working mode, the remote control signal is parsed using the transmission frequency value to copy the remote control instruction corresponding to the remote control signal.
[0012] A remote control duplicator is used to implement the steps of various remote control signal duplication method embodiments.
[0013] A computer-readable storage medium stores a computer program, which implements the steps of various remote control signal duplication method embodiments when executed by a processor.
[0014] The remote control signal duplication method, remote control copier and storage medium receive the remote control signal of the remote control device to be copied, switch different local oscillator clock frequency values, and perform mixing processing according to the remote control signal and the local oscillator clock frequency value to obtain an intermediate frequency signal. When the intermediate frequency signal is a continuous and stable square wave signal, that is, the transmission frequency of the remote control signal is close to the receiving frequency of the remote control copier; under this condition, the frequency of the obtained intermediate frequency signal will still fluctuate and the working mode of the remote control signal is unknown, so it is necessary to determine the working mode of the remote control signal according to multiple frequency values of the intermediate frequency signal, and use the frequency determination rule under the working mode to process the frequency value of the intermediate frequency signal and the target local oscillator clock frequency value to determine the transmission frequency value, so that the frequency value of the remote control signal obtained is more accurate; and the transmission frequency value is used to parse the remote control signal to copy the remote control instruction corresponding to the remote control signal, and a more accurate frequency value is used for signal parsing, so that the parsed signal is more complete, and the remote control copier can still realize the remote control function in the case of a long distance. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A diagram showing an application environment of a remote control signal duplication method in one embodiment;
[0016] Figure 2 A schematic diagram of a flow chart of a remote control signal copying method in one embodiment;
[0017] Figure 3 A schematic diagram of PWM encoding in one embodiment;
[0018] Figure 4 is a schematic diagram of a MAN code in one embodiment;
[0019] Figure 5 FIG. 4 is a schematic diagram of NRZ encoding in one embodiment. DETAILED DESCRIPTION
[0020] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly. The connection can be a direct connection or an indirect connection.
[0023] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0024] It can be understood that the “connection” in the following embodiments should be understood as “electrical connection”, “communication connection”, etc. if the connected circuits, modules, units, etc. have electrical signals or data transmission between each other.
[0025] The remote control device duplication method provided in this application can be applied to Figure 1 application environment. Figure 1 FIG. 1 is an application environment diagram of a remote control device duplication method in an embodiment, which includes a remote control device 110 to be copied and a remote control duplicator 120. The remote control duplicator 120 is used to copy the remote control instructions carried in the remote control signal of the remote control device 110 to be copied, and the copied remote control instructions are stored in different locations according to different keys.
[0026] In one embodiment, the remote control copier includes a wireless ISM transceiver, a low noise amplifier and a mixer connected in sequence. When the wireless ISM transceiver is in a receiving mode, the received RF modulated signal is input from the low noise amplifier (LNA) to a mixer (MIXER), and the mixer (MIXER) generates a signal according to the transmission frequency value f of the received remote control signal. SN The local oscillator clock frequency value f set by ISM LO Mixing is performed when f SN Frequency and f LO When the frequency difference falls within the passband of the intermediate frequency filter, the mixed frequency component will be output from the mixer, thereby obtaining an intermediate frequency signal f output in the form of a square wave with a specific frequency. IF , it can be seen that the frequency value of the intermediate frequency signal f IF =f SN -f LO . Similarly, we can get f SN =f LO +f IF , that is, it is necessary to measure the transmission frequency f of the unknown remote control signal SN By continuously adjusting the local oscillator clock frequency f LO , so that f SN With f LO The frequency difference falls within the passband of the IF filter, and can be measured by f IF The form of the unknown signal transmission frequency f is used to find the value SN .
[0027] Based on this analysis, Figure 2 As shown, a flowchart of a remote control device duplication method in an embodiment is provided. Taking the method applied to a remote control duplicator as an example, the method includes the following steps:
[0028] Step 202: Receive a remote control signal from a remote control device to be copied.
[0029] Specifically, the remote control duplicator enters a signal receiving mode to receive a remote control signal sent by the remote control device to be copied, wherein the remote control signal includes remote control commands of the remote control device to be copied, such as unlocking commands, locking commands, trunk opening commands, etc.
[0030] Step 204, switching different local oscillator clock frequency values, for each local oscillator clock frequency value, performing mixing processing according to the received remote control signal and each local oscillator clock frequency value to obtain an intermediate frequency signal.
[0031] The local oscillator clock frequency value refers to the frequency value of the local oscillator clock set in the remote control copier.
[0032] Specifically, the remote control copier switches different local oscillator clock frequency values, and each time a local oscillator clock frequency value is switched, the received remote control signal is mixed with the local oscillator signal corresponding to the local oscillator clock frequency value to obtain an intermediate frequency signal.
[0033] Optionally, the remote control copier may switch a local oscillator clock frequency value that varies by a preset frequency variation within a preset frequency range.
[0034] The preset frequency variation can be set according to the requirements and stored in the remote control copier. For example, the preset frequency variation can be 400KHz (kilohertz), 500KHz, 550KHz, 600KHz, etc., but not limited thereto. The preset frequency range can also be set according to the requirements, and the switched local oscillator clock frequency value is within the range.
[0035] Taking the preset frequency change of 500KHz and the preset frequency range of 250MHz to 960MHz as an example, the local oscillator clock frequency value that changes with the preset frequency change can be 250MHz (initial frequency value), 250.5MHz, 251MHz, 251.5MHz...955.5MHz, 960MHz.
[0036] Specifically, the user presses a button according to a certain rule, and the remote control copier enters the signal receiving mode. After the remote control copier enters the signal receiving mode, the remote control signal sent by the remote control device to be copied is received according to the set initial frequency value. The frequency is changed in units of a preset frequency change amount, so that the signal local oscillator clock frequency value of the wireless transceiver in the remote control copier changes continuously until it reaches the set maximum frequency or minimum frequency value. And each time a frequency switch is completed, the frequency value of the intermediate frequency signal is detected once. Therefore, the optimal receiving frequency of the remote control device to be copied can be obtained through multiple tests, thereby improving the accuracy of the transmission frequency value.
[0037] In step 206, when the intermediate frequency signal is a continuous and stable square wave signal, a corresponding target local oscillator clock frequency value is obtained, and frequency values of the intermediate frequency signal are obtained multiple times.
[0038] The target local oscillator clock frequency value refers to the target local oscillator clock frequency value corresponding to the case where the intermediate frequency signal is a continuous and stable square wave signal. The target local oscillator clock frequency value may have slight fluctuations or may not change after being selected.
[0039] Specifically, when the receiving frequency changes, the MCU of the remote control duplicator will start the timer to continuously capture the intermediate frequency signal output of the ISM wireless transceiver to detect whether the intermediate frequency signal is a continuous and stable square wave signal. Specifically, when the period and level value of the intermediate frequency signal are stable, it is determined that a continuous and stable square wave signal is collected. When a continuous and stable square wave signal is collected, it means that f SNWith f LO The frequency difference falls within the passband of the IF filter, f SN With f LO The frequency difference between them reaches a minimum.
[0040] Step 208: determining the operating mode of the remote control signal according to the multiple frequency values of the intermediate frequency signal.
[0041] The working mode of the remote control signal may include FSK (Frequency-shift keying) or ASK (Amplitude Shift Keying). It is understandable that OOK (On-Off Keying) is a special case of ASK.
[0042] Specifically, by analyzing multiple frequency values of the intermediate frequency signal, the remote control copier can draw a waveform according to multiple reference frequency values to determine whether there are two discrete peak points. When two discrete peak points are obtained, it is determined that the working mode of the remote control signal is frequency shift keying. When two discrete peak points are not obtained, it is determined that the working mode of the remote control signal is amplitude frequency keying.
[0043] Step 210: Process the frequency values of the plurality of intermediate frequency signals and the target local oscillator clock frequency value using the frequency determination rule in the working mode to determine the transmission frequency value of the remote control signal.
[0044] The frequency determination rules in the working mode include the frequency determination rules in amplitude frequency keying and the frequency determination rules in frequency shift keying. Different working modes correspond to different frequency determination rules.
[0045] Specifically, when the working mode is amplitude frequency keying, the transmission frequency value of the remote control signal can be determined by averaging the multiple frequency values of the intermediate frequency signal and the corresponding working mode. When the working mode is frequency shift keying, the center frequency value and frequency deviation value of the remote control signal can be determined by the multiple frequency values of the intermediate frequency signal, that is, the transmission frequency value of the remote control signal.
[0046] Step 212, based on the decoding rule corresponding to the working mode, the remote control signal is parsed using the transmission frequency value to copy the remote control instruction corresponding to the remote control signal.
[0047] Specifically, after obtaining the transmission frequency value, the remote control copier sets the local oscillator clock frequency value to the transmission frequency value, and uses the transmission frequency value to demodulate the remote control signal to demodulate a complete digital signal. The digital signal is decoded according to the corresponding decoding rules in the working mode, so that the complete copy of the remote control command corresponding to the remote control function signal can be achieved. The remote control copier stores the copied remote control command in different positions according to different keys, thus completing a complete remote control command copy. When the user presses a key, the remote control copier obtains the remote control command at the corresponding position of the key, and sends the digital signal according to certain coding rules to achieve the remote control function.
[0048] In this embodiment, a remote control signal of a remote control device to be copied is received, different local oscillator clock frequency values are switched, and mixing processing is performed according to the remote control signal and the local oscillator clock frequency value to obtain an intermediate frequency signal. When the intermediate frequency signal is a continuous and stable square wave signal, that is, the transmission frequency of the remote control signal is close to the receiving frequency of the remote control copier; under this condition, the frequency of the obtained intermediate frequency signal will still fluctuate and the working mode of the remote control signal is unknown. Therefore, it is necessary to determine the working mode of the remote control signal according to multiple frequency values of the intermediate frequency signal, and the frequency value of the intermediate frequency signal and the target local oscillator clock frequency value are processed using the frequency determination rule under the working mode to determine the transmission frequency value. The frequency value of the obtained remote control signal is more accurate; and the transmission frequency value is used to parse the remote control signal to copy the remote control instruction corresponding to the remote control signal. A more accurate frequency value is used for signal parsing, so that the parsed signal is more complete, and the remote control copier can still realize the remote control function when the distance is far.
[0049] In one embodiment, a method for detecting a continuous and stable square wave signal includes: detecting multiple cycles of an intermediate frequency signal, determining a cycle mean based on the multiple cycles; and determining that a continuous and stable square wave signal is detected when the error between a preset number of cycles and the cycle mean is within a preset range.
[0050] Among them, the preset number can be set according to demand.
[0051] Specifically, the MCU continuously captures n periods T1, T2, ..., T of the intermediate frequency signal. n If T AVE represents the periodic mean of the intermediate frequency signal, then T AVE =(T1+T2+…+T n ) / n. Take a tolerance coefficient δ and assume that T i T1~T n Any value within, if it always satisfies T i <T AVE(1+δ), that is, the error between the preset number of cycles and the cycle mean is within the preset range, then the current intermediate frequency signal can be considered to be a continuous and stable square wave signal, indicating that a valid f has been detected at this time IF Frequency, i.e. f LO The frequency is already the same as f SN The frequency is close.
[0052] In this embodiment, the cycle mean is determined by multiple cycles of the intermediate frequency signal. When the error between a preset number of cycles and the cycle mean is within a preset range, it is determined that a continuous and stable square wave signal is obtained, indicating that the target local oscillator clock frequency value is close to the transmission frequency value of the remote control signal, and an accurate transmission frequency value is obtained through subsequent processing.
[0053] In one embodiment, determining the operating mode of the remote control signal according to multiple frequency values of the intermediate frequency signal includes:
[0054] Determine multiple frequency means according to multiple frequency values of the intermediate frequency signal;
[0055] When the frequency mean satisfies a preset mode judgment condition, determining that the working mode of the remote control signal is frequency shift keying; the preset mode judgment condition is that the target frequency mean in the frequency mean is the same as the non-adjacent frequency mean and is different from the adjacent frequency mean;
[0056] When the frequency mean value does not meet the preset mode judgment condition, it is determined that the working mode of the remote control signal is amplitude frequency keying.
[0057] The preset mode judgment condition is that the target frequency mean in the frequency mean is the same as the non-adjacent mean and different from the adjacent frequency mean. The spectrum of FSK usually appears as discrete frequency components and has two main peaks corresponding to two different carrier frequencies; therefore, the target frequency mean is actually the maximum frequency, while the adjacent frequency mean is the minimum frequency.
[0058] Specifically, according to the calculation formula of frequency and period f = 1 / T, we can get f IF =(1 / T1+1 / T2+…+1 / T n ) / n. For T1~T n A group of T i , T j , T k , T m , if there exists m>k>j>i, assuming
[0059] f IFi =(1 / T i +1 / T i+1 +…+1 / T j-1 ) / (ji),
[0060] fIFj =(1 / T j +1 / T j+1 +…+1 / T k-1 ) / (kj),
[0061] f IFk =(1 / T k +1 / T k+1 +…+1 / T m-1 ) / (mk).
[0062] When the target frequency mean f is met IFi = non-adjacent frequency mean f IFk , and the target frequency mean f IFi ≠ adjacent frequency mean f IFj When the frequency characteristics of FSK are used, we know that the current f SN The signal may be in FSK working mode, in which case multiple groups of T1~T n , if any group T1~T n In the total satisfying f IFi =f IFk With f IFi ≠f IFj Now we can determine f SN The signal is in FSK working mode, otherwise it is determined that f SN The signal is in ASK working mode.
[0063] In this embodiment, the frequency value of the intermediate frequency signal is obtained multiple times, and the frequency mean is calculated to determine whether the target frequency is the same as the non-adjacent frequency mean and different from the adjacent frequency mean. In this way, the frequency value at the maximum frequency can be obtained, thereby determining the working mode of the remote control signal, and then analyzing to obtain an accurate remote control signal.
[0064] In one embodiment, the frequency determination rule in the working mode is used to process the frequency values of multiple intermediate frequency signals and the target local oscillator clock frequency value to determine the transmission frequency value of the remote control signal, including:
[0065] When the working mode of the remote control signal is frequency shift keying, the center frequency value of the remote control signal is obtained by averaging the target frequency mean and the adjacent frequency mean, and summing them with the target local oscillator clock frequency value;
[0066] The frequency deviation value of the remote control signal is determined according to the difference between the target frequency mean and the adjacent frequency mean.
[0067] Specifically, when the remote control signal is in FSK working mode, due to f SN The signal contains two peak frequency points f max , f min Assume that the above measurement results meet the target frequency mean fIFi >Adjacent frequency mean f IFj , by f max =f LO +f IFi , f min =f LO +f IFj The center frequency point f of the remote control signal can be obtained SN =f LO +(f IFi +f IFj ) / 2, the frequency deviation of the remote control signal is (f IFi -f IFj ) / 2.
[0068] In this embodiment, when the working mode of the remote control signal is frequency shift keying, the center frequency value of the remote control signal is obtained by averaging the target frequency mean and the adjacent frequency mean, and summing them with the target local oscillator clock frequency value. The frequency deviation value of the remote control signal is obtained according to the difference between the target frequency mean and the adjacent frequency mean. Therefore, the center frequency value and the frequency deviation value can be used for analysis according to the decoding method of frequency shift keying to obtain an accurate remote control signal, so that the remote control function can be realized in the case of a long distance.
[0069] In one embodiment, the frequency determination rule in the working mode is used to process the frequency values of multiple intermediate frequency signals and the target local oscillator clock frequency value to determine the transmission frequency value of the remote control signal, including:
[0070] When the working mode of the remote control signal is amplitude frequency keying, the frequency values of multiple intermediate frequency signals are averaged and summed with the target local oscillator clock frequency value to obtain the transmission frequency value of the remote control signal.
[0071] Specifically, when the remote control signal is in the ASK working mode, the transmission frequency value f of the remote control signal can be obtained from the measurement results. SN =f LO +(1 / T1+1 / T2+…+1 / T n ) / n
[0072] In this embodiment, when the working mode of the remote control signal is amplitude frequency keying, the frequency values of multiple intermediate frequency signals are averaged and summed with the target local oscillator clock frequency value to obtain the transmission frequency value of the remote control signal, so as to obtain a more accurate frequency value.
[0073] In one embodiment, due to the existence of chip clock error, the measurement result f SN There will be some error. In this case, a standard spectrum analyzer can be used for measurement and calibration to reduce the measurement error of the MCU (Microcontroller Unit). SNSignal, if the measurement result of the spectrum analyzer is f1, and the measurement result of the MCU is f2, the calibration coefficient d = f1-f2 can be taken and written into the MCU for storage and use.
[0074] Then when the working mode is ASK, the frequency values of multiple intermediate frequency signals are averaged, and the sum of the target local oscillator clock frequency value is calibrated based on the calibration coefficient to obtain the transmission frequency value of the remote control signal. Therefore, the measurement result of the MCU after calibration should be
[0075] f SN =f LO +(1 / T1+1 / T2+…+1 / T n ) / n+d
[0076] When the working mode is FSK, the transmission frequency value of the remote control signal is obtained by averaging the target frequency mean and the adjacent frequency mean, and summing them with the target local oscillator clock frequency value, and calibrating based on the calibration coefficient. The measurement result after MCU calibration should be
[0077] f SN =f LO +(f IFi +f IFj ) / 2+d
[0078] In this embodiment, the transmission frequency value is calibrated by using the calibration coefficient, so that the accuracy of the transmission frequency value can be improved.
[0079] In one embodiment, after the receiving parameters of the wireless ISM transceiver are set, the transceiver will output the demodulated digital signal. At this time, the digital signal can be sampled according to common coding rules to calculate the code rate of the digital signal. Common remote control signal coding rules include NRZ (non-return-to-zero line code) PWM and MAN (Manchester). When the MCU detects remote control signals of different coding types, the code rate is calculated according to the coding rule characteristics of the remote control signal to obtain the most accurate calculation result. After completing the remote control copying, the remote control signal is transmitted according to the precise code rate to achieve the best remote control effect. Therefore, the remote control signal copying method also includes:
[0080] Acquire a reference cycle of the remote control signal; the reference cycle includes a high level and a low level adjacent to the high level;
[0081] Determining the coding type of the remote control signal according to the level state condition satisfied by the reference cycle;
[0082] Using a code rate calculation rule corresponding to the coding type, the code rate of the remote control signal is determined based on a reference period and a corresponding number of code elements;
[0083] The copied remote control signal is sent at the bit rate.
[0084] Among them, since the coding type of the remote control signal is unknown when receiving, the specific period of the remote control signal cannot be known, so a reference period is taken, that is, a connected high level and low level are taken for level state detection. Level state conditions such as the duration of each high level or low level of the non-return-to-zero code are integer multiples of the unit level duration; the high level and low level of the pulse width modulation type meet the preset duty cycle; the high level duration and low level duration of the Manchester coding type meet any of the four preset level durations. Coding types include but are not limited to non-return-to-zero code, pulse width modulation coding, and Manchester coding.
[0085] Specifically, the remote control copier detects a high level and a low level connected to obtain a reference period. According to the level state conditions satisfied by the reference period, the coding type of the remote control signal is determined. For different coding types, due to the different code element durations, the final code rate calculation method is different. The remote control copier adopts the code rate calculation rule corresponding to the coding type, and determines the code rate of the remote control signal based on the reference period and the number of code elements corresponding to the reference period. The remote control copier sends the copied remote control signal at the code rate.
[0086] Optionally, a code rate calculation rule corresponding to the coding type is adopted to determine the code rate of the remote control signal based on multiple reference periods and corresponding numbers of code elements.
[0087] It is understandable that the determination of the coding type and code rate of the remote control signal may be completed before or after copying the remote control instruction corresponding to the remote control signal, which is not limited here.
[0088] In this embodiment, the coding type of the remote control signal is determined by customizing the reference period, and the bit rate calculation rule corresponding to the coding type is adopted. The bit rate of the remote control signal is determined based on the reference period and the corresponding number of code elements, and the copied remote control signal is sent at this bit rate, so that the remote control copier can still realize the remote control function at a long distance.
[0089] In one embodiment, determining the coding type of the remote control signal according to the level state condition satisfied by the reference cycle includes:
[0090] When the plurality of reference cycles all satisfy the duty cycle condition, determining that the encoding type of the remote control signal is pulse width modulation;
[0091] The code rate calculation rule corresponding to the coding type is adopted to determine the code rate of the remote control signal based on the reference period and the corresponding number of code elements, including:
[0092] The code rate of the remote control signal is determined according to the multiple reference cycles and the number of corresponding reference cycles.
[0093] Specifically, PWM (Pulse-Width Modulation) encoding is used. The PWM signal transmits information by adjusting the duration of the high level within a clock cycle. As Figure 3 shown, it is a schematic diagram of PWM encoding in an embodiment. In PWM encoding, a group of different high and low level signals are used to represent the symbol signals "0" or "1". According to the area equivalence rule, within one encoding clock cycle, when transmitting the symbol "1", it is represented by a duty cycle of 75%; when transmitting the symbol "0", it is represented by a duty cycle of 25%. According to the characteristics of the PWM encoding rule, assuming that the MCU samples the high and low level times of a group of symbol signals, represented by H1 and L1 for the high level time and low level time respectively, then the symbol period T1 = H1 + L1. At this time, if H1 > L1, the duty cycle M1 of the symbol "1" = H1 / T1, and the duty cycle N1 of the symbol "0" = L1 / T1; if H1 < L1, the duty cycle M1 of the symbol "1" = L1 / T1, and the duty cycle N1 of the symbol "0" = H1 / T1. Then, the duty cycle condition is that the high level duty cycle satisfies the first duty cycle (such as 75%), or the high level duty cycle satisfies the second duty cycle (such as 25%), or the low level duty cycle satisfies the first duty cycle, or the low level duty cycle satisfies the second duty cycle. According to n reference periods and the corresponding number n of reference periods, the code rate of the remote control signal can be determined.
[0094] For example, assume that the MCU samples the high and low level times H n and L n , from T = H + L, the period times T1, T2,..., T n can be obtained. Then, for any certain T n within T1 to T i , the calculated symbol "1" M i and symbol "0" N i must satisfy M i ≈ M1 or N i ≈ N1, that is, it satisfies the duty cycle. If the tolerance coefficient is taken as δ, then the duty cycle condition M i < M1*(1 + δ) or N i < N1*(1 + δ) is satisfied. Otherwise, it can be determined that the current encoding signal does not belong to PWM encoding. If the current encoding signal belongs to PWM encoding, then the average period T i of the symbol can be calculated according to the previous sampling as T i = (T1 + T2 +... + Tn) / n; assuming that the transmission code rate of the encoded data is B1, then B1 = 1 / T AVE ; AVEAssuming that the code rate of the minimum coding unit is B2, then according to the previously calculated code element "0" duty cycle N1, then B2 = 1 / (T AVE *N1).
[0095] It is understandable that when the remote control signal is an NRZ code or a PWM code, the condition that multiple cycles satisfy the duty cycle condition cannot be met, so it can be determined that the remote control signal is a pulse width modulation signal.
[0096] In this embodiment, when multiple reference cycles all meet the duty cycle conditions, the coding type of the remote control signal is determined to be pulse width modulation, and then the code rate of the remote control signal can be determined based on the reference cycle and the corresponding number, so that the remote control copier can still realize the remote control function at a long distance.
[0097] In one embodiment, determining the coding type of the remote control signal according to the level state condition satisfied by the reference cycle includes:
[0098] When the plurality of reference periods respectively satisfy any one of the preset level durations, determining that the coding type of the remote control signal is Manchester coding;
[0099] The code rate calculation rule corresponding to the coding type is adopted to determine the code rate of the remote control signal based on the reference period and the corresponding number of code elements, including:
[0100] The bit rate of the remote control signal is determined according to a plurality of reference cycles, the number of cycles corresponding to each preset level duration, and the cycle coefficient corresponding to the preset level duration.
[0101] Among them, MAN coding, also known as Manchester coding, is a bi-phase coding method that represents the code element signal "0" or "1" by switching between high and low levels. In MAN coding, each code element is represented by two level signals with different phases, that is, a square wave of one cycle. Figure 4 As shown in FIG. 1 , it is a schematic diagram of a MAN code in an embodiment. When the code element "1" is transmitted, the first half of the clock cycle is high and the second half is low; the opposite is true when the code element "0" is transmitted. According to the characteristics of the MAN coding rule, within a reference cycle, the duration of the high level and the low level is at most twice, so there are only four high and low level states. Assuming that a code element clock cycle is T, then a coding unit high level time H = T / 2, a coding unit low level time L = H. Assuming T A =1*H+1*L, T B =2*H+1*L, T C =2*H+2*L, T D =1*H+2*L, representing 4 high and low level states respectively. When the MCU samples the high and low level time of n groups of signals H1, H2, ..., H n and L1, L 2, …, L n , then for any T i =H i +L i , there must be T i ≈T A , or T i ≈T B , or T i ≈T C , or T i ≈T D . These are the four preset level durations. If the tolerance coefficient is δ, then T i <T A *(1+δ), or T i <T B *(1+δ), or T i <T C *(1+δ), or T i <T D *(1+δ), otherwise it can be determined that the current coding signal does not belong to MAN coding. That is, the reference period satisfies 1 times the high level duration + 1 times the low level duration, or 2 times the high level duration + 1 times the low level duration, or 2 times the high level duration + 2 times the low level duration, or 1 times the high level duration + 2 times the low level duration. It can be understood that within the error range, it also meets the preset level duration. This condition can exclude NRZ signals and PWM signals.
[0102] Specifically, the remote control duplicator takes multiple reference cycles, and when each of the multiple reference cycles satisfies any one of the preset level durations, it is determined that the coding type of the remote control signal is Manchester coding. Taking four preset durations as an example, the number of cycles corresponding to each preset duration is, and the number of cycles corresponding to each preset duration is, i ≈T A The number of cycles n A , satisfying T i ≈T B The number of cycles n B , satisfying T i ≈T C The number of cycles n c , satisfying T i ≈T D The number of cycles n D Since the duration of each preset level is not exactly the same, the number of cycles needs to be multiplied by the cycle coefficient. Then,
[0103] The code rate of the minimum coding unit B2 = 1 / ((T1+T2+…+T n ) / (2n A +3n B +4nC +3n D )), the transmission code rate of the encoded data is B1=B2 / 2.
[0104] In this embodiment, according to the Manchester coding characteristics, the remote control signals using Manchester coding all meet any of the preset level durations. Therefore, the bit rate of the remote control signal can be determined based on multiple reference cycles, the number of cycles corresponding to each preset level duration, and the cycle coefficient corresponding to the preset level duration, so that the remote control copier can still realize the remote control function at a long distance.
[0105] In one embodiment, determining the coding type of the remote control signal according to the level state condition satisfied by the reference cycle further includes:
[0106] In the case where the coding type of the remote control signal is not Manchester coding, when the reference period satisfies an integer multiple of the unit level duration, determining that the coding type of the remote control signal is non-return-to-zero coding;
[0107] The code rate calculation rule corresponding to the coding type is adopted to determine the code rate of the remote control signal based on the reference period and the corresponding number of code elements, and also includes:
[0108] The code rate of the remote control signal is determined according to a plurality of reference periods and integer multiples corresponding to each reference period.
[0109] Specifically, NRZ encoding (Non-Return-to-Zero) is a binary signal encoding method. In NRZ encoding, each bit is converted into a signal level of one time unit, where a high level of one time unit represents a code element signal "1" and a low level of one time unit represents a code element signal "0". During transmission, the signal remains at the corresponding level until the next binary bit needs to be encoded. Figure 5 As shown in FIG. 1 , a schematic diagram of NRZ encoding in an embodiment is shown. According to the characteristics of the NRZ encoding rule, when t represents a unit of signal level time, when the MCU samples the high and low level time H1, H2, ..., H n and L 1, L 2, …, L n , then for H1~H n Any H in i It must be an integer multiple of t Hi , for L1~L n Any L within i It must be an integer multiple of t Li , take the tolerance coefficient δ, assuming δ Hi =(H i -n Hi *t) / t,δ Li=(L i -n Li *t) / t, then δ Hi <δ and δ Li <δ, otherwise it can be determined that the current encoding does not belong to NRZ encoding. Hi Yes H i Divide by t and round up.
[0110] If the current encoding complies with the NRZ encoding rule, the cycle average
[0111] T AVE =((H1+H2+…+H n )+(L1+L1+…+L n )) / ((n H1 +n H2 +…+n Hn )+(n L1 +n L2 +…+n Ln )),but
[0112] The transmission bit rate of the coded data is B1 = 1 / T AVE .
[0113] Optionally, when the coding type of the remote control signal is neither Manchester coding nor pulse width modulation coding, when the reference period satisfies an integer multiple of the unit level duration, it is determined that the coding type of the remote control signal is non-return-to-zero code.
[0114] In this embodiment, the remote control signal is determined to be a non-return-to-zero code based on the coding characteristics of the non-return-to-zero code, that is, the reference period satisfies the integer multiples of the unit level time length, and then the code rate of the remote control signal is determined based on multiple reference periods and the integer multiples corresponding to each reference period, which enables the remote control copier to still realize the remote control function at a long distance.
[0115] In one embodiment, the method adopted by the traditional technical solution is to set the RF chip to OOK modulation mode, and to achieve data replication of the wireless remote control by comparing the signal power size under different frequency working conditions of the RF signal receiving end. This operation method has two technical defects. The first technical defect is that the frequency point measurement is not accurate enough, so the signal integrity from the RF signal receiving end is poor, and the copied remote control may not be usable or the remote control is not sensitive. At the same time, the large frequency error will also lead to a short remote control distance; the second technical defect is that the remote control whose modulation signal type is FSK cannot be copied. The FSK modulation signal is realized by alternating between two different frequency values to send the signal. At this time, the RF chip working under the OOK modulation mode cannot decode a valid digital signal at all, so the remote control data cannot be copied. There are already a large number of remote controls with FSK modulation signal types on the market, which is undoubtedly a technical pain point. Therefore, a method for copying a remote control device in each embodiment of the present application is proposed.
[0116] The hardware system device of the remote control copier in this embodiment includes a wireless ISM (Industrial, Scientific and Medical) transceiver, a key circuit, an MCU (Microcontroller Unit) and an indicator light circuit. The specific workflow is that after the MCU measures the accurate signal frequency value, the wireless ISM transceiver can be set to the accurate receiving signal frequency and demodulate the complete digital signal. The MCU performs coding recognition and code rate calculation on the digital signal given by the wireless ISM transceiver, and can decode it according to the corresponding decoding rules to achieve complete copying of the remote control signal instruction. The MCU stores the copied remote control instructions in different positions according to different keys. When the user presses the corresponding key, the MCU takes out the remote control instruction at the corresponding position and transmits the digital signal according to certain coding rules like the copied remote control, so that the remote control function can be realized.
[0117] 1. Introduction to the principle of wireless ISM transceiver circuit module
[0118] The wireless ISM transceiver mainly includes a front-end receiving link and a digital modem. The analog front-end receiving link includes a connected low noise amplifier (LNA), a mixer (MIXER) and a receiving local oscillator clock, a programmable gain amplifier (VGA) connected to the mixer, and an analog-to-digital converter connected to the programmable gain amplifier. The digital modem includes a connected digital channel filter, a digital demodulator, automatic gain control, automatic frequency control, signal strength indication, and data packet processing.
[0119] When the wireless ISM transceiver is in receiving mode, the received RF modulated signal will be input from the low noise amplifier to the mixer. At this time, the mixer mixes the received RF modulated signal (such as the remote control signal) with the receiving signal frequency value set by the ISM to obtain an intermediate frequency signal. The intermediate frequency signal is sampled to the digital domain by the analog-to-digital converter, and the signal strength of the received signal can be measured by the digital peak detector, which is the RSSI (Received Signal Strength Indication).
[0120] 2. Determine the working mode of the remote control signal
[0121] When the wireless ISM transceiver is in receiving mode, the received RF modulated signal is input from the low noise amplifier (LNA) to a mixer (MIXER). At this time, the mixer (MIXER) converts the received OOK / FSK modulated signal f SN The local oscillator clock frequency f set by ISM LO Mixing is performed when f SN Frequency and f LO When the frequency difference falls within the passband of the intermediate frequency filter, the mixed frequency component will be output from the mixer, thereby obtaining an intermediate frequency signal f output in the form of a square wave with a specific frequency. IF , it can be seen that the intermediate frequency signal frequency f IF =f SN -f LO . Similarly, we can get f SN =f LO +f IF , that is, we need to measure the unknown signal f SN The frequency of the local oscillator clock f LO frequency, so that f SN With f LO The frequency difference between the two frequencies falls within the passband of the IF filter, and can be measured by IF The unknown signal f is obtained in the form of frequency SN frequency.
[0122] Set the ISM local oscillator clock f LO The starting frequency is 250MHz and the cut-off frequency is 960MHz. When measuring the frequency, the MCU will control the f LO Keep increasing in units of 500KHz until f LO When it is greater than or equal to the cut-off frequency, it will be accumulated from the starting frequency to the cut-off frequency again, and this cycle will repeat. During this cycle, the MCU will start the timer to continuously capture the intermediate frequency signal output end of the ISM. At this time, if a remote control is transmitting a signal f SN, when MCU continuously captures n periods of intermediate frequency signals T1, T2, ..., T n If T AVE represents the periodic average value of the intermediate frequency signal, then T AVE =(T1+T2+…+T n ) / n, take a tolerance coefficient δ, assume T i T1~T n Any value within, if it always satisfies T i <T AVE (1+δ), then the current intermediate frequency signal can be considered to be a continuous and stable square wave signal, indicating that an effective f IF Frequency, i.e. f LO The frequency is already the same as f SN The frequency is close to that of the period. Then, according to the frequency and period calculation formula f = 1 / T, we can get f IF =(1 / T1+1 / T2+…+1 / T n ) / n. For T1~T n A group of T i , T j , T k , T m , if there exists m>k>j>i, assuming f IFi =(1 / T i +1 / T i+1 +…+1 / T j-1 ) / (ji),f IFj =(1 / T j +1 / T j+1 +…+1 / T k-1 ) / (kj),f IFk =(1 / T k +1 / T k+1 +…+1 / T m-1 ) / (mk). When f IFi =f IFk With f IFi ≠f IFj When the frequency characteristics of FSK are used, we know that the current f SN The signal may be in FSK working mode, in which case multiple groups of T1~T n , if any group T1~T n In the total satisfying f IFi =f IFk With f IFi ≠f IFj Now we can determine f SN The signal is in FSK working mode, otherwise it is determined that f SN The signal is in the ASK working mode, which may specifically be the OOK working mode.
[0123] 3. Calculation of the transmission frequency value of the remote control signal
[0124] When f SN When the signal is in ASK working mode, the above measurement results show that f SN =f LO +(1 / T1+1 / T2+…+1 / T n ) / n, due to the chip clock error, the measurement result at this time is f SN There will be some error. In this case, a standard spectrum analyzer can be used for measurement and calibration to reduce the measurement error of the MCU. SN If the measurement result of the spectrum analyzer is f1 and the measurement result of the MCU is f2, the calibration coefficient d = f1-f2 can be taken and written into the MCU for storage and use. Then the measurement result of the MCU after calibration should be f SN =f LO +(1 / T1+1 / T2+…+1 / T n ) / n+d.
[0125] When f SN When the signal is in FSK working mode, due to f SN The signal consists of two peak frequency points f max , f min Assuming that the above measurement results satisfy f IFi >f IFj , by f max =f LO +f IFi , f min =f LO +f IFj The FSK center frequency point f can be obtained SN =f LO +(f IFi +f IFj ) / 2,f SN The frequency deviation is (f IFi -f IFj ) / 2. Similarly, after calibrating and measuring the MCU using a standard spectrum analyzer, we can get f SN =f LO +(f IFi +f IFj ) / 2+d.
[0126] 4. Coding type identification and bit rate calculation
[0127] After setting the receiving parameters of the wireless ISM transceiver, the transceiver will output the demodulated digital signal at this time. At this time, the digital signal can be sampled according to common coding rules to calculate the code rate of the digital signal. Common remote control signal coding rules include NRZ, PWM, and MAN. When the MCU detects different coding types of remote control signals and calculates the code rate according to the characteristics of the coding rules of the remote control signal, the most accurate calculation result can be obtained. After completing the remote control replication, only by transmitting the remote control signal at the accurate code rate can the best remote control effect be achieved.
[0128] 4.1 PWM Encoding Signal Recognition and Code Rate Calculation
[0129] PWM (Pulse-Width Modulation) encoding. The PWM signal transmits information by adjusting the duration of the high level within a clock cycle. In PWM encoding, a group of different high and low level signals are used to represent the symbol signal "0" or "1". As shown in the figure, according to the area equivalence rule, within one encoding clock cycle, when transmitting the symbol "1", it is represented by a 75% duty cycle; when transmitting the symbol "0", it is represented by a 25% duty cycle. According to the characteristics of the PWM encoding rule, assuming the MCU samples the high and low level times of a group of symbol signals, represented by H1 and L1 for the high level time and low level time respectively, then the symbol period T1 = H1 + L1. At this time, if H1 > L1, the duty cycle M1 of the symbol "1" = H1 / T1, and the duty cycle N1 of the symbol "0" = L1 / T1; if H1 < L1, the duty cycle M1 of the symbol "1" = L1 / T1, and the duty cycle N1 of the symbol "0" = H1 / T1. Assuming the MCU samples the high and low level times H n and L n , from T = H + L, the period times T1, T2,..., T n can be obtained. Then for any certain T n within T1 to T i for the calculated H i and L i , the calculated duty cycle M i of the symbol "1" and N i of the symbol "0", then there must be M i ≈ M1 or N i ≈ N1. If the tolerance coefficient is taken as δ, then it satisfies M i < M1*(1 + δ) or N i < N1*(1 + δ), otherwise it can be determined that the current encoding signal does not belong to PWM encoding. If the current encoding signal belongs to PWM encoding, then according to the previous sampling, the average period T AVE of the symbol can be calculated = (T1 + T2 +... + Tn) / n; assuming the transmission code rate of the encoded data is B1, then B1 = 1 / TAVE Assuming that the code rate of the minimum coding unit is B2, then according to the previously calculated code element "0" duty cycle N1, then B2 = 1 / (T AVE *N1).
[0130] 4.2 MAN coded signal recognition and code rate calculation
[0131] MAN coding, also known as Manchester coding, is a two-phase coding method that represents the code element signal "0" or "1" by converting the high and low levels. In MAN coding, each code element is represented by two level signals with different phases, that is, a square wave of one cycle. As shown in the figure above, when the code element "1" is transmitted, the first half of the clock cycle is high and the second half is low; the opposite is true when the code element "0" is transmitted. According to the characteristics of the MAN coding rule, there are 4 high and low level states. Assuming that a code element clock cycle is T, the high level time of a coding unit H = T / 2, and the low level time of a coding unit L = H. Assuming HAT A =1*H+1*L, T B =2*H+1*L, T C =2*H+2*L, T C =1*H+2*L, representing 4 high and low level states respectively. When the MCU samples the high and low level time of n groups of signals H1, H2, ..., H n and L 1, L 2, …, L n , then for any T i =H i +L i , there must be T i ≈T A , or T i ≈T B , or T i ≈T C , or T i ≈T D , if the tolerance coefficient is δ, then T i <T A *(1+δ), or T i <T B *(1+δ), or T i <T C *(1+δ), or T i <T D *(1+δ), otherwise it can be determined that the current coded signal does not belong to MAN coding. If the current coded signal belongs to MAN coding, T i ≈T A The number n A , T i ≈TB The number n B , T i ≈T C The number n c , T i ≈T D The number n D , the code rate of the minimum coding unit B2 = 1 / ((T1+T2+…+T n ) / (n A +n B +n C +n D )), the transmission code rate of the encoded data is B1=B2 / 2.
[0132] 4.3NRZ coded signal recognition and code rate calculation
[0133] NRZ encoding (Non-Return-to-Zero) is a binary signal encoding method. In NRZ encoding, each bit is converted into a signal level of one time unit, where a high level of one time unit represents a code element signal "1" and a low level of one time unit represents a code element signal "0". During transmission, the signal remains at the corresponding level until the next binary bit needs to be encoded. According to the characteristics of the NRZ encoding rule, when t represents a unit of signal level time, when the MCU samples the high and low level time H1, H2, ..., H of n groups of signals, n and L 1, L 2, …, L n , then for H1~H n Any H in i It must be an integer multiple of t Hi , for L1~L n Any L within i It must be an integer multiple of t Li , take the tolerance coefficient δ, assuming δ Hi =(H n -n Hi *t) / t,δ Li =(L n -n Li *t) / t, then δ Hi <δ and δ Li <δ, otherwise it can be determined that the current code does not belong to NRZ code. If the current code conforms to the NRZ code rule, the average value T AVE =((H1+H2+…+H n )+(L1+L1+…+L n )) / ((δ H1 +δ H2 +…+δ Hn)+(δ L1 +δ L2 +…+δ Ln )), then the transmission bit rate of the coded data is B1 = 1 / T AVE .
[0134] It is understandable that the MCU first detects whether the remote control signal is a MAN code, and then detects whether it is an NRZ code.
[0135] In this embodiment, when the MCU detects remote control signals of different coding types, the bit rate is calculated according to the coding rule characteristics of the remote control signal to obtain the most accurate calculation result; after completing the remote control copying, only by transmitting the remote control signal according to the accurate bit rate can the best remote control effect be achieved.
[0136] In one embodiment, a remote control signal duplication method includes:
[0137] Step (a1), receiving a remote control signal of a remote control device to be copied.
[0138] Step (a2), switching different local oscillator clock frequency values, for each local oscillator clock frequency value, mixing processing is performed according to the received remote control signal and each local oscillator clock frequency value to obtain an intermediate frequency signal.
[0139] Step (a3), detecting multiple cycles of the intermediate frequency signal, and determining a cycle mean value based on the multiple cycles.
[0140] Step (a4), when the error between the preset number of cycles and the cycle mean is within a preset range, it is determined that a continuous and stable square wave signal is obtained.
[0141] In step (a5), when the intermediate frequency signal is a continuous and stable square wave signal, a corresponding target local oscillator clock frequency value is obtained, and frequency values of the intermediate frequency signal are obtained multiple times.
[0142] Step (a6), determining multiple frequency means according to multiple frequency values of the intermediate frequency signal.
[0143] Step (a7), when the frequency mean meets the preset mode judgment condition, determine that the working mode of the remote control signal is frequency shift keying; the preset mode judgment condition is that the target frequency mean in the frequency mean is the same as the non-adjacent frequency mean and different from the adjacent frequency mean.
[0144] Step (a8), when the frequency mean value does not meet the preset mode judgment condition, determine that the working mode of the remote control signal is amplitude frequency keying.
[0145] Step (a9), when the working mode of the remote control signal is frequency shift keying, the center frequency value of the remote control signal is obtained by averaging the target frequency mean and the adjacent frequency mean, and summing them with the target local oscillator clock frequency value.
[0146] Step (a10), determining the frequency deviation value of the remote control signal according to the difference between the target frequency mean and the adjacent frequency mean.
[0147] Step (a11), when the working mode of the remote control signal is amplitude frequency keying, the frequency values of multiple intermediate frequency signals are averaged and summed with the target local oscillator clock frequency value to obtain the transmission frequency value of the remote control signal.
[0148] Step (a12), based on the decoding rule corresponding to the working mode, the remote control signal is parsed using the transmission frequency value to copy the remote control instruction corresponding to the remote control signal.
[0149] Step (a13), obtaining a reference cycle of the remote control signal. The reference cycle includes a high level and a low level adjacent to the high level.
[0150] Step (a14), when multiple reference cycles all meet the duty cycle condition, determine that the coding type of the remote control signal is pulse width modulation.
[0151] Step (a15), determining the code rate of the pulse width modulated remote control signal according to the multiple reference cycles and the corresponding number of reference cycles.
[0152] Step (a16), when a plurality of reference periods respectively satisfy any one of the preset level durations, determining that the coding type of the remote control signal is Manchester coding.
[0153] Step (a17), determining the bit rate of the Manchester-coded remote control signal according to a plurality of reference periods, the number of periods corresponding to each preset level duration, and the period coefficient corresponding to the preset level duration.
[0154] Step (a18), when the coding type of the remote control signal is not Manchester coding, when the reference period satisfies an integer multiple of the unit level duration, determining that the coding type of the remote control signal is non-return-to-zero coding.
[0155] Step (a19), determining the code rate of the remote control signal of the non-return-to-zero code according to multiple reference periods and the integer multiples corresponding to each reference period.
[0156] Step (a20), sending the copied remote control signal at a bit rate.
[0157] In this embodiment, a remote control signal of a remote control device to be copied is received, different local oscillator clock frequency values are switched, and mixing processing is performed according to the remote control signal and the local oscillator clock frequency value to obtain an intermediate frequency signal. When the intermediate frequency signal is a continuous and stable square wave signal, that is, the transmission frequency of the remote control signal is close to the receiving frequency of the remote control copier; under this condition, the frequency of the intermediate frequency signal obtained will still fluctuate and the working mode of the remote control signal is unknown, so it is necessary to determine the working mode of the remote control signal according to multiple frequency values of the intermediate frequency signal, and the frequency value of the intermediate frequency signal and the target local oscillator clock frequency value are processed according to the frequency determination rule under the working mode to determine the transmission frequency value, and the frequency value of the remote control signal obtained is more accurate; and the transmission frequency value is used to analyze the remote control signal to copy the remote control instruction corresponding to the remote control signal, and a more accurate frequency value is used for signal analysis, so that the analyzed signal is more complete, and the remote control copier can still realize the remote control function in the case of a long distance; and remote control signals of different coding types are detected, and the code rate is calculated according to the coding rule characteristics of the remote control signal, and the most accurate calculation result can be obtained. After completing the remote control copying, the remote control signal is transmitted according to the accurate code rate, which can achieve the best remote control effect.
[0158] It should be understood that although the above Figure 2 In the flowchart, each step is shown in sequence according to the arrows, and each step from step (a1) to step (a20) is shown in sequence according to the numbers, but these steps are not necessarily performed in the order indicated by the arrows or numbers. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be performed in other orders. Moreover, Figure 2 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0159] In one embodiment, a remote control copier is provided, and the remote control copier is used to implement the steps of the above method embodiments.
[0160] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method embodiments are implemented.
[0161] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
[0162] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes in the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0163] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A remote control signal duplication method, characterized in that: The method comprises: receiving a remote control signal from a remote control device to be copied; Switching to different local oscillator clock frequency values, for each local oscillator clock frequency value, performing mixing processing according to the received remote control signal and each local oscillator clock frequency value to obtain an intermediate frequency signal; When the intermediate frequency signal is a continuous and stable square wave signal, obtaining a corresponding target local oscillator clock frequency value, and obtaining frequency values of the intermediate frequency signal multiple times; Determining the operating mode of the remote control signal according to multiple frequency values of the intermediate frequency signal; Processing the frequency values of the plurality of intermediate frequency signals and the target local oscillator clock frequency value using the frequency determination rule in the working mode to determine the transmission frequency value of the remote control signal; Based on the decoding rule corresponding to the working mode, the remote control signal is parsed using the transmission frequency value to copy the remote control instruction corresponding to the remote control signal.
2. The method according to claim 1, characterized in that The method for detecting the continuous and stable square wave signal comprises: Detecting multiple cycles of the intermediate frequency signal, and determining a cycle mean value according to the multiple cycles; When the errors between a preset number of the cycles and the cycle mean are within a preset range, it is determined that the continuous and stable square wave signal is detected.
3. The method according to claim 1, characterized in that Determining the working mode of the remote control signal according to the multiple frequency values of the intermediate frequency signal includes: Determine multiple frequency means according to multiple frequency values of the intermediate frequency signal; When the frequency mean satisfies a preset mode judgment condition, determining that the operating mode of the remote control signal is frequency shift keying; the preset mode judgment condition is that the target frequency mean in the frequency mean is the same as the non-adjacent frequency mean and is different from the adjacent frequency mean; When the frequency mean value does not satisfy the preset mode judgment condition, it is determined that the working mode of the remote control signal is amplitude frequency keying.
4. The method according to claim 3, characterized in that The adopting the frequency determination rule in the working mode to process the frequency values of the multiple intermediate frequency signals and the target local oscillator clock frequency value to determine the transmission frequency value of the remote control signal includes: When the working mode of the remote control signal is the frequency shift keying, the center frequency value of the remote control signal is obtained by averaging the target frequency mean value and the adjacent frequency mean value and summing the average value with the target local oscillator clock frequency value; The frequency deviation value of the remote control signal is determined according to the difference between the target frequency mean and the adjacent frequency mean.
5. The method according to claim 1, characterized in that The adopting the frequency determination rule in the working mode to process the frequency values of the multiple intermediate frequency signals and the target local oscillator clock frequency value to determine the transmission frequency value of the remote control signal includes: When the working mode of the remote control signal is amplitude frequency keying, the frequency values of the multiple intermediate frequency signals are averaged and summed with the target local oscillator clock frequency value to obtain the transmission frequency value of the remote control signal.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Acquire a reference cycle of the remote control signal; the reference cycle includes a high level and a low level adjacent to the high level; Determining the coding type of the remote control signal according to the level state condition satisfied by the reference period; Using a code rate calculation rule corresponding to the coding type, determining a code rate of the remote control signal based on the reference period and the corresponding number of code elements; The copied remote control signal is transmitted at the bit rate.
7. The method according to claim 6, characterized in that The step of determining the coding type of the remote control signal according to the level state condition satisfied by the reference cycle includes: When the plurality of reference cycles all satisfy the duty cycle condition, determining that the encoding type of the remote control signal is pulse width modulation; The adopting the code rate calculation rule corresponding to the coding type to determine the code rate of the remote control signal based on the reference period and the corresponding number of code elements includes: The code rate of the remote control signal is determined according to the multiple reference cycles and the number of corresponding reference cycles.
8. The method according to claim 6, characterized in that The step of determining the coding type of the remote control signal according to the level state condition satisfied by the reference cycle includes: When the plurality of reference periods respectively satisfy any one of the preset level durations, determining that the coding type of the remote control signal is Manchester coding; The adopting the code rate calculation rule corresponding to the coding type to determine the code rate of the remote control signal based on the reference period and the corresponding number of code elements includes: The bit rate of the remote control signal is determined according to the plurality of reference periods, the number of periods corresponding to the preset level durations, and the period coefficient corresponding to the preset level durations.
9. The method according to claim 8, characterized in that The step of determining the coding type of the remote control signal according to the level state condition satisfied by the reference cycle further includes: In the case that the coding type of the remote control signal is not the Manchester coding, when the reference period satisfies an integer multiple of the unit level duration, determining that the coding type of the remote control signal is a non-return-to-zero code; The method of using a code rate calculation rule corresponding to the coding type to determine the code rate of the remote control signal based on the reference period and the corresponding number of code elements further includes: The code rate of the remote control signal is determined according to the multiple reference periods and the integer multiples corresponding to each reference period.
10. A remote control duplicator, characterized in that: The remote control duplicator is used to implement the steps of the method according to any one of claims 1 to 9.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Signal tracking demodulation device and method
CN113132282A
Signal blind demodulation analysis method, chip, remote control equipment and storage medium
CN116915560A
Communication signal standard identification system
CN204928888U
Demodulation circuit for fsk modulation signal and receiver provided with the circuit
JP1999234352A
Apparatus for monitoring radio wave
JP2003262670A