Hello!
I am in the making of a PIR (passive infrared) sensor which will detect human motion. It is for my final project.
It consists of three parts: a PIR sensor, amplifier and a comparator. I don't want to bother you (yet) with the whole design. For now I have a question about the comparator part.
I have attached two images. In one of them I use LM358 op amp as a comparator, and in the other LM393 (open-collector) comparator.
Vcc is 12 V in both cases. The input signal comes from the SenzorOutput line which carries the amplified signal from the PIR senzor. It can vary from 0 to 12 volts but in a steady state it is 4 V. Values for the resistors R12, R13 and R14 have been chosen to detect a signal which is higher than 6 V and lower than 2 V. The TRIG line is connected to the TRIGGER pin of the 555 timer. So you can see that I want to trigger the 555 when the signal goes above 6 and below 2 volts. I've read on the Internet that to trigger a 555 you need to go below Vcc/3 and that TRIGGER pin shouldn't be held low for too long. I realize that we need capacitors to accomplish that. When the output signal from one of the op amps (comparators) goes from Vcc to 0 a negative impulse is created and since we have some sort of a differentiator circuit on the right a negative spike is created. Because of the spike the voltage on the TRIG line should decrease. In the ideal case it should fall to 0 V.
Now here comes the fun stuff. When I use a LM358 in the design the 555 doesn't get triggered. But when I use LM393 it triggers just fine. A simulation program (LT Spice IV) predicted this. I used different models in the simulation, LT(something) OP AMP and an LT(something) COMPARATOR but I think that is irrelevant. I also measured the signals with the oscilloscope and saw that when using the LM358 the generated spike is lower in magnitude than the LM393 spike and it doesn't reach the desired 12/3 = 4 V.
How can you explain this effect? I guess it has something to do about LM358 and LM393 circuitry but I can't figure it out. If I replace LM358 with some other dual op amp (LM747) will it make any difference?
I was advised to use LM747 in the design and NOT the LM393.
Thanks for reading.
EDIT: The following text should have been in this first post when I started the thread so I am just copy-pasting it from the second page. The text explains my second problem in this circuit.
So here is the whole thing:
The amplifier part of the circuit and the values are from the datasheet application example. I added the comparator and the 555.
So let's start from the left.
The FET_N thing is the sensor IRA-E710ST. It is modeled as a FET with some extra stuff connected to the gate but that is not important. R1 (10k) connected to the Vcc (12 V) is there for safety reasons. The DC value for the Source is approximately 1 V. When the sensor is powered up it registers changes in temperature, that is infrared radiation. So when you move your arm in front of it small signals are generated at the Source. The idea is to amplify them. The band pass should be between 0.22 Hz and 10 Hz.
R3 and C1 make an integrator with the cutoff frequency 16 Hz. After the integrator comes the first order active band pass filter (non inverting). Voltage at the non inverting input is 1 V from the Source plus the small generated signals. Voltage at the inverting input should go from 0 volts (when we start up this whole circuit) and stop at the 1 V. But it doesn't!!! I am not a great expert in op amps and I have studied negative feedback. And since we have connected the output to the inverting input we have a negative feedback. So after some time v+ and v- should be almost equal. Am I correct?
But what happens is that v+ goes over 1 V and the first op amp saturates. So at the output I have 12 V. That messes up the second stage (op amp) so the whole thing doesn't work. Am I missing something? Is there a possibility of oscillation or positive feedback in this circuit?
I have to emphasize that this is the SECOND time I am constructing this part of the circuit on the breadboard (don't ask why, please). First time (couple of months ago) this worked perfectly.
Here is the simulation. After you start it up it should look like this.
1st_INVERTING is the inverting input of the first op amp and 1st_OUTPUT is the output. Voltage at the inverting input should settle down at around 1 V. After that the output should go down to 1 V also because for DC values op amps act as voltage followers.
I am in the making of a PIR (passive infrared) sensor which will detect human motion. It is for my final project.
It consists of three parts: a PIR sensor, amplifier and a comparator. I don't want to bother you (yet) with the whole design. For now I have a question about the comparator part.
I have attached two images. In one of them I use LM358 op amp as a comparator, and in the other LM393 (open-collector) comparator.
Vcc is 12 V in both cases. The input signal comes from the SenzorOutput line which carries the amplified signal from the PIR senzor. It can vary from 0 to 12 volts but in a steady state it is 4 V. Values for the resistors R12, R13 and R14 have been chosen to detect a signal which is higher than 6 V and lower than 2 V. The TRIG line is connected to the TRIGGER pin of the 555 timer. So you can see that I want to trigger the 555 when the signal goes above 6 and below 2 volts. I've read on the Internet that to trigger a 555 you need to go below Vcc/3 and that TRIGGER pin shouldn't be held low for too long. I realize that we need capacitors to accomplish that. When the output signal from one of the op amps (comparators) goes from Vcc to 0 a negative impulse is created and since we have some sort of a differentiator circuit on the right a negative spike is created. Because of the spike the voltage on the TRIG line should decrease. In the ideal case it should fall to 0 V.
Now here comes the fun stuff. When I use a LM358 in the design the 555 doesn't get triggered. But when I use LM393 it triggers just fine. A simulation program (LT Spice IV) predicted this. I used different models in the simulation, LT(something) OP AMP and an LT(something) COMPARATOR but I think that is irrelevant. I also measured the signals with the oscilloscope and saw that when using the LM358 the generated spike is lower in magnitude than the LM393 spike and it doesn't reach the desired 12/3 = 4 V.
How can you explain this effect? I guess it has something to do about LM358 and LM393 circuitry but I can't figure it out. If I replace LM358 with some other dual op amp (LM747) will it make any difference?
I was advised to use LM747 in the design and NOT the LM393.
Thanks for reading.
EDIT: The following text should have been in this first post when I started the thread so I am just copy-pasting it from the second page. The text explains my second problem in this circuit.
So here is the whole thing:
The amplifier part of the circuit and the values are from the datasheet application example. I added the comparator and the 555.
So let's start from the left.
The FET_N thing is the sensor IRA-E710ST. It is modeled as a FET with some extra stuff connected to the gate but that is not important. R1 (10k) connected to the Vcc (12 V) is there for safety reasons. The DC value for the Source is approximately 1 V. When the sensor is powered up it registers changes in temperature, that is infrared radiation. So when you move your arm in front of it small signals are generated at the Source. The idea is to amplify them. The band pass should be between 0.22 Hz and 10 Hz.
R3 and C1 make an integrator with the cutoff frequency 16 Hz. After the integrator comes the first order active band pass filter (non inverting). Voltage at the non inverting input is 1 V from the Source plus the small generated signals. Voltage at the inverting input should go from 0 volts (when we start up this whole circuit) and stop at the 1 V. But it doesn't!!! I am not a great expert in op amps and I have studied negative feedback. And since we have connected the output to the inverting input we have a negative feedback. So after some time v+ and v- should be almost equal. Am I correct?
But what happens is that v+ goes over 1 V and the first op amp saturates. So at the output I have 12 V. That messes up the second stage (op amp) so the whole thing doesn't work. Am I missing something? Is there a possibility of oscillation or positive feedback in this circuit?
I have to emphasize that this is the SECOND time I am constructing this part of the circuit on the breadboard (don't ask why, please). First time (couple of months ago) this worked perfectly.
Here is the simulation. After you start it up it should look like this.
1st_INVERTING is the inverting input of the first op amp and 1st_OUTPUT is the output. Voltage at the inverting input should settle down at around 1 V. After that the output should go down to 1 V also because for DC values op amps act as voltage followers.
Last edited: