CN110309093B - Data transmission circuit and method - Google Patents

Data transmission circuit and method Download PDF

Info

Publication number
CN110309093B
CN110309093B CN201910522500.4A CN201910522500A CN110309093B CN 110309093 B CN110309093 B CN 110309093B CN 201910522500 A CN201910522500 A CN 201910522500A CN 110309093 B CN110309093 B CN 110309093B
Authority
CN
China
Prior art keywords
data
circuit
rectangular wave
gear
resistor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910522500.4A
Other languages
Chinese (zh)
Other versions
CN110309093A (en
Inventor
秦坤明
黄陈
李书锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Heertai Small Appliances Intelligent Technology Co ltd
Original Assignee
Shenzhen Heertai Small Appliances Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Heertai Small Appliances Intelligent Technology Co ltd filed Critical Shenzhen Heertai Small Appliances Intelligent Technology Co ltd
Priority to CN201910522500.4A priority Critical patent/CN110309093B/en
Publication of CN110309093A publication Critical patent/CN110309093A/en
Application granted granted Critical
Publication of CN110309093B publication Critical patent/CN110309093B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P29/00Arrangements for regulating or controlling electric motors, appropriate for both AC and DC motors
    • H02P29/20Arrangements for regulating or controlling electric motors, appropriate for both AC and DC motors for controlling one motor used for different sequential operations
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K19/00Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits
    • H03K19/0175Coupling arrangements; Interface arrangements
    • H03K19/017545Coupling arrangements; Impedance matching circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Transmitters (AREA)
  • Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)

Abstract

The embodiment of the application discloses a data transmission circuit and a method, wherein the data transmission circuit comprises a data sending circuit and a data receiving circuit, wherein: the data transmitting circuit is coupled with the data receiving circuit; the data sending circuit is used for determining a target rectangular wave parameter corresponding to target data according to the corresponding relation between the data and the rectangular wave parameter under the condition of receiving a data sending instruction, and sending a rectangular wave matched with the target rectangular wave parameter to the data receiving circuit, wherein the data sending instruction comprises the target data; and the data receiving circuit is used for receiving the rectangular wave, determining the target rectangular wave parameter according to the rectangular wave, and determining the target data according to the corresponding relation between the data and the rectangular wave parameter. The data transmitting circuit can transmit data to the data receiving circuit in a rectangular wave mode, so that the circuit structure is simplified, and the stability and reliability of the whole device are improved.

Description

