Dears,
Hi, I´m making “Silence Detector”. A analog Audio signal is useing as input.
I need to read the analog input with the condition if no sound for “X” period of time the input turns on a led and buzzer should work as alarm in that time.
Sorry, but you are approaching this from the wrong end! You need to define what you will accept as silence, no sound, and then build up the ability to detect this level. THERE IS ALWAYS SOUND!
You will need to find a microphone and a low noise amplifier to fit your definition, then you can apply your Arduino to read the output of the amplifier and report on the sound level. Then you can decide what to do when your level is reached.
Good luck with the project.
Paul
Audio signals alternate between positive and negative voltages. The negative voltages will damage the Arduino.
Even if you remove the negative part of the audio signal, the frequencies present in the signal are too high for the digital converter inside an Arduino to deal with.
You need to use a an "envelope follower" circuit to change the audio signal into a positive voltage which represents the volume of the audio signal. The output of that circuit can be connected to an Arduino analog input.
Clip the negative portion of the signal, limit the peaks to 5V, charge a cap with the remaining signal, read the cap charge with the A:D, and when the cap charge is below a threshold do the thing.