Visible light communication transceiver circuit suitable for ultrasonic flowmeter
By designing visible light communication transceiver circuits suitable for ultrasonic flowmeters, using components such as light emitting diodes and microprocessors, stable data communication in complex electromagnetic environments is achieved, and the problems of instability and high cost in the prior art are solved, and the advantages of high efficiency, low cost and anti-interference are provided.
Patent Information
- Application Number
- CN202411736678.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-02-28
AI Technical Summary
In mobile application scenarios, especially in complex electromagnetic environments, it is difficult to achieve stable wireless data communication, and the hardware configuration requirements are high, the cost is high and the operation is complicated.
Design a visible light communication transceiver circuit suitable for ultrasonic flowmeters, including light emitting diodes, microprocessors, mode switching circuits, constant current pulse driving circuits and window comparison output circuits, so as to realize bidirectional data communication through visible light to avoid electromagnetic interference.
It realizes visible light communication with simple structure and low cost, has high working stability and anti-interference ability, is suitable for complex electromagnetic environments, reduces production and application costs, and has high practical value.
Smart Images

Figure CN119544069A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic circuits, and in particular to a visible light communication transceiver circuit. Background Art
[0002] Ultrasonic flowmeter is a non-contact instrument that measures fluid flow based on the difference in ultrasonic propagation speed. It has high accuracy, high reliability and wide applicability. At present, when ultrasonic flowmeter is being repaired, another mobile terminal is usually required to communicate with it.
[0003] In the prior art, there are various means of data communication between ultrasonic flow meters and other mobile terminals, and the most commonly used methods include wired transmission and wireless transmission. Wired transmission is to connect the ultrasonic flow meter to the mobile terminal through a data cable to achieve real-time transmission of measurement data, fault logs or maintenance records. This method has the advantages of stable transmission and high data security, but is limited by the transmission distance and wiring conditions, and is usually used in special fixed places such as factories. Wireless transmission uses wireless communication technology (such as Wi-Fi, Bluetooth, 4G / 5G, LoRa, NB-IoT, etc.) to send the measurement data of the ultrasonic flow meter to the mobile terminal. This method has the advantages of flexibility, convenience, and no need for wiring. It is suitable for long-distance monitoring and mobile application scenarios.
[0004] For the above mobile application scenarios, the above wireless transmission method has high requirements for low electromagnetic interference in the environment to ensure the timeliness and accuracy of data transmission. However, it has the disadvantages of high hardware configuration requirements, high cost and cumbersome operation; in addition, in some special installation sites, especially in places with complex electromagnetic environment interference, the above wireless transmission method has the risk of failure. Summary of the invention
[0005] The purpose of the present invention is to provide a visible light communication transceiver circuit suitable for an ultrasonic flow meter. The circuit can be installed on an ultrasonic flow meter and a mobile terminal and has a simple structure. Bidirectional transmission and reception can be achieved with the help of visible light communication, without being interfered by electromagnetic fields, and having high working stability.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows: A visible light communication transceiver circuit suitable for an ultrasonic flow meter, comprising a light emitting diode and a microprocessor, characterized in that it also comprises a mode switching circuit connected to the light emitting diode, a constant current pulse drive circuit connected to the microprocessor, and a window comparison output circuit connected to both the microprocessor and the mode switching circuit; the microprocessor is also connected to the mode switching circuit.
[0007] Therefore, the main function of the light-emitting diode is to receive light signals and convert them into current signals or to receive current signals and convert them into light signals. The former is the function of the light-emitting diode when the visible light communication transceiver circuit is in the receiving mode; the latter is the function of the light-emitting diode when the visible light communication transceiver circuit is in the transmitting mode.
[0008] The mode switching circuit is connected to the microprocessor and includes two analog switches for controlling the direction of the light emitting diode. The analog switch can be, for example, a single-pole double-throw analog switch. When the microprocessor sends a level control signal to the analog switch, the connection route of the single-pole double-throw analog switch is controlled. There can be two analog switches, which are connected to the two ends of the light emitting diode respectively.
[0009] The constant current pulse drive circuit includes an analog switch and a resistor connected to two terminals of the analog switch. When the two resistors are set to different values, the current values flowing through the path are different under the same voltage, so the brightness of the light-emitting diode is different.
[0010] When in the transmitting mode, the analog switch in the constant current pulse drive circuit quickly switches the contact position under the control command sent by the microprocessor, and the current value flowing in the path will change accordingly, that is, the final brightness change of the light-emitting diode will form an active, digital continuous signal. When the communication transceiver circuit in the transmitting mode is installed on the ultrasonic flowmeter, and the other communication transceiver circuit in the receiving mode is installed on the mobile terminal, data communication transmission can be realized.
[0011] When in receiving mode, when the light emitting diode receives a light change signal, the current value flowing through the path can be changed. This circuit also includes a window comparison output circuit connected to the mode switching circuit. The window comparison output circuit receives the change current, and after the current signal is amplified by its own operational amplifier, it can be input into the subsequent comparator circuit, and finally the comparison result is output to the microprocessor. The microprocessor can determine the type of light signal received by the light emitting diode corresponding to the comparison result to realize data communication transmission.
[0012] In summary, this circuit realizes visible light-based communication and reception in a simple circuit structure by setting a simple light-emitting diode and a peripheral processing circuit, and has the advantages of simple structure and low cost; in addition, this circuit uses visible light as a communication medium, which avoids the influence of external electromagnetic field interference on the accuracy and timeliness of the entire communication process, and can be used in complex electromagnetic environments; in addition, this circuit has a two-way receiving and transmitting capability through the high-frequency control of the analog switch in the mode switching circuit and the constant current pulse drive circuit by the microprocessor, and the amplification and comparison processing of the window comparison output circuit, so that a set of this circuit device can be installed on both an ultrasonic flow meter and a mobile terminal, further reducing the production and application costs, and has a high practical value.
[0013] As a preferred embodiment of the present invention, the mode switching circuit includes a first analog switch and a second analog switch respectively connected to two ends of the photodiode; the first analog switch and the second analog switch are single-pole double-throw analog switches.
[0014] As a preferred embodiment of the present invention, the control receiving ends of the first analog switch and the second analog switch are both connected to the signal output end of the microprocessor.
[0015] As a preferred embodiment of the present invention, the constant current pulse driving circuit includes a third analog switch and two current limiting resistors connected to the third analog switch, and the resistance values of the two current limiting resistors are different.
[0016] As a preferred embodiment of the present invention, the window comparison output circuit includes an operational amplifier circuit connected to the mode switching circuit and a window comparison circuit connected to the microprocessor, and the output end of the operational amplifier circuit is connected to the input end of the window comparison circuit.
[0017] As a preferred embodiment of the present invention, a first-order high-pass RC filter circuit for eliminating interfering DC components is further provided between the operational amplifier circuit and the window comparison circuit.
[0018] As a preferred embodiment of the present invention, the visible light communication transceiver circuit suitable for an ultrasonic flow meter further includes an inverter connected to the first analog switch.
[0019] As a preferred embodiment of the present invention, the constant current pulse driving circuit further includes a constant current circuit connected to the two current limiting resistors.
[0020] In summary, the present invention has the following beneficial effects: 1. This circuit realizes visible light based communication transmission and reception in a simple circuit structure by setting a simple light emitting diode and a peripheral processing circuit, which has the advantages of simple structure and low cost.
[0021] 2. In addition, this circuit uses visible light as the communication medium, which avoids the influence of external electromagnetic field interference on the accuracy and timeliness of the entire communication process, and can be used in complex electromagnetic environments.
[0022] 3. Through the high-frequency control of the analog switch in the mode switching circuit and the constant current pulse drive circuit by the microprocessor, as well as the amplification and comparison processing of the window comparison output circuit, a two-way transceiver capability is achieved, so that a set of this circuit device can be installed on both the ultrasonic flow meter and the mobile terminal, further reducing the production and application costs, and having high practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 Schematic diagram of the circuit of the present invention. DETAILED DESCRIPTION
[0024] The technical solutions of the embodiments of the present invention are explained and described below in conjunction with the drawings of the embodiments of the present invention, but the following embodiments are only preferred embodiments of the present invention, not all. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work are all within the protection scope of the present invention.
[0025] The terms "first", "second", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variation thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
[0026] The main function of the photodiode is to receive light signals and convert them into current signals or to receive current signals and convert them into light signals. The former is the function of the light-emitting diode when the visible light communication transceiver circuit is in the receiving mode; the latter is the function of the light-emitting diode when the visible light communication transceiver circuit is in the transmitting mode.
[0027] Therefore, if Figure 1 As shown, the mode switching circuit includes a first analog switch U7 and a second analog switch U8, wherein the light emitting diode LED1 is connected between the first analog switch U7 and the second analog switch U8.
[0028] One of the output pins 4 of the inverter U6 is connected to the control receiving end of the first analog switch U7, and another output pin 1 of the inverter U6 is connected to the control receiving end of the second analog switch U8. The microprocessor is connected to the inverter U6. When the microprocessor inputs a control level to the inverter U6, one of the output pins 4 of the inverter U6 maintains the phase of the input signal, and the other output pin 1 flips the phase of the input signal by 180 degrees and outputs it. At this time, the microprocessor can use one control end to simultaneously and oppositely control the first analog switch U7 and the second analog switch U8.
[0029] Among them, pin No. 6 of the second analog switch U8 is connected to the switch tube Q1 in the constant current circuit in the constant current pulse driving circuit, and the switch tube Q1 is connected to the current limiting resistors R7 and R17. In this embodiment, the resistance of the current limiting resistor R7 is 500Ω, and the resistance of the current limiting resistor R17 is 1KΩ; the current limiting resistors R7 and R17 are connected to the third analog switch U12, and the No. 1 I / O pin of the third analog switch U12 is connected to one of the control terminals of the microprocessor.
[0030] In addition, pin 6 of the first analog switch U7 is connected to the operational amplifier circuit of the window comparison output circuit. Specifically, the operational amplifier circuit includes an operational amplifier U10.1 and a resistor R9 and a capacitor C4 connected in parallel with the negative input terminal 2 and the output terminal 1 of the operational amplifier U10.1. The output terminal 1 of the operational amplifier U10.1 is first connected to the I / V converter of the receiving circuit formed by R9 and C4, and the light signal received by the light-emitting diode LED1 is converted into voltage through current and then output to the window comparison circuit. The window comparison circuit includes a comparator U10.2 and a comparator U11.2, both of which have input terminals connected to the output terminal 1 of the operational amplifier U10.1, and the output terminals of the two are connected in parallel to the data receiving I / O port of the microprocessor. In addition, the capacitor C5 and the resistor R10 form a first-order high-pass RC filter circuit, which is arranged between the operational amplifier U10.1 and the window comparison circuit to reduce the influence of the DC component caused by ambient light. In addition, the resistors R12 and R13, and the resistors R14 and R15 are used to set a threshold voltage, which is a comparison basis for the above two comparators.
[0031] In one possible embodiment, when in the transmission mode, the microprocessor sends a mode switching command, so that the first analog switch U7 and the second analog switch U8 perform an action, thereby making the light-emitting diode LED1 in a forward bias state, and the conduction current flows to the ground terminal through the switch tube Q1 and one of the current limiting resistors and the third analog switch U12. The microprocessor sends a control signal to pin 1 of the third analog switch U12, so that the third analog switch U12 selects the resistor connected to the circuit according to the control signal, for example, selects the current limiting resistor R7 or the current limiting resistor R17. When the current limiting resistor R7 is connected, since the resistance value is a small value, the current value flowing through the light-emitting diode LED1 is large at this time, and the brightness of the light-emitting diode LED1 is high; when the current limiting resistor R17 is connected, since the resistance value is a large value, the current value flowing through the light-emitting diode LED1 is small at this time, and the brightness of the light-emitting diode LED1 is dim. Based on this, within a period of time, the microprocessor can send binary information to the outside world by sending a control signal carrying information with the help of the light-emitting diode LED1. This circuit in the transmission mode can be applied to ultrasonic flowmeters as the hardware basis for data transmission of ultrasonic flowmeters.
[0032] In another possible embodiment, when in the receiving mode, the microprocessor sends a mode switching command, so that the first analog switch U7 and the second analog switch U8 perform an action, thereby making the light-emitting diode LED1 in a reverse biased state. When the photodiode is in a reverse biased state, the space charge region of the PN junction becomes wider and the potential barrier increases. At this time, if light irradiates the PN junction, the photons will excite the electrons in the PN junction and generate photogenerated carriers. These photogenerated carriers separate and drift under the action of the electric field to form a photocurrent.
[0033] Therefore, within a period of time, when it receives the visible light signal carrying information transmitted by the communication object, through the amplification effect of the operational amplifier U10.1 and the window comparator circuit composed of the U10.2 and U11.2 comparators, the preset voltage is used to distinguish the 1 and 0 effective high and low level signals, and finally input them to the microprocessor to achieve communication. This circuit in the receiving mode can be installed on the mobile terminal as the hardware basis for receiving data.
[0034] When the light-emitting diode LED1 is in the transmitting state, the high and low level signals are distinguished by switching the constant current (i.e. the brightness value of the light-emitting diode LED1). When receiving, they are distinguished by the window comparator, which greatly improves the stability and anti-interference ability of communication.
[0035] It should be stated that the visible light communication transceiver circuit suitable for ultrasonic flow meters has both transmitting and receiving capabilities, and can therefore also meet the needs of ultrasonic flow meters receiving data and mobile terminals sending data.
[0036] In another possible embodiment, the visible light communication transceiver circuit also has the ability to resist interference from ambient light, that is, the constant current value of the light-emitting diode LED1 can be selected by changing the resistance values of R7 and R17, thereby raising the luminous brightness value of the light-emitting diode LED1 in the emission state and reducing the impact of ambient light disturbances.
[0037] The above description is only the preferred embodiment disclosed in this application and the description of the technical principle used. Those skilled in the art should understand that the scope of protection involved in this disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but also should cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this disclosure (but not limited to) to form a technical solution.
[0038] In addition, although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.
Claims
1. A visible light communication transceiver circuit suitable for an ultrasonic flow meter, comprising a light emitting diode and a microprocessor, characterized in that: It also includes a mode switching circuit connected to the light-emitting diode, a constant current pulse driving circuit connected to the microprocessor, and a window comparison output circuit connected to both the microprocessor and the mode switching circuit; the microprocessor is also connected to the mode switching circuit.
2. A visible light communication transceiver circuit suitable for an ultrasonic flow meter according to claim 1, characterized in that: The mode switching circuit includes a first analog switch and a second analog switch respectively connected to two ends of the photodiode; the first analog switch and the second analog switch are single-pole double-throw analog switches.
3. A visible light communication transceiver circuit suitable for an ultrasonic flow meter according to claim 2, characterized in that: The control receiving ends of the first analog switch and the second analog switch are both connected to the signal output end of the microprocessor.
4. A visible light communication transceiver circuit suitable for an ultrasonic flow meter according to claim 3, characterized in that: The constant current pulse driving circuit includes a third analog switch and two current limiting resistors connected to the third analog switch, and the two current limiting resistors have different resistance values.
5. A visible light communication transceiver circuit suitable for an ultrasonic flow meter according to claim 4, characterized in that: The window comparison output circuit includes an operational amplifier circuit connected to the mode switching circuit and a window comparison circuit connected to the microprocessor, and the output end of the operational amplifier circuit is connected to the input end of the window comparison circuit.
6. A visible light communication transceiver circuit suitable for an ultrasonic flow meter according to claim 5, characterized in that: A first-order high-pass RC filter circuit for eliminating interfering DC components is also provided between the operational amplifier circuit and the window comparison circuit.
7. A visible light communication transceiver circuit suitable for an ultrasonic flow meter according to claim 2, characterized in that: The visible light communication transceiver circuit suitable for an ultrasonic flow meter also includes an inverter connected to the first analog switch.
8. The visible light communication transceiver circuit suitable for ultrasonic flowmeter according to claim 4, characterized in that: The constant current pulse driving circuit also includes a constant current circuit connected to the two current limiting resistors.