Data transmission circuit and method
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data transmission circuit and a data transmission method.
Background
With the improvement of the daily life level of people, household appliances such as dust collectors, electric fans and electric hair dryers become necessities in the life of people, and at present, the adjustment of gears in the household appliances through keys or knobs is mostly realized by transmitting transmitted gear information to a circuit controlled by the motor through a circuit controlled by the keys.
In the specific circuit, the two circuits realize single-wire communication in an optical coupling isolation mode, namely, a light emitter and a photosensitive element are respectively added in the two circuits to achieve the purpose of data transmission, so that the circuit is more complex, and the reliability of the circuit is reduced.
Disclosure of Invention
The embodiment of the application provides a data transmission circuit and a data transmission method, which can simplify a circuit structure and improve the stability and reliability of the whole circuit.
In a first aspect, an embodiment of the present application provides a data transmission circuit, where the data transmission circuit includes a data sending circuit and a data receiving circuit, where:
the data transmitting circuit is coupled with the data receiving circuit;
the data sending circuit is used for determining a target rectangular wave parameter corresponding to target data according to the corresponding relation between the data and the rectangular wave parameter under the condition of receiving a data sending instruction, and sending a rectangular wave matched with the target rectangular wave parameter to the data receiving circuit, wherein the data sending instruction comprises the target data;
and the data receiving circuit is used for receiving the rectangular wave, determining the target rectangular wave parameter according to the rectangular wave, and determining the target data according to the corresponding relation between the data and the rectangular wave parameter.
In a possible implementation manner, the data sending circuit includes a first power supply circuit, a first switching tube, a first microprocessor, a first diode, a first resistor, a second resistor, a third resistor, a fourth resistor, and a fifth resistor, where:
the first power supply circuit is coupled to an input power supply, a first end of the first switch tube is coupled to the first power supply circuit through the first resistor, a control end of the first switch tube is coupled to the first power supply circuit through the second resistor, a second end of the first switch tube is coupled to an anode of the first diode, a first pin of the first microprocessor is coupled to an input end of the data transmission circuit through a fourth resistor, the control end of the first switch tube is coupled to a second pin of the first microprocessor through the third resistor, the third pin of the first microprocessor is grounded, the fourth pin of the first microprocessor is coupled to the first power supply circuit, and a cathode of the first diode is coupled to the data receiving circuit through the fifth resistor;
the first power supply circuit is used for converting alternating current into first direct current so as to respectively supply power to the first switching tube, the first diode and the first microprocessor;
and the first microprocessor is used for determining a target rectangular wave parameter corresponding to target data according to the corresponding relation between the data and the rectangular wave parameter under the condition of receiving the data sending instruction, and controlling the on-off of the first switch tube according to the target rectangular wave parameter so as to send the rectangular wave matched with the target rectangular wave parameter to the data receiving circuit.
In one possible implementation, the data transmission circuit further includes a first capacitor, where:
and the fourth pin of the first microprocessor is grounded through the first capacitor.
In a possible implementation manner, the data receiving circuit includes a second power supply circuit, a sixth resistor, a seventh resistor, an eighth resistor, a ninth resistor, a second diode, a second switching tube, a second capacitor, and a second microprocessor, wherein:
the second power supply circuit is coupled to the input power supply, the control terminal of the second switching tube is coupled to a ground terminal through the ninth resistor, the control terminal of the second switching tube is coupled to the cathode of the second diode, the control terminal of the second switching tube is coupled to the data transmission circuit through the sixth resistor, the first terminal of the second switching tube is coupled to the second power supply circuit through the seventh resistor, the first terminal of the second switching tube is coupled to the first pin of the second microprocessor through the eighth resistor, the second pin of the second microprocessor is grounded through the second capacitor, the second terminal of the second switching tube is grounded, the second terminal of the second switching tube is coupled to the anode of the second diode, and the third pin of the first microprocessor is coupled to the second power supply circuit;
the second power supply circuit is used for converting the alternating current into a second direct current so as to respectively supply power to the second switching tube and the second microprocessor;
and the second microprocessor is used for determining the target rectangular wave parameters according to the received rectangular waves and determining the target data according to the corresponding relation between the data and the rectangular wave parameters.
In one possible implementation, the data receiving circuit further includes a third capacitor, where:
and a third pin of the second microprocessor is coupled with the second power supply circuit through the third capacitor.
In a second aspect, an embodiment of the present application provides a data transmission method, which is applied to any one of the data transmission circuits in the first aspect, and includes:
under the condition that the data sending circuit receives a data sending instruction, determining a target rectangular wave parameter corresponding to target data according to the corresponding relation between the data and the rectangular wave parameter, and sending a rectangular wave matched with the target rectangular wave parameter to the data receiving circuit;
and the data receiving circuit receives the rectangular wave, determines the target rectangular wave parameter according to the rectangular wave, and determines the target data according to the corresponding relation between the data and the rectangular wave parameter.
In one possible implementation, the method further includes:
and the data receiving circuit is used for filtering the target data and taking the filtered target data as received data.
In one possible implementation manner, the sending, to the data receiving circuit, the rectangular wave matched with the target rectangular wave parameter includes:
the data transmission circuit starts a first timer in the data transmission circuit under the condition of detecting the interruption triggered by the rectangular wave edge;
and sending the rectangular wave matched with the target rectangular wave parameter under the condition that the first timer reaches the timing time to trigger the interruption.
In one possible implementation, the determining the target rectangular wave parameter according to the rectangular wave includes:
the data receiving circuit starts a second timer in the data receiving circuit under the condition of detecting the interruption triggered by the rectangular wave edge;
and under the condition that the data receiving circuit detects the interruption triggered by the rectangular wave edge again, closing the second timer, and determining the target rectangular wave parameter according to the timing time of the second timer.
In the embodiment of the application, the data sending circuit can be coupled with the data receiving circuit, the data sending circuit determines the target rectangular wave parameters corresponding to the target data, and sends the rectangular waves matched with the target rectangular wave parameters to the data receiving circuit to realize unidirectional data transmission.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a data transmission circuit according to an embodiment of the present application;
FIG. 2 is a circuit diagram of another data transmission circuit provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a waveform conversion provided by an embodiment of the present application;
fig. 4 is a schematic flow chart of a data transmission method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, system, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Referring to fig. 1, fig. 1 is a schematic diagram of a data transmission circuit according to an embodiment of the present application, the data transmission circuit including: a data transmission circuit 10 and a data reception circuit 20, wherein:
the data transmitting circuit 10 is coupled to the data receiving circuit 20;
the data transmission circuit 10 is configured to determine a target rectangular wave parameter corresponding to target data according to a correspondence between data and a rectangular wave parameter when receiving a data transmission instruction, and transmit a rectangular wave matching the target rectangular wave parameter to the data reception circuit, where the data transmission instruction includes the target data.
The data receiving circuit 20 is configured to receive the rectangular wave, determine the target rectangular wave parameter from the rectangular wave, and determine the target data from a correspondence between the data and the rectangular wave parameter.
The data sending circuit and the data receiving circuit are both externally connected with an input power supply, the input power supply is alternating current with fixed voltage and fixed frequency, the input voltage value can be 220-volt 50-hertz alternating current or 110-volt 50-hertz alternating current, and the application is not limited.
The data sending circuit can send data with any fixed numerical value to the data receiving circuit, and the data sending circuit determines a target rectangular wave parameter corresponding to target data according to the corresponding relation between the data and the rectangular wave parameter. Specifically, the rectangular wave parameter may be pulse width information of a high level or a low level in the rectangular wave, or may be a duty ratio of the rectangular wave. After the data transmitting circuit determines the target rectangular wave parameters corresponding to the target data, the rectangular wave matched with the target rectangular wave parameters is transmitted to the data receiving circuit.
In the embodiment of the application, the data sending circuit can be coupled with the data receiving circuit, the data sending circuit determines the target rectangular wave parameters corresponding to the target data, and sends the rectangular waves matched with the target rectangular wave parameters to the data receiving circuit to realize unidirectional data transmission.
Referring to fig. 2, fig. 1 is a schematic diagram of a data transmission circuit according to an embodiment of the present disclosure. The data transmission circuit includes: a data transmission circuit 100 and a data reception circuit 200, wherein:
the data transmission circuit comprises a first power supply circuit 101, a first switching tube Q1, a first microprocessor MCU1, a first diode D1, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4 and a fifth resistor R5, wherein:
the first power supply circuit 101 is coupled to an input power source, a first terminal of the first switch transistor Q1 is coupled to the first power supply circuit 101 through the first resistor, the control terminal of the first switch Q1 is coupled to the first power supply circuit 101 through the second resistor R2, a second terminal of the first switch Q1 is coupled to the positive terminal of the first diode D1, a first pin of the first microprocessor MCU1 is coupled to an input terminal of the data transmission circuit 100 through a fourth resistor R4, the control terminal of the first switch Q2 is coupled to the second pin of the first MCU1 through the third resistor R3, the third pin of the first MCU1 is grounded, the fourth pin of the first MCU1 is coupled to the first power circuit 101, the cathode of the first diode D1 is coupled to the data receiving circuit 200 through the fifth resistor R5;
the first power supply circuit 101 is configured to convert an ac power into a first dc power to supply power to the first switch Q1, the first diode D1 and the first MCU1 respectively;
the first microprocessor MCU1 is configured to determine a target rectangular wave parameter corresponding to target data according to a corresponding relationship between the data and the rectangular wave parameter when receiving the data transmission command, and control on/off of the first switch tube Q1 according to the target rectangular wave parameter, so as to transmit a rectangular wave matching the target rectangular wave parameter to the data receiving circuit 200.
The above-mentioned data transmission circuit 100 further includes a first capacitor C1, wherein:
the fourth pin of the first microprocessor MCU1 is grounded via the first capacitor C1.
The data receiving circuit 200 includes a second power supply circuit 201, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8, a ninth resistor R9, a second diode D2, a second switch tube Q2, a second capacitor C2, and a second microprocessor MCU2, wherein:
the second power supply circuit 201 is coupled to the input power source, the control terminal of the second switch transistor Q2 is coupled to ground through the ninth resistor R9, the control terminal of the second switch Q2 is coupled to the cathode of the second diode D2, the control terminal of the second switch Q2 is coupled to the data transmission circuit 100 through the sixth resistor R6, a first terminal of the second switch Q2 is coupled to the second power supply circuit 201 through the seventh resistor R7, a first end of the second switch Q2 is coupled to the first pin of the second MCU2 through the eighth resistor R8, the second pin of the second MCU2 is grounded via the second capacitor C2, the second terminal of the second switch Q2 is grounded, a second terminal of the second switch Q2 is coupled to the anode of the second diode D2, and a third pin of the first MCU2 is coupled to the second power circuit 201;
the second power supply circuit 201 is configured to convert the ac power into a second dc power to supply power to the second switching transistor Q2 and the second microprocessor MCU2, respectively;
the second microprocessor MCU2 is configured to determine the target rectangular wave parameter according to the received rectangular wave, and determine the target data according to the corresponding relationship between the data and the rectangular wave parameter.
The above-mentioned data receiving circuit 200 further includes a third capacitor C3, wherein:
the third pin of the second MCU2 is coupled to the second power circuit 201 through the third capacitor C3.
The first power supply circuit 101 in the data transmission circuit 100 is externally connected with an input power source, where the input power source is an alternating current with a fixed voltage and a fixed frequency, and the input voltage value may be an alternating current with a voltage of 220 volts and a frequency of 50 hertz, or an alternating current with a voltage of 110 volts and a frequency of 50 hertz, which is not limited in this application. The first switching transistor Q1 may be a transistor, or may be a metal, oxide, or semiconductor field effect transistor (MOS transistor), and the present application is not limited thereto. The first microprocessor may be any type of microprocessor, wherein the first pin of the first microprocessor needs to have a function of zero-crossing detection, and the zero-crossing detection refers to detection performed when a waveform passes through a zero position when the waveform is converted from a positive half cycle to a negative half cycle in an alternating current system. The capacitance of the first capacitor C1 may be 100 microfarads, or may be a capacitor with other capacitance, which is used for filtering, but not limited thereto.
In a possible implementation manner, when receiving a data transmission instruction, the data transmission circuit 100 determines a target rectangular wave parameter corresponding to target data according to a corresponding relationship between the data and the rectangular wave parameter, where the target data is to-be-transmitted data, and may be pre-stored in the first microprocessor MCU1 or received by the first microprocessor MCU 1. The rectangular wave parameter may be a pulse width of a high level or a low level in the rectangular wave, or may be a duty ratio of the rectangular wave. The present document explains the example of using the rectangular wave parameter as the rectangular wave low-level pulse width to convert the target data into the time length, where the conversion relationship may be that when the target data is 1, the time length is 1 millisecond (ms). The first microprocessor MCU1 calculates a time length of a difference between a time length corresponding to a low level width and the converted time length, and stores the calculated time length in a first timer in the first microprocessor, for example, the time length corresponding to the low level width of the initial waveform is 2ms, and the time length corresponding to the target data is 1.5ms, and then the calculated time length stored in the first timer is 0.5 ms.
When the first pin of the first microprocessor MCU1 detects an external interrupt, that is, when the first pin detects a zero-crossing signal; the external interrupt may be a falling edge interrupt or a rising edge interrupt, which is not limited herein. The first timer of the first microprocessor MCU1 is started, which is a delay function, i.e., it is enabled to delay the timer and generate an interrupt when it reaches the timed time.
When the delay timer generates an interrupt, then the second pin of the first microprocessor MCU1 is low and the delay timer is turned off. At this time, since the second pin is set low, the voltage of the emitter of the illustrated PNP transistor is greater than the voltage of the base, so that the first switching tube is turned on, and the time length of the first switching tube being turned on is used to control the width of the output pulse wave level. The width of the level may be a width of a high level or a width of a low level.
Further, after the target rectangular wave parameter corresponding to the target data is determined, the data receiving circuit 200 transmits a rectangular wave matching the target rectangular wave parameter, that is, the converted rectangular wave to the data receiving circuit 200. In an example, when the handle or the knob of the household appliance such as a vacuum cleaner, a blower, an electric fan, etc. controls the adjustment of the gear, taking the vacuum cleaner as an example, when the mop motor needs to run at a low speed, the circuit on the handle is a data transmitting circuit, the circuit on the mop motor is a data receiving circuit, and the data transmitting circuit receives a gear modulation command input by a user, wherein the gear modulation command carries a gear identifier, such as 1 gear and 2 gear. If the phase modulation is 1 gear, the gear information corresponding to the gear identifier is obtained from the preset stored gear information, and if the phase modulation is 1 gear, the gear corresponding to 1 gear may be the motor rotation speed, or may be time data corresponding to the motor rotation speed, which is not limited herein. And when the first timer generates interruption, the second pin of the first microprocessor is set to be low, so that the first switching tube is conducted and the first timer is closed. When the pin with the zero-crossing detection function of the first microprocessor detects the external interrupt again, namely the time between two times of external interrupt detection is the time period of half waveform in the rectangular wave, the second pin of the first microprocessor is set to be low, and the first switch tube is cut off. Referring to fig. 3, after the conversion is completed, a rectangular wave matched with a target rectangular wave parameter is obtained, and the rectangular wave is sent to a data receiving circuit.
The second power supply circuit 201 in the data receiving circuit 200 is externally connected to an input power source, where the input power source is an alternating current with a fixed voltage and a fixed frequency, and the input voltage value may be an alternating current with a voltage of 220 volts and a frequency of 50 hertz, or an alternating current with a voltage of 110 volts and a frequency of 50 hertz, which is not limited in the present application. The second switching tube may be a triode or a metal, oxide, or semiconductor field effect transistor (MOS), which is not limited in the present application, and for convenience of description, the present application takes an NPN triode as an example for description, and the second microprocessor MCU2 may be a microprocessor of any type, where the first pin of the second microprocessor MCU2 has a function of zero-crossing detection, and the zero-crossing detection refers to detection performed when a waveform passes through a zero position when the waveform is converted from a positive half cycle to a negative half cycle in an ac system. The capacitance of the third capacitor may be 100 microfarads, or may be a capacitor with other capacitance, which is not limited herein, and is also used for filtering.
In one possible implementation, when the second pin of the second microprocessor MCU2 detects an external interrupt, which may be a falling edge interrupt or a rising edge interrupt, a second timer in the second microprocessor MCU2 is started, and when an edge interrupt is detected again, the timer is turned off. It can be understood that the length of time between two interrupts is the width of the level transmitted by the data transmission circuit 100, and may be the width of a high level or the width of a low level, which is an embodiment of the target rectangular wave parameter. After the data transmission circuit 100 receives the square wave, the second microprocessor MCU2 may determine the target data according to the corresponding relationship between the data and the square wave parameter.
Wherein the width information of the levels is stored in a register of a second timer of the second microprocessor MCU 2. If the second pin of the first microprocessor MCU1 is a data port with a low pin followed by a high pin, the data received by the data receiving circuit 200 is low-level wide. After obtaining the width information, the second microprocessor MCU2 reads the width information from the second timer in the second microprocessor MCU2, that is, the target data sent by the data sending circuit 100.
Further, in order to make the received data more accurate, the target data may be filtered to obtain more accurate data as the received target data. The filtering method may be averaging after receiving data for multiple times, and the filtering mode is not limited here.
In an example, after a data sending circuit corresponding to a handle of a household appliance such as a dust collector or a hair dryer sends a gear shift modulation command, gear information included in the gear shift modulation command is target data, a data receiving circuit corresponding to a motor receives a rectangular wave of the data sending circuit, obtains width information in the rectangular wave, compares the width information with stored gear information according to the width information, for example, if the received data is 0.5 second, compares 0.5 second with 0.4 second of data of 1 gear, 0.8 second of data of 2 gear and 1.2 second of data of 3 gear stored in a second microprocessor, and if the closest data is 0.4 second, sends an adjustment command to the motor, and the gear shift is changed into 1 gear. Wherein the modulation command comprises 0.4 seconds of data. Wherein the obtained target data may be filtered before comparing the width information with the stored gear information to obtain more accurate target data.
In the embodiment of the application, the data sending circuit can be coupled with the data receiving circuit, the data sending circuit determines the target rectangular wave parameters corresponding to the target data, and sends the rectangular waves matched with the target rectangular wave parameters to the data receiving circuit to realize unidirectional data transmission.
Referring to fig. 3, fig. 3 is a schematic diagram of a waveform conversion according to the present application. As shown in fig. 3, wherein:
a first pin of a first microprocessor of the data receiving circuit is coupled to an external power supply to provide an initial rectangular wave for the circuit, such as the above initial waveform shown in fig. 3, where fig. 3 is merely an example, and the initial rectangular wave may be a waveform with a 50% duty cycle or a waveform with another duty cycle. The high-level width or the low-level width of each waveform in the initial waveform is the initial width information, and the target rectangular wave parameter is explained herein by taking the width of the low level as an example. Acquiring target data at a data transmission circuit and storing target rectangular wave parameters corresponding to the target data into data for transmissionThe output waveform after the internal interrupt after the first timer of the first microprocessor is generated is shown in fig. 3, where t is the timing time of the first timer, i.e. the time delay, t1Is the pulse width of the initial waveform, t2The converted pulse width is the square wave that the data receiving circuit can receive as the converted square wave. It is to be understood that fig. 3 only shows that the target rectangular wave parameter is the pulse width of the low level, and the target rectangular wave parameter may also be the pulse width of the high level or the duty ratio of the low level and the duty ratio of the high level. The data receiving circuit may determine a target rectangular wave parameter from the rectangular wave, thereby obtaining target data transmitted by the data transmitting circuit.
Referring to fig. 4, fig. 4 is a schematic flow chart of a data transmission method according to an embodiment of the present application, where the method includes:
the data transmission method can be applied to the data transmission circuit described in fig. 1 to 2, and includes the following steps:
101. and the data transmitting circuit determines a target rectangular wave parameter corresponding to the target data according to the corresponding relation between the data and the rectangular wave parameter under the condition of receiving the data transmitting instruction, and transmits the rectangular wave matched with the target rectangular wave parameter to the data receiving circuit.
In a possible implementation manner, when the data transmission circuit receives a data transmission instruction, the data to be transmitted is acquired from the data transmission instruction and is the target data. And determining a target rectangular wave parameter corresponding to the target data according to the corresponding relation between the target data and the rectangular wave parameter, wherein the rectangular wave parameter may be the width of a level in the rectangular wave or the duty ratio of the rectangular wave, and is not limited herein.
The first microprocessor in the data transmission circuit can convert target data into rectangular waves with matched target rectangular wave parameters by changing the on-off state of a first switching tube in the circuit. For example, it needs to sendIf the data of (1) is 0.4, the data is converted into the width of the rectangular wave level according to the corresponding relationship between the data and the rectangular wave parameter, i.e. the pulse wave level width information, where the corresponding relationship may be that the data is 0.4 corresponding to the width of 0.4 ms, or that the data is 0.4 corresponding to the width of 0.8 ms, and is not limited herein. After conversion, a first timer delays time, so that a rectangular wave with the width of 0.4 millisecond or 0.8 millisecond is sent, wherein the rectangular wave is matched with the target rectangular wave parameters, and is sent to a data receiving circuit. An input power supply externally connected with the data transmission circuit provides original rectangular waves, and rectangular waves matched with target rectangular wave parameters are obtained after the rectangular waves are converted by a first microprocessor of the data transmission circuit, wherein the target rectangular wave parameters can correspond to gear information for household appliances such as a dust collector and the like, for example, t in the graph 32The pulse width is shown.
Taking gear modulation as an example, after the data transmission circuit receives a gear modulation instruction input by a user, the dial instruction is a data transmission instruction for the data transmission circuit, the data transmission instruction includes target data, that is, gear information, where the gear information may be a speed value for adjusting an operating speed of a motor or a time value corresponding to a rotational speed of the motor, and a target rectangular wave parameter corresponding to the target data is determined according to a corresponding relationship between the target data and the rectangular wave parameter, where the corresponding relationship may be that the target data is 1, the corresponding rectangular wave parameter is a level width of 1 millisecond, or a duty ratio occupies 1%, and this is not limited herein.
Specifically, after the target rectangular wave parameter is determined, sending a rectangular wave matched with the target rectangular wave parameter to the data receiving circuit is realized by timing and delaying through a first timer built in a first microprocessor in the data sending circuit, and taking the target rectangular wave parameter as a level width as an example, the time information stored in a register of the first timer is a difference between a half-period level width and a corresponding level width of the target data, that is, a delayed time. When the rectangular wave which the target rectangular wave parameter wants to match is sent to the data receiving circuit, when the first microprocessor of the data sending circuit detects external interruption, namely edge interruption, which indicates that the external interruption is converted into low level or high level, the first timer starts to time, and when the timing time is reached, the internal interruption is triggered, namely the on-off of the first switch tube in the data sending circuit is changed to send the rectangular wave which is matched with the target rectangular wave parameter.
102. The data receiving circuit receives the rectangular wave, determines the target rectangular wave parameter from the rectangular wave, and determines the target data from a correspondence between the data and the rectangular wave parameter.
In a possible implementation manner, after the data receiving circuit receives the rectangular wave, the rectangular wave parameter is determined according to the rectangular wave. The second timer is used for starting the second timer when the external interrupt, namely the edge interrupt is detected, and closing the timer when the external interrupt is detected again.
For example, household appliances such as a dust collector and a hair dryer need to adjust the gear of a motor according to gear information sent by a data sending circuit, the data receiving circuit receives a rectangular wave sent by the data sending circuit, acquires gear information from the rectangular wave, and adjusts the gear of the motor according to the gear information.
Further, after receiving the data sent by the data sending circuit, the data can be filtered to obtain more accurate data. After the data of the gear information with smaller error is obtained, the gear information of different gears is stored in the second microprocessor of the data receiving circuit, and the data is compared with the gear information, wherein the comparison mode can be that the received data and the stored gear data are respectively subjected to subtraction, and the gear identification corresponding to the gear information with the minimum absolute value after the subtraction is taken as the gear to be adjusted to the motor, so that the motor is adjusted according to the stored gear information. Such as: the received data is 0.5, but the stored gear identification and the stored gear information are respectively 0.4 corresponding to the first gear, when the second gear corresponds to 0.8 and the third gear corresponds to 1.2, the difference is made between 0.5 and 0.4, 0.8 and 1.2 respectively to obtain the gear 1 with the minimum absolute value, the data receiving circuit determines that the motor needs to be adjusted to be the gear 1, and the motor coupled with the data receiving circuit is adjusted by using the stored gear information 0.4 corresponding to the gear 1.
In the embodiment of the application, the data sending circuit can be coupled with the data receiving circuit, the data sending circuit determines the target rectangular wave parameters corresponding to the target data, and sends the rectangular waves matched with the target rectangular wave parameters to the data receiving circuit to realize unidirectional data transmission.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (8)

