Based on the special environment of offshore oil spill recovery, this paper designs an offshore liquid level measurement system based on AT89S51 single-chip microcomputer. The system adopts the principle of segmented capacitance detection to realize the detection of oil and water dual liquid levels. The hardware circuit of micro capacitance measurement is reasonably constructed. The system can be accurately applied to the measurement of offshore oil level.
Square wave generating circuit
Figure 4 Square wave generating circuit
The multivibrator composed of NE555 is the square wave signal source measured by the diode AC bridge, and its specific circuit is shown in Figure 4. The frequency calculation is shown in Equations (4), (5) and (6).
(4)
(5)
(6)
Let , , , then: . Therefore, NE555 can provide a square wave signal source with a voltage amplitude of 5V and a frequency of 500kHz for the capacitance detection circuit.
Double T diode AC bridge capacitance measurement circuit
The capacitive sensor converts the liquid level into capacitance, and then converts it into a voltage, current or frequency signal that is a linear function of the capacitance through the capacitance measurement circuit. Since the capacitance is only a few PF, a double-T diode AC bridge micro-capacitance detection circuit is used to convert the capacitance change into a voltage output. The measurement principle is shown in Figure 5.
Figure 5 Diode T-type network
In FIG5 , e is a high-frequency power supply, and D1 and D2 are two diodes with exactly the same characteristics.
Precision amplifier circuit
Convert 0-0.5mV voltage to 0-5V for A/D conversion. Use OP07 to form a two-stage integrated operational amplifier circuit, the first stage amplification factor is 20, the second stage amplification factor is 50, and its circuit structure is shown in Figure 6.
Figure 6 Precision amplifier circuit
Single chip microcomputer and A/D interface circuit
An A/D converter is needed between the sensor and the microcontroller to convert the input analog voltage signal into a binary digital signal. This article uses the successive comparison A/D converter ADC0809. The specific interface circuit with the microcontroller is shown in Figure 7.
Figure 7 ADC0809 and MCU interface circuit
In Figure 7, the single-chip microcomputer controls the address selection ports A, B, and C of ADC0809 through P1.0, P1.1, and P1.2. The single-chip microcomputer ALE port outputs a 2MHz clock frequency signal, which is passed through the 74LS74 four-frequency division circuit to generate the 500kHz clock signal required by ADC0809. P3.4 is used as a chip select signal. When it is low, the NOR gate is opened to allow the write signal to pass through and select a channel of ADC0809 for A/D conversion. The conversion end flag triggers external interrupt 0 through the NOR gate to read the conversion data.
Digital tube display circuit
A three-digit LED digital tube is used to display the liquid level data. 74HC245 is the display driver chip, its input is connected to the P0 port, and its output is connected to the eight pins of the digital tube. The three-segment digital tube is controlled by P2.0, P2.1, and P2.2 respectively. The display circuit of the AT89S51 microcontroller and the digital tube is shown in Figure 8.
Figure 8 Digital tube display circuit
Previous article:Detailed explanation of micro PLC based on AT89C51 single chip microcomputer
Next article:Method of extending interruption of 51 single chip microcomputer
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- GD32307E-START IO analog SPI control RGBLED (03)
- 【GD32E503 Review】+ cJSON Porting Test
- Is one of the two MOS tubes in the step-down switching power supply chip used to replace the diode?
- The NiMH battery charging circuit is relatively complex, and some SMD components cannot be found in the specification sheet.
- Ding~ The weekly evaluation information has been delivered~
- Is there any plugin or function in KEIL or other compilation environment that can help check if there is an error like if ( a=1 )
- Problems with dsp2812 downloading using C2Prog
- EEWORLD University Hall----Computer Vision (Lu Peng, Beijing University of Posts and Telecommunications)
- Why do the 2D lines in the DXF exported from PADS become very thick after opening it in CAD?
- New ways to play with VL53Lxx time-of-flight sensors