A signal isolation, conversion and transmission method for water pump
By using the signal isolation conversion transmission method in the water pump electronic control system, the detection and conversion circuit is used to convert the resistance value of the measured resistance into a frequency signal, which solves the safety hazards and the cost of directly connecting the sensor to the strong power, and realizes the isolation control of the strong and weak power and the stability and safety of the system.
Patent Information
- Application Number
- CN202410561218.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-05-08
AI Technical Summary
In the existing water pump electronic control system, the sensor is directly connected to strong electricity, which poses safety risks and cannot use metal contacts directly with water for water level detection, which increases the cost.
The signal isolation conversion transmission method is adopted, and the resistance value change of the measured resistance is converted into a frequency change through the detection conversion circuit, and the frequency signal is output to the microcontroller to realize the isolation control of strong and weak currents.
It effectively reduces hardware costs, realizes isolation control of strong and weak electricity on the water pump, improves the safety and stability of the system, and extends the service life.
Smart Images

Figure CN118346587B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of water pump control, and in particular to a signal isolation, transformation and transmission method for a water pump. Background Art
[0002] For water pumps powered by strong electricity, in order to reduce costs and reduce the complexity of electronic control, an AC-DC power supply circuit formed by a BUCK circuit is often used. The characteristic of this circuit is that the strong electricity and the weak electricity of the control board are directly connected, which is commonly known as a "hot plate".
[0003] When this type of electronic control is used, any sensor directly connected to the electronic control board is also directly connected to strong electricity. In many cases, this connection is very unsafe. For example, if the NTC temperature sensor is damaged, leakage will occur.
[0004] Under this circuit structure, it is impossible to use water level detection in the form of metal contacts in direct contact with water, because this is equivalent to connecting strong electricity directly to water.
[0005] On the other hand, we also need to transmit some information to the microcontroller in order to achieve communication. The commonly used solution is to use a communication module, but this method undoubtedly increases the cost.
[0006] In order to solve this problem, the present invention provides a new signal conversion transmission method. Summary of the invention
[0007] In view of the above-mentioned shortcomings (problems) of the prior art, in order to effectively reduce hardware costs and achieve effective isolation and control of strong and weak points on a water pump, the present application provides a signal isolation, transformation and transmission method for a water pump.
[0008] To achieve the above-mentioned purpose and other related purposes, the present application adopts the following technical solutions: a signal isolation conversion transmission method for a water pump, comprising a measured resistor, a detection conversion circuit, and a single-chip microcomputer, wherein the detection conversion circuit is connected to the measured resistor, and when the detection conversion circuit is working, a frequency change corresponding to the resistance change is generated according to the resistance change of the measured resistor, and the detection conversion circuit outputs a frequency signal, and the single-chip microcomputer is connected to the signal output terminal of the detection conversion circuit to obtain the frequency signal;
[0009] The corresponding relationship between the resistance value of the measured resistor and the frequency signal output by the detection conversion circuit is determined through experiments. The resistance value of the measured resistor and the measurement parameters, the relationship between "measurement parameters-resistance value-frequency" are formed into a data table, the data table is stored in the microcontroller, and the current "measurement parameters" are determined by calling the data table.
[0010] Optionally, the detection conversion circuit includes capacitor C1, resistor R1, resistor R2, Schmidt inverter A, Schmidt inverter B, photoelectric coupler U2, resistor R3 and resistor R4, one end of the measured resistor is connected to one end of capacitor C1, one end of resistor R1 and the input end of Schmidt inverter A, the other end of capacitor C1 is connected to digital ground, the other end of the measured resistor is connected to one end of resistor R2, the other end of resistor R2 is connected to the other end of resistor R1, the output end of Schmidt inverter A, and the input end of Schmidt inverter B, the output end of Schmidt inverter B is connected to the cathode of photoelectric coupler U2, the anode of photoelectric coupler U2 is connected to power supply VDD through resistor R3, the emitter of photoelectric coupler U2 is grounded, the collector of photoelectric coupler U2 is connected to one end of resistor R4 and the output as a frequency signal, and the other end of resistor R4 is connected to power supply VCC.
[0011] Optionally, the Schmidt inverter A is connected to a power control circuit, which includes a transistor P1, a resistor R6, a resistor R5 and a photocoupler U3, the anode of the photocoupler U3 is connected to the power supply VCC through the resistor R5, the cathode of the photocoupler U3 is used to connect to the single-chip microcomputer, the emitter of the photocoupler U3 is connected to the digital ground, the collector of the photocoupler U3 is connected to the base of the transistor P1 and one end of the resistor R6, the other end of the resistor R6 is connected to the power supply VDD and the emitter of the transistor P1, the collector of the transistor P1 is connected to the power supply end of the Schmidt inverter A, and the ground end of the Schmidt inverter A is connected to the digital ground.
[0012] Optionally, the power supply VCC is converted into the power supply VCC through a DCDC module.
[0013] Optionally, the single chip microcomputer is initialized, and then it is determined whether detection is required. If detection is required, the power control circuit is enabled, waits for the oscillation to stabilize, sets the counter start technology, starts timing, and determines whether a new frequency is obtained. If so, the corresponding "measurement parameter" is obtained by looking up the table, and then returns to the detection and judgment step;
[0014] If no new frequency is obtained, return to the detection and judgment step;
[0015] If detection is not required, complete other processes and return to the detection judgment step.
[0016] Optionally, the single chip microcomputer further performs an interrupt processing step, including:
[0017] Protect the scene, read the count value, clear the technology and re-count, enable the power control circuit, set the "obtain new frequency" flag, restore the scene, and return to the main process.
[0018] Optionally, it also includes a zero-crossing detection module, which transmits information near the zero-crossing point of the power supply voltage, couples the information to the power line through a transformer, and uses two frequencies to represent 0 and 1 of the information, F1 represents 0, and F2 represents 1. A third frequency F3 is used to represent the starting point. The three frequencies have obvious differences. The microcontroller obtains communication information based on the frequency signal collected by the zero-crossing detection module.
[0019] In summary, the present application includes at least one of the following beneficial technical effects:
[0020] 1. The use of an extremely simple circuit structure can effectively reduce costs and achieve reliable information conversion and transmission at a limited cost, thereby avoiding the analog signal output by the measured resistor (temperature sensor, water resistor, photoresistor, pressure sensitive resistor, etc.) being transmitted to the single-chip microcomputer for processing. The single-chip microcomputer does not need to receive the analog signal, but only collects the frequency, and uses the frequency to infer the change of the measured resistance, and then infers the detected physical parameters;
[0021] 2. The operation is stable and reliable, the strong and weak current control is isolated, and the service life is extended. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a circuit schematic diagram of an embodiment of the present application;
[0023] Figure 2 is a schematic diagram of a DCDC module in an embodiment of the present application;
[0024] Figure 3 This is a schematic diagram of the connection of the single chip microcomputer in the embodiment of the present application;
[0025] Figure 4 is a flow chart of single chip microcomputer data processing in an embodiment of the present application;
[0026] Figure 5 This is a single chip microcomputer interrupt flow chart of an embodiment of the present application.
[0027] Description of main reference numerals:
[0028] 1. Resistance to be measured; 2. Detection conversion circuit; 3. Single chip microcomputer; 4. Power supply control circuit; 5. Zero-crossing detection module. DETAILED DESCRIPTION
[0029] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0030] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The illustrations only show the components related to the present application rather than being drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.
[0031] The specific implementation methods of the present application will be further described below in conjunction with the accompanying drawings.
[0032] Example:
[0033] The embodiment of the present application discloses a signal isolation, conversion and transmission method for a water pump, including a measured resistor 1, a detection conversion circuit 2, and a single chip computer 3. The measured resistor 1 (RS) can be a temperature sensor, a water body resistor, a photoresistor, a pressure sensitive resistor, etc.
[0034] The detection conversion circuit 2 is connected to the measured resistor 1. When the detection conversion circuit 2 is working, the frequency change corresponding to the resistance change is generated according to the resistance change of the measured resistor 1. The detection conversion circuit 2 outputs a frequency signal. The single-chip microcomputer 3 is connected to the signal output end of the detection conversion circuit 2 to obtain the frequency signal.
[0035] Specifically, in one example, the detection conversion circuit 2 includes a capacitor C1, a resistor R1, a resistor R2, a Schmidt inverter A, a Schmidt inverter B, a photocoupler U2, a resistor R3, and a resistor R4. The Schmidt inverter A and the Schmidt inverter B are a Schmidt trigger chip, which includes two Schmidt inverters.
[0036] One end of the measured resistor 1 is connected to one end of the capacitor C1, one end of the resistor R1 and the input end of the Schmidt inverter A, the other end of the capacitor C1 is connected to the digital ground, the other end of the measured resistor 1 is connected to one end of the resistor R2, the other end of the resistor R2 is connected to the other end of the resistor R1, the output end of the Schmidt inverter A, and the input end of the Schmidt inverter B, the output end of the Schmidt inverter B is connected to the cathode of the photocoupler U2, the anode of the photocoupler U2 is connected to the power supply VDD through the resistor R3, the emitter of the photocoupler U2 is grounded, the collector of the photocoupler U2 is connected to one end of the resistor R4 and the output as the frequency signal, and the other end of the resistor R4 is connected to the power supply VCC.
[0037] Schmidt inverter A (U1:A) forms an oscillation circuit with the measured resistor 1 (RS) and the matching capacitor C1. The estimated frequency of the circuit is as follows:
[0038] f = 1 / (k × (Rs + R2) × C1) Formula 1;
[0039] In the circuit, R2 is a fine-tuning resistor, the purpose of which is to fine-tune the oscillation frequency and eliminate the influence of circuit parameter deviation. R2 can be an adjustable resistor, which can be conveniently adjusted. In most cases, the detection accuracy requirement is not high, and fixed resistors can be used at this time. For individual over-limit resistors, just replace them.
[0040] In formula 1, k is a coefficient and is a fixed value.
[0041] Since the transmission cutoff frequency of the optocoupler U2 is generally several hundred kilohertz, and the actual signal frequency that can be transmitted is several tens of kilohertz, the value of C1 must be adjusted according to the actual situation to adjust the range of the circuit oscillation frequency to ensure that the optocoupler U2 can effectively transmit the signal to the control circuit part.
[0042] The function of Schmidt inverter B (U1:B) is to shape the oscillation signal to obtain a better waveform, and it can also isolate the influence of the transmission circuit on the oscillation circuit.
[0043] Based on the above scheme, further, the Schmidt inverter A is connected to a power control circuit 4, which includes a transistor P1, a resistor R6, a resistor R5 and a photocoupler U3. The anode of the photocoupler U3 is connected to the power supply VCC through the resistor R5, the cathode of the photocoupler U3 is used to connect to the single-chip computer 3, the emitter of the photocoupler U3 is connected to the digital ground, the collector of the photocoupler U3 is connected to the base of the transistor P1 and one end of the resistor R6, the other end of the resistor R6 is connected to the power supply VDD and the emitter of the transistor P1, the collector of the transistor P1 is connected to the power supply end of the Schmidt inverter A, and the ground end of the Schmidt inverter A is connected to the digital ground.
[0044] Figure 1 In the circuit, the photocoupler U3 indirectly controls the operation of the Schmitt inverter U1 and controls the positive power supply terminal (VDD) of U1. When the "detection circuit voltage control" S2 signal is at a low level, the photocoupler emits light, the light receiving terminal of U3 is turned on, P1 is turned on, power is supplied to U1, and the detection conversion circuit 2 starts to work. When the "detection circuit voltage control" signal is at a high level, the photocoupler does not emit light, the light receiving terminal of U3 is turned off, P1 is turned off, U1 has no power supply, and the detection conversion circuit 2 stops working.
[0045] Optionally, the power supply VCC is converted into the power supply VCC through a DCDC module.
[0046] The corresponding relationship between the resistance value of the measured resistor 1 and the frequency signal output by the detection conversion circuit 2 is determined through experiments, and the resistance value of the measured resistor 1 and the measurement parameters, the relationship between "measurement parameters-resistance-frequency" is formed into a data table, the data table is stored in the single-chip computer 3, and the current "measurement parameters" are determined by calling the data table.
[0047] Optionally, the single chip computer 3 is initialized, and then it is determined whether detection is required. If detection is required, the power control circuit 4 is enabled, waits for the oscillation to stabilize, sets the counter to start counting, starts timing, and determines whether a new frequency is obtained. If so, the corresponding "measurement parameter" is obtained by looking up the table, and then returns to the detection and judgment step;
[0048] If no new frequency is obtained, return to the detection and judgment step;
[0049] If detection is not required, complete other processes and return to the detection judgment step.
[0050] Optionally, the single chip microcomputer 3 further performs an interrupt processing step, including:
[0051] Protect the scene, read the count value, clear the technology and re-count, enable the power control circuit 4, set the "get new frequency" flag, restore the scene, and return to the main process.
[0052] 1) The "detection circuit voltage control" (S2) signal outputs a low level to supply power to the detection conversion circuit 2, and the detection conversion circuit 2 starts to work.
[0053] 2) The microcontroller 3 uses its internal "external event counter" function module to count the pulse signal transmitted by the optocoupler. At the same time, a timer is used for timing. The value of the counter is read once every 1S to obtain the frequency of the pulse signal.
[0054] 3) After the test is completed, the "detection circuit voltage control" signal outputs a high level, and the power supply of the detection conversion circuit 2 is turned off.
[0055] 4) The resistance parameters corresponding to the frequency can be obtained by looking up the table.
[0056] An oscillation circuit is formed by using a Schmidt inverter together with the signal of the measured resistor 1. When the resistance value changes, the vibration frequency will also change, so that the resistance change is converted into a change in pulse frequency. The pulse signal is then isolated and transmitted to the microcontroller 3 using an optical coupler.
[0057] If it is necessary to control the operation of the detection conversion circuit 2, that is, to start the detection conversion circuit 2 only when detection is needed, an optocoupler can be used to form a power control circuit 4 of the detection conversion circuit 2 to control the power supply of the detection conversion circuit 2. This power supply control is necessary in some cases, for example: when there are multiple detection signals at the same time, in order to avoid mutual interference between signals, the power supply of the signal that is not detected can be turned off.
[0058] The power supply of the detection conversion circuit 2 is generally sampled from a low-cost isolated DCDC power supply circuit, such as Figure 2 shown.
[0059] The control board needs to determine the relationship between the resistance value and the frequency through experiments in advance. After that, the detection of this signal only needs to measure the signal frequency, and the current resistance value can be known through the corresponding relationship between frequency and resistance value, and the actual measured parameter can be obtained. Taking the NTC temperature sensor as an example, you can directly make a "frequency-temperature" relationship table, and after obtaining the frequency, you can directly look up the table to get the current temperature value.
[0060] There are many resistance type signals, such as NTC temperature sensor, water resistance, photoresistor, pressure sensitive resistor (for measuring water pressure), etc.
[0061] The use of an extremely simple circuit structure can effectively reduce costs and achieve reliable information conversion and transmission at a limited cost, thereby avoiding the analog signal output by the measured resistor 1 (temperature sensor, water resistor, photoresistor, pressure sensitive resistor, etc.) being transmitted to the single-chip microcomputer 3 for processing. The single-chip microcomputer 3 does not need to receive the analog signal, but only collects the frequency, and uses the frequency to infer the change of the measured resistor 1, and then infers the detected physical parameters; the operation is stable and reliable, the strong and weak current control is isolated, and the service life is extended.
[0062] Embodiment 2:
[0063] refer to Figure 3 As shown, it also includes a zero-crossing detection module 5, which transmits information near the zero-crossing point of the power supply voltage, couples the information to the power line through a transformer, and uses two frequencies to represent 0 and 1 of the information, F1 represents 0, and F2 represents 1. A third frequency F3 is used to represent the starting point. The three frequencies have obvious differences. The single-chip microcomputer 3 obtains communication information based on the frequency signal collected by the zero-crossing detection module 5.
[0064] In order to clearly identify the starting point of the transmission, the third frequency F3 is used to represent the starting point. These three frequencies are significantly different.
[0065] Only one bit of information needs to be transmitted at each zero crossing. When powered at 50HZ, 100 bits of information can be transmitted per second (protecting the start bit), which can meet most needs. When crossing the zero point, the information is coupled to the power line. The receiving end starts receiving information at the zero crossing and calculates the frequency of the received information to determine whether it is the start bit, 0, 1, or no information.
[0066] The zero-crossing detection circuit can start to generate a zero-crossing signal about 0.3ms before the zero-crossing point, at which time the information transmission starts in half-duplex, master-slave structure.
[0067] This method is simple and low-cost and is suitable for products such as deep well pumps and submersible pumps.
[0068] The above embodiments are only illustrative of the principles and effects of the present application, and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, any equivalent changes made based on the structure, shape, and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A signal isolation, conversion and transmission method for a water pump, comprising a measured resistor (1), a detection conversion circuit (2), and a single chip microcomputer (3), characterized in that: The detection conversion circuit (2) is connected to the measured resistor (1), and when the detection conversion circuit (2) is working, a frequency change corresponding to the resistance change is generated according to the resistance change of the measured resistor (1), and the detection conversion circuit (2) outputs a frequency signal, and the single chip computer (3) is connected to the signal output end of the detection conversion circuit (2) to obtain the frequency signal; The corresponding relationship between the resistance value of the measured resistor (1) and the frequency signal output by the detection conversion circuit (2) is determined through experiments, the resistance value of the measured resistor (1) and the measurement parameter, and the relationship between "measurement parameter-resistance value-frequency" are formed into a data table, the data table is stored in the single chip computer (3), and the current "measurement parameter" is determined by calling the data table; The detection conversion circuit (2) comprises a capacitor C1, a resistor R1, a resistor R2, a Schmidt inverter A, a Schmidt inverter B, a photoelectric coupler U2, a resistor R3 and a resistor R4, one end of the resistor (1) to be measured is connected to one end of the capacitor C1, one end of the resistor R1 and an input end of the Schmidt inverter A, the other end of the capacitor C1 is connected to a digital ground, the other end of the resistor (1) to be measured is connected to one end of the resistor R2, the other end of the resistor R2 is connected to the other end of the resistor R1, the output end of the Schmidt inverter A and the input end of the Schmidt inverter B, the output end of the Schmidt inverter B is connected to the cathode of the photoelectric coupler U2, the anode of the photoelectric coupler U2 is connected to a power supply VDD through the resistor R3, the emitter of the photoelectric coupler U2 is grounded, the collector of the photoelectric coupler U2 is connected to one end of the resistor R4 and an output as a frequency signal, and the other end of the resistor R4 is connected to a power supply VCC; The Schmidt inverter A is connected to a power control circuit (4), which includes a transistor P1, a resistor R6, a resistor R5 and a photocoupler U3. The anode of the photocoupler U3 is connected to a power source VCC via the resistor R5, the cathode of the photocoupler U3 is used to connect to the single-chip computer (3), the emitter of the photocoupler U3 is connected to a digital ground, the collector of the photocoupler U3 is connected to the base of the transistor P1 and one end of the resistor R6, the other end of the resistor R6 is connected to the power source VDD and the emitter of the transistor P1, the collector of the transistor P1 is connected to the power supply end of the Schmidt inverter A, and the ground end of the Schmidt inverter A is connected to the digital ground.
2. A signal isolation, conversion and transmission method for a water pump according to claim 1, characterized in that: The power source VCC is converted into the power source VCC by the DCDC module.
3. A signal isolation, conversion and transmission method for a water pump according to claim 2, characterized in that: The single chip computer (3) is initialized and then determines whether detection is required. If detection is required, the power control circuit (4) is enabled, waits for the oscillation to stabilize, sets the counter to start counting, starts timing, determines whether a new frequency is obtained, and if so, looks up the table to obtain the corresponding "measurement parameter", and then returns to the detection and judgment step; If no new frequency is obtained, return to the detection and judgment step; If detection is not required, complete other processes and return to the detection judgment step.
4. A signal isolation, conversion and transmission method for a water pump according to claim 3, characterized in that: The single chip computer (3) further performs an interrupt processing step, including: Protect the scene, read the count value, re-count the counter, enable the power control circuit (4), set the "get new frequency" flag, restore the scene, and return to the main process.
5. A signal isolation, conversion and transmission method for a water pump according to claim 1, characterized in that: It also includes a zero-crossing detection module (5) that transmits information near the zero-crossing point of the power supply voltage, couples the information to the power line through a transformer, uses two frequencies to represent 0 and 1 of the information, F1 represents 0, and F2 represents 1, and uses a third frequency F3 to represent the starting point. The three frequencies have obvious differences. The single-chip microcomputer (3) obtains communication information based on the frequency signal collected by the zero-crossing detection module (5).
Citation Information
Patent Citations
Take pump control ware of self -checking protection feedback
CN205592118U
Input three-phase power supply open-phase protection circuit in variable-frequency water pump controller
CN212784753U