1. A data transmission circuit, characterized in that the data transmission circuit comprises a data sending circuit and a data receiving circuit, the data transmission circuit is a circuit in a household appliance, wherein:
the data transmitting circuit is coupled with the data receiving circuit;
the data transmitting circuit comprises a fifth resistor, the data receiving circuit comprises a sixth resistor, and the fifth resistor is connected with the sixth resistor through a data line;
the data transmission circuit is configured to:
receiving a gear modulation instruction input by a user, wherein the gear modulation instruction carries a gear identification;
acquiring gear information corresponding to the gear identification from preset and stored gear information, and converting the gear information into time length;
setting the timing time of a first timer in the data transmission circuit as the difference between the time length corresponding to the level width of the low level or the high level and the time length of gear information conversion;
starting a first timer in the data transmission circuit when an edge-triggered interrupt is detected;
under the condition that the first timer reaches the timing time to trigger interruption, closing the first timer to send a rectangular wave with the low-level pulse width or the high-level pulse width as the time length of gear information conversion to the data receiving circuit;
the data receiving circuit is configured to:
receiving the rectangular wave;
acquiring gear information from the rectangular wave;
and adjusting the gear of the motor according to the gear information.
2. The circuit of claim 1, wherein the data transmission circuit comprises a first power supply circuit, a first switch tube, a first microprocessor, a first diode, a first resistor, a second resistor, a third resistor, a fourth resistor, and a fifth resistor, wherein:
the first power supply circuit is coupled to an input power supply, a first end of the first switch tube is coupled to the first power supply circuit through the first resistor, a control end of the first switch tube is coupled to the first power supply circuit through the second resistor, a second end of the first switch tube is coupled to an anode of the first diode, a first pin of the first microprocessor is coupled to an input end of the data transmission circuit through a fourth resistor, the control end of the first switch tube is coupled to a second pin of the first microprocessor through the third resistor, the third pin of the first microprocessor is grounded, a fourth pin of the first microprocessor is coupled to the first power supply circuit, and a cathode of the first diode is coupled to the data receiving circuit through the fifth resistor;
the first power supply circuit is used for converting alternating current into first direct current so as to respectively supply power to the first switching tube, the first diode and the first microprocessor;
the first microprocessor is used for receiving a gear modulation instruction input by a user, and the gear modulation instruction carries a gear identification; gear information corresponding to the gear identification is obtained from preset and stored gear information, the gear information is converted into time length, the on-off of the first switch tube is controlled according to the time length of the gear information conversion, and therefore a rectangular wave with the low-level pulse width or the high-level pulse width as the time length of the gear information conversion is sent to the data receiving circuit.
3. The circuit of claim 2, wherein the data transmission circuit further comprises a first capacitor, wherein:
and the fourth pin of the first microprocessor is grounded through the first capacitor.
4. The circuit of claim 2 or 3, wherein the data receiving circuit comprises a second power supply circuit, a sixth resistor, a seventh resistor, an eighth resistor, a ninth resistor, a second diode, a second switch tube, a second capacitor, and a second microprocessor, wherein:
the second power supply circuit is coupled to the input power supply, the control terminal of the second switching tube is coupled to a ground terminal through the ninth resistor, the control terminal of the second switching tube is coupled to the cathode of the second diode, the control terminal of the second switching tube is coupled to the data transmission circuit through the sixth resistor, the first terminal of the second switching tube is coupled to the second power supply circuit through the seventh resistor, the first terminal of the second switching tube is coupled to the first pin of the second microprocessor through the eighth resistor, the second pin of the second microprocessor is grounded through the second capacitor, the second terminal of the second switching tube is grounded, the second terminal of the second switching tube is coupled to the anode of the second diode, and the third pin of the first microprocessor is coupled to the second power supply circuit;
the second power supply circuit is used for converting the alternating current into a second direct current so as to respectively supply power to the second switching tube and the second microprocessor;
the second microprocessor is used for acquiring gear information from the rectangular wave; and adjusting the gear of the motor according to the gear information.
5. The circuit of claim 4, wherein the data receiving circuit further comprises a third capacitance, wherein:
and a third pin of the second microprocessor is coupled with the second power supply circuit through the third capacitor.
6. A data transmission method applied to the data transmission circuit according to any one of claims 1 to 5, comprising:
the data transmission circuit receives a gear modulation instruction input by a user, and the gear modulation instruction carries a gear identification; acquiring gear information corresponding to the gear identification from preset and stored gear information, and converting the gear information into time length; setting the timing time of a first timer in the data transmission circuit as the difference between the time length corresponding to the level width of the low level or the high level and the time length of gear information conversion; starting a first timer in the data transmission circuit when an edge-triggered interrupt is detected; under the condition that the first timer reaches the timing time to trigger interruption, closing the first timer to send a rectangular wave with the low-level pulse width or the high-level pulse width as the time length of gear information conversion to the data receiving circuit;
the data receiving circuit receives the rectangular wave; acquiring gear information from the rectangular wave; and adjusting the gear of the motor according to the gear information.
7. The method of claim 6, further comprising:
and the data receiving circuit performs filtering processing on the data of the rectangular wave and takes the filtered data as received data.
8. The method of claim 6, wherein said obtaining gear information from said rectangular wave comprises:
the data receiving circuit starts a second timer in the data receiving circuit under the condition of detecting the interruption triggered by the rectangular wave edge;
and under the condition that the data receiving circuit detects the interruption triggered by the rectangular wave edge again, closing the second timer, and determining the gear information according to the timing time of the second timer.
CN201910522500.4A 2019-06-17 2019-06-17 Data transmission circuit and method Active CN110309093B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910522500.4A CN110309093B (en) 2019-06-17 2019-06-17 Data transmission circuit and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910522500.4A CN110309093B (en) 2019-06-17 2019-06-17 Data transmission circuit and method

