Light sense detection circuit based on operational amplifier
Technical Field
The invention relates to a light sensation detection circuit based on an operational amplifier.
Background
The conventional light sensing detection circuit compares the voltage of the photodiode with a reference voltage through a comparator, and outputs a detection signal when the photodiode is shielded. When the detection method detects the passing of the pedestrian, if the pedestrian is simultaneously shielded by a certain static object, the detection result is interfered.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides an operational amplifier-based light sensing detection circuit for detecting an alternating current signal. The light sensation detection circuit based on the operational amplifier only detects the alternating current signal through the coupling capacitor, so that the interference caused by shielding of a static object can be avoided, and the detection accuracy is improved when the pedestrian is detected to pass.
Therefore, the invention also discloses a method for detecting the alternating current optical signal by using the light sensation detection circuit.
In order to solve the technical problems, the invention provides the following technical scheme:
a light sensing detection circuit based on an operational amplifier is characterized by comprising a photosensitive diode, an NMOS tube, five resistors, three capacitors, two operational amplifiers and a Schmitt trigger.
The positive end of the photosensitive diode is connected with the input voltage Vin, and the negative end of the photosensitive diode is connected with the node P1;
the drain electrode of the NMOS tube is connected with one end of a resistor R1, the grid electrode of the NMOS tube is connected with a control signal CE, and the source electrodes of the NMOS tube and the substrate are connected and are all grounded;
one end of the resistor R1 is connected with the node P1, and the other end is connected with the drain electrode of the NMOS tube;
one end of the resistor R2 is connected with the node P2, and the other end is grounded;
one end of the resistor R3 is connected with the node P3, and the other end is connected with the node P2;
one end of the resistor R4 is connected with the node P4, and the other end is grounded;
one end of the resistor R5 is connected with the node P5, and the other end is connected with the node P4;
one end of the capacitor C1 is connected with the node P1, and the other end is grounded;
one end of the capacitor C2 is connected with the node P1, and the other end is connected with the non-inverting input end of the operational amplifier A1;
one end of the capacitor C3 is connected with the node P5, and the other end is connected with the node P4;
the non-inverting input of the operational amplifier A1 is connected with one end of the capacitor C2, the inverting input is connected with the node P2, and the output is connected with the node P3;
the non-inverting input of the operational amplifier A2 is connected with the node P3, the inverting input is connected with the node P4, and the output is connected with the node P5;
the input end of the Schmitt trigger A3 is connected with a node P5, and the output end is connected with the output Vout;
the resistance satisfies R3/R2-6/1, and R5/R4-320/1.
The work detection method of the light sensation detection circuit based on the operational amplifier comprises the following steps:
the input voltage Vin is about 5V, and the voltage drop of the photodiode is different when the photodiode is illuminated or not illuminated, so that the current flowing through the photodiode is different. Only when the light condition received by the photosensitive diode changes, alternating current is generated on the photosensitive diode. The coupling capacitor C2 can filter the dc current flowing through the photodiode, and only the ac current on the photodiode can pass through the coupling capacitor C2.
The resistor R1 is a current-limiting resistor to prevent the current flowing through the photodiode from being too large to burn the photodiode; the capacitor C1 is used for filtering circuit noise; the gate of the NMOS transistor N1 is controlled by an external CE pin, and when CE is equal to 1, the circuit operates, and when CE is equal to 0, the circuit stands by.
The AC current on the photosensitive diode can generate about 1mV voltage at the non-inverting input terminal of the operational amplifier A1 after passing through the coupling capacitor C2; on the contrary, when there is no current on the coupling capacitor C2, the voltage at the non-inverting input terminal of the operational amplifier a1 is 0V. The two-stage operational amplifiers A1 and A2 are connected by an in-phase proportional operational circuit.
The capacitor C3 has the function of high-pass filtering, can avoid high-frequency oscillation, eliminates self-excitation and has the function of phase compensation.
The operational amplifiers A1 and A2 can realize low-power consumption operation, and the quiescent current does not exceed 7 muA during operation.
Amplification factor A of two-stage operational amplifiers A1 and A2V1And AV2Respectively as follows:
when the input end of the operational amplifier A1 is 1mV, the output V of the two-stage operational amplifierP5Comprises the following steps:
VP5=AV1·AV2·VinA1=7×321×1mV=2.247V
when the input terminal of the operational amplifier A1 is 0V, the output V of the two-stage operational amplifierP5Comprises the following steps:
VP5=0V
after being shaped by the Schmitt trigger A3, the voltage of the input end of the Schmitt trigger with the voltage more than 2V can be converted into high level 5V, and when the input end of the Schmitt trigger is 0V, the output end of the Schmitt trigger is also low level 0V. Whether a pedestrian passes through can be judged according to the voltage value of the output end of the Schmitt trigger: when the output end of the Schmitt trigger is 5V, a pedestrian passes through the Schmitt trigger; when the output end of the Schmitt trigger is 0V, no pedestrian passes through.
Drawings
FIG. 1 is a circuit diagram of an embodiment of an operational amplifier-based photo sensing circuit according to the present invention.
FIG. 2 is a timing diagram of an embodiment of the light sensing circuit based on operational amplifier according to the present invention.
Detailed Description
Referring to fig. 1, a specific circuit structure of a light sensing circuit based on an operational amplifier according to an embodiment of the present invention includes a photodiode, an NMOS transistor, five resistors, three capacitors, two operational amplifiers, and a schmitt trigger.
The positive end of the photosensitive diode is connected with the input voltage Vin, and the negative end of the photosensitive diode is connected with the node P1;
the drain electrode of the NMOS tube is connected with one end of a resistor R1, the grid electrode of the NMOS tube is connected with a control signal CE, and the source electrodes of the NMOS tube and the substrate are connected and are all grounded;
one end of the resistor R1 is connected with the node P1, and the other end is connected with the drain electrode of the NMOS tube;
one end of the resistor R2 is connected with the node P2, and the other end is grounded;
one end of the resistor R3 is connected with the node P3, and the other end is connected with the node P2;
one end of the resistor R4 is connected with the node P4, and the other end is grounded;
one end of the resistor R5 is connected with the node P5, and the other end is connected with the node P4;
one end of the capacitor C1 is connected with the node P1, and the other end is grounded;
one end of the capacitor C2 is connected with the node P1, and the other end is connected with the non-inverting input end of the operational amplifier A1;
one end of the capacitor C3 is connected with the node P5, and the other end is connected with the node P4;
the non-inverting input of the operational amplifier A1 is connected with one end of the capacitor C2, the inverting input is connected with the node P2, and the output is connected with the node P3;
the non-inverting input of the operational amplifier A2 is connected with the node P3, the inverting input is connected with the node P4, and the output is connected with the node P5;
the input end of the Schmitt trigger A3 is connected with a node P5, and the output end is connected with the output Vout;
the resistance satisfies R3/R2-6/1, and R5/R4-320/1.
The work detection method of the light sensation detection circuit based on the operational amplifier comprises the following steps:
the input voltage Vin is about 5V, and the voltage drop of the photodiode is different when the photodiode is illuminated or not illuminated, so that the current flowing through the photodiode is different. Only when the light condition received by the photosensitive diode changes, alternating current is generated on the photosensitive diode. The coupling capacitor C2 can filter the dc current flowing through the photodiode, and only the ac current on the photodiode can pass through the coupling capacitor C2.
The resistor R1 is a current-limiting resistor to prevent the current flowing through the photodiode from being too large to burn the photodiode; the capacitor C1 is used for filtering circuit noise; the gate of the NMOS transistor N1 is controlled by an external CE pin, and when CE is equal to 1, the circuit operates, and when CE is equal to 0, the circuit stands by.
The AC current on the photosensitive diode can generate about 1mV voltage at the non-inverting input terminal of the operational amplifier A1 after passing through the coupling capacitor C2; on the contrary, when there is no current on the coupling capacitor C2, the voltage at the non-inverting input terminal of the operational amplifier a1 is 0V. The two-stage operational amplifiers A1 and A2 are connected by an in-phase proportional operational circuit.
The capacitor C3 has the function of high-pass filtering, can avoid high-frequency oscillation, eliminates self-excitation and has the function of phase compensation.
The operational amplifiers A1 and A2 can realize low-power consumption operation, and the quiescent current does not exceed 7 muA during operation.
Amplification factor A of two-stage operational amplifiers A1 and A2V1And AV2Respectively as follows:
when the input end of the operational amplifier A1 is 1mV, the output V of the two-stage operational amplifierP5Comprises the following steps:
VP5=AV1·AV2·VinA1=7×321×1mV=2.247V
when the input end of the operational amplifier A1 is 0V, the two-stage operational amplifierOutput V of the amplifierP5Comprises the following steps:
VP5=0V
after being shaped by the Schmitt trigger A3, the voltage of the input end of the Schmitt trigger with the voltage more than 2V can be converted into high level 5V, and when the input end of the Schmitt trigger is 0V, the output end of the Schmitt trigger is also low level 0V. Whether a pedestrian passes through can be judged according to the voltage value of the output end of the Schmitt trigger: when the output end of the Schmitt trigger is 5V, a pedestrian passes through the Schmitt trigger; when the output end of the Schmitt trigger is 0V, no pedestrian passes through.
The above are merely preferred embodiments of the present invention, and are not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.