Voice Amplitude Activated Alarm Clock

Hi Arduino Forum! I'm actually quite new to Arduino twinkering and I had a project in mind that I wanted to bring to life. I recently bought an Arduino Uno and wanted to make an alarm clock that would prompt the user in the morning to shout at a certain volume in order to prevent the alarm from going off. If you don't shout within the given time from (i.e. 10 seconds), the alarm would sound and the user would have to get up physically to shut it off.

I've already gotten a Wave Shield from Adafruit for the audio interface and I plan on storing voice samples for the user prompt in the SD card. I also acquired an Electret Microphone MAX4466 for the analog input and have been able to measure voltage levels to determine the appropriate threshold needed to turn the alarm off. I also just got the DS1307 Real Time Clock in the mail to hook up to keep time.

My feasibility questions are:

  • Is there some way to have the Arduino on at all times and then when the Real Time Clock sense that the time is, for example, 6:30 AM, a sketch or function would run to activate the user prompt?
  • Is there a way to link sketches (like would I use the #include feature?) so when I prompt the user to input a shout, the microphone would then be active to listen for analog input?
  • Is there a way to listen for input for 10 seconds (or any given amount of time) and then if the threshold is not met, the function defaults to the alarm being played?

Thank you for reading this far! This is my first ever Arduino project and I just want to make sure I'm headed on the right track. If any help or pointers are available, that would be great.

Many of the microphone plugin boards have adjustable thresholds so you can set it to how loud you want it to trigger. You then just look for a digital input to change.

The Arduino needs to be powered on for it to work. It can be left on indefinitely.

Most RTCs have an alarm output.

Your program ignores the mic output until you want it to respond.

Your program waits for the specified time for the mic then goes to the default alarm.

Weedpharma

Thanks for the advice! I'll take a look at the RTC library and play around with the functions and see if I can query the time and have that activate a certain event. It's all a matter of piecing the mic, RTC, and audio output together in order to have a working alarm clock.

There are a number of simple little real time clock chips out there, which operate at very low power, like a few microamps. These can keep time, while the rest of an arduino is put to sleep, thereby preserving battery, and the clock chip can then wake the arduino via interrupt to run its code. If you want low power, and a good way to prevent false alarms to the microphone, give such a design some thought.