Publications (2)

Publication Number Publication Date
CN110309093A CN110309093A (en) 2019-10-08
CN110309093B true CN110309093B (en) 2021-06-22

Family

ID=68077309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910522500.4A Active CN110309093B (en) 2019-06-17 2019-06-17 Data transmission circuit and method

Country Status (1)

Country Link
CN (1) CN110309093B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114326785B (en) * 2021-11-30 2024-02-27 国网河南省电力公司荥阳市供电公司 Unmanned aerial vehicle transformer substation flight detecting system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202085149U (en) * 2011-04-12 2011-12-21 长春工业大学 Gear signal pretreatment interface structure for transmission fault diagnosis instrument
CN106028588A (en) * 2016-06-07 2016-10-12 中国南方航空工业(集团)有限公司 Anti-collision light control device for helicopter
CN107713907A (en) * 2017-11-10 2018-02-23 上海德朗能电子科技有限公司 A kind of dust catcher working state control device and dust catcher

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3444532B2 (en) * 1998-11-20 2003-09-08 松下電器産業株式会社 Time division multiplex wireless communication apparatus and method
JP3891421B2 (en) * 2002-10-16 2007-03-14 ソニー株式会社 Electronic circuit, modulation method, and information processing apparatus and method
CN201087946Y (en) * 2007-09-07 2008-07-16 深圳市和而泰电子科技有限公司 Practical communication circuit
CN102831364B (en) * 2011-06-16 2016-11-23 天津中兴智联科技有限公司 A kind of wakeup signal matching method, device and label
CN102521555A (en) * 2011-11-21 2012-06-27 天津中兴软件有限责任公司 Wakeup signal matching method
CN103117974B (en) * 2013-01-04 2016-06-29 昆腾微电子股份有限公司 The method and apparatus obtaining auxiliary information
CN204228820U (en) * 2014-11-06 2015-03-25 南京世都科技有限公司 A kind of remote phase place real-time detection apparatus
JP6688986B2 (en) * 2015-08-18 2020-04-28 パナソニックIpマネジメント株式会社 Signal transmission circuit
CN106027443A (en) * 2016-05-03 2016-10-12 北京邮电大学 Wireless transmission method and wireless communication system
CN107994975B (en) * 2018-01-30 2021-05-11 深圳和而泰智能控制股份有限公司 Radio frequency data transmission optimization method, radio frequency data transmission equipment and radio frequency receiving end

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202085149U (en) * 2011-04-12 2011-12-21 长春工业大学 Gear signal pretreatment interface structure for transmission fault diagnosis instrument
CN106028588A (en) * 2016-06-07 2016-10-12 中国南方航空工业(集团)有限公司 Anti-collision light control device for helicopter
CN107713907A (en) * 2017-11-10 2018-02-23 上海德朗能电子科技有限公司 A kind of dust catcher working state control device and dust catcher

