sound sensor

hello guys this is my first time on using sensor and arduino i just want to ask if it is possible to create a sensor with an arduino that can sense something for a specific time before triggering the output. I want to use a sound detector for my project and i want to set the sound sensor to sense 10 seconds of noise before triggering my output is it possible to do this using code? thanks in advance

Can be done: a mic, an amplifier(rail-to rail op amp), some resistors and software for the arduino.

(… and of course a trains horn and a power plant for it)

really? that's great to hear but what kind of code should i put to my arduino? and what is the best omnidirectional mic that i should use? do u have any suggestion for the microphone? thank you for answering my question :slight_smile:

This is one possible page, showing transistor, and op-amp, solution.
http://www.scienceprog.com/electret-condenser-microphone-amplifier-for-use-in-microcontroller-projects/

The output from the amp is connected, (via a 1k) resistor to an Arduino input (analog or digital)

Your software can monitor this input (and mark the 'times') to determine if the alarm should trigger

knut_ny:
This is one possible page, showing transistor, and op-amp, solution.
http://www.scienceprog.com/electret-condenser-microphone-amplifier-for-use-in-microcontroller-projects/

The output from the amp is connected, (via a 1k) resistor to an Arduino input (analog or digital)

Your software can monitor this input (and mark the 'times') to determine if the alarm should trigger

Good morning knut. i have found a ckt also for the sound sensor is this okay Internet of Things: High Sensitivity Arduino Sound Level Detector as a sensor to be input to my arduino? sorry i have only a little knowledge about electronics and arduino. thank you for helping me out

You have found a solution..