Disclosure of Invention
The utility model aims to solve the technical problem that not enough to above-mentioned prior art provides a RLC detector based on singlechip, and this RLC detector based on singlechip can measure and the phase comparison load circuit's voltage and current, judges the type and the size of load and the topological structure of load to through LED liquid crystal display. The circuit works reliably, the measured data is accurate, and the circuit can be applied to the detection of various components such as resistors, capacitors and inductors.
In order to realize the technical purpose, the utility model discloses the technical scheme who takes does:
an RLC detector based on a singlechip comprises a singlechip minimum system circuit, an AD9833 signal generator circuit, a TDA2030 power amplification circuit, a voltage acquisition circuit, a current acquisition circuit, a CS5464 measurement circuit, a voltage zero-crossing comparison circuit, a current zero-crossing comparison circuit and a liquid crystal display circuit, the AD9833 signal generator circuit is connected with the TDA2030 power amplification circuit, the TDA2030 power amplification circuit is simultaneously connected with the voltage acquisition circuit and the current acquisition circuit, the voltage acquisition circuit and the current acquisition circuit are both connected with the CS5464 measurement circuit, the voltage acquisition circuit is connected with the voltage zero-crossing comparison circuit, the current acquisition circuit is connected with the current zero-crossing comparison circuit, the AD9833 signal generator circuit, the CS5464 measurement circuit, the voltage zero-crossing comparison circuit and the current zero-crossing comparison circuit are all connected with the single chip microcomputer minimum system circuit, and the single chip microcomputer minimum system circuit is connected with the liquid crystal display circuit.
As a further improved technical solution of the present invention, the minimum system circuit of the single chip microcomputer includes an STC12C5a60S2 single chip microcomputer U3, a reset circuit and a clock circuit, the reset circuit includes a capacitor C1 and a resistor R4, the clock circuit includes a capacitor C3, a capacitor C6 and a crystal oscillator Y2, a pin 9 of the STC12C5a60S2 single chip microcomputer U3 is simultaneously connected with the resistor R4 and the capacitor C1, the other end of the resistor R4 is connected with a ground wire, the other end of the capacitor C1 is connected with a power VCC, a pin 18 of the STC12C5a60S2 single chip microcomputer U3 is simultaneously connected with one end of the crystal oscillator Y2 and the capacitor C3, a pin 19 of the STC12C5a60S2 single chip microcomputer U3 is simultaneously connected with the other end of the crystal oscillator Y2 and the capacitor C6, and the other ends of the capacitor C3 and the capacitor C; and a pin 40 of the STC12C5A60S2 singlechip U3 is connected with a power supply VCC, and a pin 20 is connected with a ground wire.
The technical solution of the present invention is further improved in that the AD9833 signal generator circuit includes an AD9833 signal generator U5, pin 1 of the AD9833 signal generator U5 is connected to the VCC power supply, pin 2 is connected to the TDA2030 power amplifier circuit, pin 3 of the AD9833 signal generator U5 is connected to the ground, pin 5 of the AD9833 signal generator U5 is connected to pin 8 of the STC12C5a60S2 single chip microcomputer U3, pin 6 of the AD9833 signal generator U5 is connected to pin 7 of the STC12C5a60S2 single chip microcomputer U3, pin 7 of the AD9833 signal generator U5 is connected to pin 6 of the STC12C5a60S2 single chip microcomputer U3, and pin 8 of the AD9833 signal generator U5 is connected to pin 5 of the STC12C5a60S 2U 3 single chip microcomputer.
As the utility model discloses further modified technical scheme TDA2030 power amplifier circuit includes TDA2030 amplifier J2, and TDA2030 amplifier J2's pin 1 is connected with AD9833 signal generator U5's pin 2, and TDA2030 amplifier J2's pin 2 and pin 4 all connect the ground wire, and TDA2030 amplifier J2's pin 3 is used for being connected with by the test element, is connected with voltage acquisition circuit and current acquisition circuit respectively by the test element.
As a further improved technical scheme of the utility model the current acquisition circuit includes resistance RC1, resistance RC2, resistance R10, resistance R11 and resistance R15, resistance RC1 one end is used for being connected with the measured component, and the other end is connected with resistance RC2, resistance R10, resistance R11 and current zero-crossing comparison circuit respectively, the ground wire is all connected to the resistance RC2 other end, the resistance R11 other end and resistance R15's one end, and the resistance R10 other end and the resistance R15 other end all measure circuit connection with CS 5464.
The current zero-crossing comparison circuit as a further improved technical solution of the present invention comprises a resistor R16, a resistor R17, a resistor R18, a resistor R19, a sliding rheostat RP1, a diode D3, an LM324 chip U6 and an LM324 chip U7, one end of the resistor R16 is connected with one end of a resistor RC1 of the current collection circuit, the other end of the resistor R16 is connected with a pin 5 of the LM324 chip U6, a pin 6 of the LM324 chip U6 is connected with one end of a resistor R19 and a sliding rheostat RP1 respectively, the other end of the resistor R19 is connected with a ground wire, the other end and the sliding end of the sliding rheostat RP1 are connected with a pin 7 of the LM324 chip U6, a pin 7 of the LM324 chip U6 is connected with the resistor R6, the other end of the resistor R6 is connected with a pin 10 of the LM324 chip U6, a pin 9 of the LM324 chip U6 is connected with a ground wire, a pin 8 of the chip U6 is connected with a cathode of the diode D6 and, the other end of the resistor R18 is connected with a pin 13 of the U3 of the STC12C5A60S2 singlechip.
The utility model discloses a further improved technical scheme voltage acquisition circuit includes resistance R7, resistance R13, resistance R9, resistance R14, electric capacity C7, electric capacity C8 and electric capacity C9, resistance R7's one end respectively with TDA2030 amplifier J2's pin 3, by test element and voltage zero crossing comparison circuit connection, resistance R7 other end respectively with resistance R9 one end, resistance R13 one end, electric capacity C7 one end, electric capacity C8 one end and CS5464 measuring circuit connection, resistance R9 other end respectively with resistance R14 one end, ground wire, electric capacity C7 other end and electric capacity C9 one end connection, the resistance R13 other end, the resistance R14 other end, the electric capacity C9 other end and the electric capacity C8 other end all are connected with the ground wire.
As the utility model discloses further modified technical scheme voltage zero cross comparison circuit includes resistance R1, resistance R2, resistance R3, diode D1 and LM324 chip U2, resistance R1 one end is connected with voltage acquisition circuit, the resistance R1 other end is connected with resistance R3 one end and LM324 chip U2 'S pin 3 respectively, the ground wire is all connected to the resistance R3 other end and LM324 chip U2' S pin 2, LM324 chip U2 'S pin 1 is connected with diode D1' S negative pole and resistance R2 one end respectively, diode D1 'S positive pole is connected the ground wire, the resistance R2 other end is connected with STC12C5A60S2 singlechip U3' S pin 12.
As a further improved technical scheme of the utility model, the CS5464 measuring circuit comprises a CS5464 chip U4, pin 1 of the CS5464 chip U4 is respectively connected with one end of a crystal oscillator Y1 and one end of a capacitor C2, pin 28 of the CS5464 chip U4 is respectively connected with the other end of the crystal oscillator Y1 and one end of the capacitor C4, the other ends of the capacitor C2 and the capacitor C4 are both connected with a ground wire, pin 3 of the CS5464 chip U4 is respectively connected with a power supply VCC and one end of the capacitor C5, the other end of the capacitor C5 is connected with a ground wire, pin 4, pin 7, pin 8, pin 10, pin 13, pin 14 and pin 17 of the CS5464 chip U4 are all connected with a ground wire, pin 9 of the CS5464 chip U4 is connected with a resistor R7 of a voltage acquisition circuit, pin 11 and pin 12 of the CS5464 chip U4 are both connected with a capacitor C10, the other end of the capacitor C10 is connected with a ground wire, pin 18 of the CS 5464U 4 is respectively connected with a power supply VCC and one end of the capacitor C5424, and one end of the resistor R599, pin 20 of a CS5464 chip U4 is connected with one end of a resistor R10 of the current acquisition circuit, pin 21 of the CS5464 chip U4 is connected with one ends of a resistor R6 and a resistor R8 respectively, the other end of the resistor R6 is connected with a power VCC, the other end of the resistor R8 is connected with a ground wire, pin 23 of a CS5464 chip U4 is connected with pin 25 of an STC12C5a60S2 singlechip U3, pin 27 of a CS5464 chip U4 is connected with pin 26 of an STC12C5a60S2 singlechip U3, pin 6 of a CS5464 chip U4 is connected with pin 27 of an STC12C5a60S 2U 3, and pin 5 of a CS5464 chip U4 is connected with pin 28 of an STC12C5a60S2 singlechip U3.
As the utility model discloses further modified technical scheme the liquid crystal display circuit includes LCD12864 display screen U1 and exclusion B1, STC12C5A60S2 singlechip U3 'S pin 32 all is connected with exclusion B1 and LCD12864 display screen U1 to pin 39, and exclusion B1 connects the power VCC, STC12C5A60S2 singlechip U3' S pin 21 all is connected with LCD12864 display screen U1 to pin 24, and LCD12864 display screen U1 'S pin 1 and pin 20 all connect the ground wire, and LCD12864 display screen U1' S pin 2 and pin 19 all connect the power VCC.
The utility model has the advantages that: the utility model discloses mainly calculate the type (such as resistance, electric capacity or inductance), size and topological structure of load through measuring load voltage, electric current, power factor and voltage electric current's phase relation. The minimum system circuit of the single chip microcomputer adopts an STC12C5A60S2 single chip microcomputer as a main controller to finish the acquisition and processing of signals. The voltage acquisition circuit acquires the voltage across the load (i.e., the device under test). The current acquisition circuit acquires currents at two ends of the load. The CS5464 measuring circuit is mainly used for collecting related power parameters such as voltage, current, power factor and the like. The AD9833 signal generator circuit can accurately generate alternating current sinusoidal voltage signals with amplitude of +5V and adjustable frequency. The TDA2030 power amplification circuit performs power amplification on the generated +5V signal through the TDA2030 module. The LCD liquid crystal display circuit mainly completes the display of necessary information. The voltage zero-crossing comparison circuit and the current zero-crossing comparison circuit utilize an operational amplifier to form a phase comparison circuit so as to judge the phase relation of voltage and current and calculate the power factor angle. The utility model has good anti-interference performance, stable work, rapid detection, accurate measurement and accurate judgment of topological structure; the reading is convenient, and the method can be applied to the detection of various components such as resistors, capacitors and inductors.
Detailed Description
The following further description of embodiments of the present invention is made with reference to fig. 1 to 2:
as shown in figure 1, the RLC detector based on the single chip microcomputer comprises a minimum system circuit of the single chip microcomputer, an AD9833 signal generator circuit, a TDA2030 power amplification circuit, a voltage acquisition circuit, a current acquisition circuit, a CS5464 measurement circuit, a voltage zero-crossing comparison circuit, a current zero-crossing comparison circuit and a liquid crystal display circuit, the AD9833 signal generator circuit is connected with the TDA2030 power amplification circuit, the TDA2030 power amplification circuit is simultaneously connected with the voltage acquisition circuit and the current acquisition circuit, the voltage acquisition circuit and the current acquisition circuit are both connected with the CS5464 measurement circuit, the voltage acquisition circuit is connected with the voltage zero-crossing comparison circuit, the current acquisition circuit is connected with the current zero-crossing comparison circuit, the AD9833 signal generator circuit, the CS5464 measurement circuit, the voltage zero-crossing comparison circuit and the current zero-crossing comparison circuit are all connected with the single chip microcomputer minimum system circuit, and the single chip microcomputer minimum system circuit is connected with the liquid crystal display circuit.
The AD9833 signal generator circuit of this embodiment is used as a signal source, and is amplified by the TDA2030 power amplifying circuit to drive a load, and a CS5464 measuring circuit, a liquid crystal display circuit, a voltage zero-crossing comparison circuit, a current zero-crossing comparison circuit, and the like are designed, and through these circuits, voltage and current of the load circuit can be measured and compared in phase to determine the type and size of the load and the topological structure of the load, and are displayed by the LED liquid crystal.
As shown in fig. 2, the minimum system circuit of the single chip microcomputer includes an STC12C5a60S2 single chip microcomputer U3, a reset circuit and a clock circuit, the reset circuit includes a capacitor C1 and a resistor R4, the clock circuit includes a capacitor C3, a capacitor C6 and a crystal oscillator Y2, a pin 9 of the STC12C5a60S2 single chip microcomputer U3 is simultaneously connected with the resistor R4 and the capacitor C1, the other end of the resistor R4 is connected with a ground, the other end of the capacitor C1 is connected with a power source VCC, a pin 18 of the STC12C5a60S2 single chip microcomputer U3 is simultaneously connected with one end of the crystal oscillator Y2 and the capacitor C3, a pin 19 of the STC12C5a60S2 single chip microcomputer U3 is simultaneously connected with the other end of the crystal oscillator Y2 and the capacitor C6, and the other ends of the capacitor C3 and the capacitor; and a pin 40 of the STC12C5A60S2 singlechip U3 is connected with a power supply VCC, and a pin 20 is connected with a ground wire. Wherein J1 is a burning port. The power VCC in the power indicating circuit is connected with the resistor R5, the resistor R5 is connected with the ground wire through the light emitting diode D2, and the light emitting diode D2 is a power indicator lamp.
In the minimum system circuit of the single chip microcomputer, STC12C5A60S2 is used as a CPU of the whole system to complete calculation, processing and transmission of data. The power-on reset function is realized through a 10uF capacitor C1 and a 10K resistor R4. A clock circuit is provided for the single chip microcomputer through crystal oscillators Y2 of capacitors C3, C6 and 12M.
As shown in fig. 2, the AD9833 signal generator circuit includes an AD9833 signal generator U5, pin 1 of the AD9833 signal generator U5 is connected to a power VCC, pin 2 is connected to a TDA2030 power amplification circuit, pin 3 of the AD9833 signal generator U5 is connected to a ground, pin 5 of the AD9833 signal generator U5 is connected to pin 8 of an STC12C5a60S2 singlechip U3, pin 6 of the AD9833 signal generator U5 is connected to pin 357 of an STC12C5a60S2 singlechip U3, pin 7 of the AD9833 signal generator U5 is connected to pin 6 of an STC12C5a60S2 singlechip U3, and pin 8 of the AD9833 signal generator U5 is connected to pin 5 of an STC12C5a60S2 singlechip U3.
In the AD9833 signal generation module circuit, the module is connected with the ports P1.4, P1.5, P1.6 and P1.7 of the singlechip, the signal generation module is controlled by the singlechip to generate a standard sine wave with the amplitude of 5V and the frequency of 1KHZ, and then the standard sine wave is sent to the TDA2030 for power amplification.
As shown in FIG. 2, the TDA2030 power amplifying circuit comprises a TDA2030 amplifier J2, wherein pin 1 of the TDA2030 amplifier J2 is connected with pin 2 of an AD9833 signal generator U5, pin 2 and pin 4 of the TDA2030 amplifier J2 are both connected with a ground line, pin 3 of the TDA2030 amplifier J2 is used for being connected with a tested element, and the tested element is respectively connected with a voltage collecting circuit and a current collecting circuit.
In the TDA2030 power amplification circuit, a signal input port is connected with an output signal of the AD9833, and the output signal is power-amplified to output a standard sine wave with an amplitude of +5V and a frequency of 1KHZ, which is responsible for supplying power to a load circuit (i.e., a tested impedance in the figure) and detecting a voltage acquisition circuit. The tested element in the load circuit of this embodiment may be one of three components, namely, a resistor, a capacitor and an inductor, or a combination of two of the three components, namely, the resistor, the capacitor and the inductor, or a combination of three components, namely, a resistor R12, a capacitor Xc1 and an inductor XL1 in fig. 2.
As shown in fig. 2, the current collection circuit includes a resistor RC1, a resistor RC2, a resistor R10, a resistor R11, and a resistor R15, one end of the resistor RC1 is used for being connected to a tested element, the other end of the resistor RC1 is respectively connected to a resistor RC2, a resistor R10, a resistor R11, and a current zero-crossing comparison circuit, the other end of the resistor RC2, the other end of the resistor R11, and one end of the resistor R15 are all connected to a ground, and the other end of the resistor R10 and the other end of the resistor R15 are all connected to a CS5464 measurement.
In the current acquisition circuit, a current signal is converted into a voltage signal through a resistor RC1, a resistor RC2, a resistor R10, a resistor R11 and a resistor R15, and then the voltage signal is sent to the CS5464 for processing.
As shown in fig. 2, the voltage acquisition circuit includes a resistor R7, a resistor R13, a resistor R9, a resistor R14, a capacitor C7, a capacitor C8, and a capacitor C9, one end of the resistor R7 is connected to the pin 3 of the TDA2030 amplifier J2, the device under test, and the zero-crossing voltage comparison circuit, the other end of the resistor R7 is connected to one end of the resistor R9, one end of the resistor R13, one end of the capacitor C7, one end of the capacitor C8, and the CS5464 measurement circuit, the other end of the resistor R9 is connected to one end of the resistor R14, the ground line, the other end of the capacitor C7, and one end of the capacitor C9, and the other end of the resistor R13, the other end of the resistor R14, the other end of the.
In the voltage acquisition circuit, the voltage is firstly divided by resistors R7 and R13, acquired voltage signals are conditioned by resistors R9 and R14 and capacitors C7, C8 and C9, and then the conditioned voltage signals are sent to CS5464 for processing.
As shown in fig. 2, the current zero-crossing comparison circuit includes a resistor R16, a resistor R17, a resistor R18, a resistor R19, a sliding resistor RP1, a diode D3, an LM324 chip U6 and an LM324 chip U7, one end of the resistor R16 is connected with one end of a resistor RC1 of the current acquisition circuit, the other end of the resistor R16 is connected with a pin 5 of an LM324 chip U6, a pin 6 of the LM324 chip U6 is connected with one end of a resistor R19 and one end of a slide rheostat RP1 respectively, the other end of the resistor R19 is connected with the ground wire, the other end and the sliding end of the slide rheostat RP1 are connected with a pin 7 of the LM324 chip U6, a pin 7 of the LM324 chip U6 is connected with a resistor R17, the other end of the resistor R17 is connected with a pin 10 of the LM324 chip U7, a pin 9 of the LM324 chip U7 is connected with the ground wire, a pin 8 of the LM324 chip U7 is connected with the cathode of a diode D3 and one end of a resistor R18 respectively, the anode of the diode D3 is connected with the ground wire, and the other end of.
As shown in fig. 2, the voltage zero-crossing comparison circuit includes a resistor R1, a resistor R2, a resistor R3, a diode D1, and an LM324 chip U2, one end of the resistor R1 is connected to the voltage acquisition circuit, the other end of the resistor R1 is connected to one end of the resistor R3 and a pin 3 of the LM324 chip U2, the other end of the resistor R3 and a pin 2 of the LM324 chip U2 are both connected to a ground, a pin 1 of the LM324 chip U2 is connected to a negative electrode of the diode D1 and one end of the resistor R2, a positive electrode of the diode D1 is connected to the ground, and the other end of the resistor R2 is connected to a pin 12 of the STC12C5a60S 2U 3.
In the current zero-crossing comparison circuit, a current signal is amplified by 25 times through an LM324 operational amplifier U6, a slide rheostat RP1 and a resistor R19, the current signal zero-crossing comparison is realized through the LM324 operational amplifier U7, the resistor R18 and a diode D3, and the output end of the current zero-crossing comparison circuit is connected to an interrupt port P3.3 of the single chip microcomputer. In the voltage zero-crossing comparison circuit, a voltage signal is firstly divided by resistors R1 and R3, then zero-crossing comparison is carried out by an LM324 operational amplifier U2 and a diode D1, and the output end of the voltage signal is connected to an interrupt port P3.2 of the single chip microcomputer. By judging the zero-crossing time interval of the voltage and current signals, the phase relation and the power factor angle of the voltage and the current can be calculated.
As shown in fig. 2, the CS5464 measurement circuit includes a CS5464 chip U4, pin 1 of the CS5464 chip U4 is connected to one end of a crystal oscillator Y1 and one end of a capacitor C2, pin 28 of the CS5464 chip U4 is connected to the other end of a crystal oscillator Y1 and one end of a capacitor C4, the other ends of the capacitor C2 and the capacitor C4 are connected to a ground, pin 3 of the CS5464 chip U4 is connected to a power supply VCC and one end of a capacitor C5, the other end of the capacitor C5 is connected to a ground, pin 4, pin 7, pin 8, pin 10, pin 13, pin 14, and pin 17 of the CS5464 chip U4 are connected to a ground, pin 9 of the CS5464 chip U4 is connected to a resistor R7 of a voltage acquisition circuit, pin 11 and pin 12 of the CS5464 chip U4 are connected to a capacitor C10, the other end of the capacitor C10 is connected to a ground, pin 18 of the CS5464 chip U4 is connected to a power supply VCC and one end of a capacitor C11, the other end of the capacitor C599 of the chip U599 is connected, pin 20 of a CS5464 chip U4 is connected with one end of a resistor R10 of the current acquisition circuit, pin 21 of the CS5464 chip U4 is connected with one ends of a resistor R6 and a resistor R8 respectively, the other end of the resistor R6 is connected with a power VCC, the other end of the resistor R8 is connected with a ground wire, pin 23 of a CS5464 chip U4 is connected with pin 25 of an STC12C5a60S2 singlechip U3, pin 27 of a CS5464 chip U4 is connected with pin 26 of an STC12C5a60S2 singlechip U3, pin 6 of a CS5464 chip U4 is connected with pin 27 of an STC12C5a60S 2U 3, and pin 5 of a CS5464 chip U4 is connected with pin 28 of an STC12C5a60S2 singlechip U3.
In the CS5464 measuring circuit, signal processing is mainly carried out through a power chip CS5464, in a peripheral circuit of the CS5464, clock reference is provided for the chip through capacitors C2, C4 and a crystal oscillator Y1, and the capacitors C5, C10 and C11 play a role in filtering and are connected with ports P2.4, P2.5, P2.6 and P2.7 of the single chip microcomputer for data transmission.
As shown in fig. 2, the liquid crystal display circuit includes an LCD12864 display screen U1 and an exclusion B1, pins 32 to 39 of an STC12C5a60S2 single chip microcomputer U3 are connected to an exclusion B1 and an LCD12864 display screen U1, the exclusion B1 is connected to a power VCC, pins 21 to 24 of the STC12C5a60S2 single chip microcomputer U3 are connected to an LCD12864 display screen U1, pin 1 and pin 20 of the LCD12864 display screen U1 are connected to a ground, and pin 2 and pin 19 of the LCD12864 display screen U1 are connected to the power VCC.
In the liquid crystal display circuit, information is mainly displayed through an LCD12864, and a 5.1K exclusion B1 is added to a data port, so that the reliability of data transmission is improved.
As shown in fig. 2, the 4-pin socket J3 is used to connect to a power source and provide power to the rest of the circuitry through switch S1.
The present embodiment calculates the type (such as resistance, capacitance or inductance), size and topology of the load by measuring the load voltage, current, power factor and the phase relationship of the voltage and the current. The minimum system circuit of the single chip microcomputer adopts an STC12C5A60S2 single chip microcomputer as a main controller to finish the acquisition and processing of signals. The voltage acquisition circuit acquires voltages at two ends of the load. The current acquisition circuit acquires currents at two ends of the load. The CS5464 measuring circuit is mainly used for collecting related power parameters such as voltage, current, power factor and the like. The AD9833 signal generator circuit can accurately generate alternating current sinusoidal voltage signals with amplitude of +5V and adjustable frequency. The TDA2030 power amplification circuit performs power amplification on the generated +5V signal through the TDA2030 module. The LCD liquid crystal display circuit mainly completes the display of necessary information. The voltage zero-crossing comparison circuit and the current zero-crossing comparison circuit utilize an operational amplifier to form a phase comparison circuit so as to judge the phase relation of voltage and current and calculate the power factor angle.
Through testing, the detector has the advantages of good anti-interference performance, stable work, rapid detection, accurate measurement and accurate judgment of the topological structure.
Experiments prove that: the system can transmit the experimental result to an LED12864 screen for display in real time, and firstly judges which running state the circuit is in by acquiring voltage, current and power factor: open circuit, short circuit, load, the system can judge the type and size of the tested component rapidly when load. After the three components are measured, the three components can be combined randomly, and the system can rapidly judge the topological structure of the load. The circuit has the advantages of reliable work, accurate measured data, accurate judgment of the topological structure, rapid data measurement and convenient reading, and can be applied to the detection of various components of the resistance capacitance inductor.
The protection scope of the present invention includes but is not limited to the above embodiments, the protection scope of the present invention is subject to the claims, and any replacement, deformation, and improvement that can be easily conceived by those skilled in the art made by the present technology all fall into the protection scope of the present invention.