I'm designing a circuit doing role of detecting signal drop from the microphone. This is purposed to do some range test of product. By receiving the signal through the microphone, while receiving the signal, outputs 5V, otherwise outputs 0V.
I'll put the 1Khz sine wave to microphone, amplify the signal and make it to square wave at comparator. Then through peak detector, it keeps that output fixed at 5V while there's signal, and if signal is dropped more than certain period, it goes to 0V.( This period is determined my adjusting the value of peak detector components and current circuit has around 250ms).
In the simulation program, I can get the right and intended result. But in real, sometimes it works well sometimes not. When I stop putting the signal, it sometimes still stays at 5V. So I looked into each part and I figured out that when the output is 5V even without signal, there is voltage rise at R11. So postive input of comparator(U3) is getting higher than negative input and it outputs 5V. But when it works right(no signal and 0v output), there is for sure voltage drop at R11.
I can't seem to find any reason myself and 'm stuck in here for a while.
Can anybody give me any idea or help about that?
P.S. pulse(v3) and Switch(S1) is to give some signal off time. So you don't need to care about it.
I'll put the 1Khz sine wave to microphone, amplify the signal and make it to square wave at comparator. Then through peak detector, it keeps that output fixed at 5V while there's signal, and if signal is dropped more than certain period, it goes to 0V.( This period is determined my adjusting the value of peak detector components and current circuit has around 250ms).
In the simulation program, I can get the right and intended result. But in real, sometimes it works well sometimes not. When I stop putting the signal, it sometimes still stays at 5V. So I looked into each part and I figured out that when the output is 5V even without signal, there is voltage rise at R11. So postive input of comparator(U3) is getting higher than negative input and it outputs 5V. But when it works right(no signal and 0v output), there is for sure voltage drop at R11.
I can't seem to find any reason myself and 'm stuck in here for a while.
Can anybody give me any idea or help about that?
P.S. pulse(v3) and Switch(S1) is to give some signal off time. So you don't need to care about it.