Also Published As

Publication number Publication date
CN110309093A (en) 2019-10-08

Similar Documents

Publication Publication Date Title
JP6216084B2 (en) Wireless inductive power transmission
TWI463781B (en) Multiple-level power control system
US5654620A (en) Sensorless speed detection circuit and method for induction motors
CN110309093B (en) Data transmission circuit and method
US20220069866A1 (en) Tuning an electromagnetic resonant circuit of a configuration interface of a participant of a communication system
EP0035411B1 (en) Switching circuit for a remote control system
JPH0831817B2 (en) Automatic frequency control system
JPH06314534A (en) Controller for controlling relay switching
US10747361B2 (en) Control device and control method
CN110410346B (en) Fan speed regulation control method and system and electrical equipment
EP0702808B1 (en) Reset and watchdog system for a microprocessor, and appliance comprising such a microprocessor and such a system
US20240215113A1 (en) Heating appliance
JP2002330538A (en) Electronic equipment
CN213272735U (en) Power sensing device for kitchen range and kitchen range hood linkage control system
EP4068903A1 (en) Heating circuit
CN110376946B (en) Control method for output power of electric appliance, electric appliance and computer readable storage medium
CN112702810A (en) Control method and device of microwave oven and microwave oven
CA2141064A1 (en) Remote switched outlet with learning capability
CN214378230U (en) Circuit structure supporting realization of relay zero-crossing switch control function
MaitiS IR remote control signal decoder for home automation
US20030006904A1 (en) Infrared remote control
CN108005942B (en) Alternating current fan control system of gas rapid water heater
CN211144877U (en) Automatic exhaust fan with infrared induction
JPS5811035Y2 (en) High frequency heating device
KR890003633B1 (en) Home-control circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant