Email notification from coffee maker

Forgive my typos in advance, I'm sitting in a barber shop using my phone.

A couple of days ago I got an email from one of the ladies down the hall telling me the coffee was ready. It occurred to me that I could probably automate this process and receive an alert every time the coffee was ready!

The basics of my idea are this: I'd like to use an arduino connected to WiFi to send an email to me when the coffee maker finishes a pot. The coffee produces 5 beeps upon completion of brewing so I think I'd like to use a microphone to detect the specific frequency of the beep (to avoid false positives from background noise). The arduino would then send out the email.

I have never used an arduino but my initial research indicates WiFi and email isn't an issue, and MUCH more complicated audio tasks have been accomplished. I'm just concerned with interfacing the microphone to the arduino. Like I said, I'd like to detect the actual frequency of the beep to avoid false positives. I have an audio spectrum analyzer app that should identify the beep frequency, I have not done this yet.

What recommendations would you give me on the simplest, yet reliable way of detecting the beep tone using a mic?

Years ago I was quite into basic stamps, so I'm looking forward to this project.

Yes, I know this is ridiculous.



yip it's ridiculous, but, sure you got a smile out of me - should be educational if not entertaining for the first few runs :)

Are you dead set on using a mic? The easiest (but perhaps not as interesting) way would be to tap into the signals that drive the beep itself...

Yeah I'm pretty sure I want to use audio. My worry is liability. If the office burns down I don't want anybody pointing fingers at the guy who hacked into the coffee pot.

I was trying to decide how to sense the full pot some other way but there isn't any illuminated leds that indicateI a completed brewing cycle. I considered some optical way of reading the level of coffee in the pot, but when I remembered the beep I knew that was the ticket! It's quite loud but my office is too far away to hear it.

Thanks for thinking it over with me! --Dan

It is trivial for humans to detect a beep, but not at all so for a microcontroller, especially if there are a lot of other noises in the environment. If you know the beep frequency, an autocorrelation function calculation specific for that frequency is very fast and one of the more reliable methods of detection (much faster and more reliable than spectrum analysis).

You will need a microphone amplifier and a narrow audio bandpass filter as well, before the Arduino is presented with the signal.

Yes, do you have access to a oscilloscope/frequency analyser ?

Hrrrm, could you get away with a just an outboard (second order low or band pass) filter that was resonant at the beep frequency? My guess, yes...

Is it one of those buzzer type beeps? as in apply DC, get beep? Or is it a kind where you can apply AC at x Hz and you get approx x Hz out of it ?

If it's a (cheaper) one frequency only style - is it possible that instead of a purpose bought mic you could use the same speaker type as the beeper from the coffee machine as an inverse transducer, i.e. speaker as a mic. (at a certain level of abstraction there aint much distinction between the two)

Its mechanical characteristics will mean it is already an ideal filter for it's own kind.

Never done this, just thinking out loud.

The coffer maker is going to take a certain amount of time to do its thing. A bit less sometimes. A bit more others. But always within a window of time. Put a big button on your gadget. When the human starts a pot brewing ask that they press the button. After S seconds, where S is approximately the maximum brewing time, send the alert.

If the human does not consistently press the button, cover the coffee maker start button / switch with a servo controlled "poker". In order to start a brew, the human has to press the big button which tells the Arduino to start a brew by manipulating the poker.

If you insist on triggering from the beep, you will need this…

And probably this…

Interesting stuff,

I'm thinking however, we shouldn't throw away the timing characteristics the OP outlined:

'produces 5 beeps upon completion'

... After putting the mic close enough to the speaker there will be five repetitions of known duration LOUD, quiet, LOUD, quiet etc.

That may well be enough deterministic information to discriminate against noise. (incl. the 'noise' of most other possible false positives).

It's more a filter that operates on the sonic/signal envelope over time - that is, combined with a-priori info of the signal patterns.

It's not mission critical stuff - however, I can see the fun in pretending it is ;)

As any young person will tell you, email is so, so old fashioned. Send a text message instead.

jremington: As any young person will tell you, email is so, so old fashioned. Send a text message instead.

Ha, I didn't want to put too many details into the original post, but yes it will be a text message! At the very least, I am going to send the email to (replacing myphonenumber with my actual verizon phone number) to get an SMS message.

I may even create a group in our domain called FRESH-COFFEE or something and then add the appropriate numbers/address for anybody who cared to be in it. Really there is only one other IT guy I know why is both nerdy enough AND drinks enough coffee to be interested. This is mostly for my amusement.


Might be more fun to get a Foscam on ebay and go old school.

one might want to watch the power. upon start, the current will jump to energize the heater. as long was water is present, the heater will stay at some high value once the water is not present, the sensor should start to turn the heater off and on to cycle it.

watch for the power on spike, count 12 minutes, or watch the power on spike,watch for the first interuption. or listen for beeps

Thanks everybody for the comments!

I was just looking around on the forums here and I saw another topic titled "detect a tone" which recommends a LM567C tone decoder that even has a logic output! Using some external components you can set the center frequency and bandwidth. Interesting. This could offload all frequency analysis onto the LM567 and eliminate the need for me to write that portion of code for the arduino. All I would have to write is the code to count the pulses from the LM567C output, and if the timing/count is right send off the email/text.

I'm just thinking out loud here, feel free to comment.


Well, I quite like post #8 if I may say so myself...

It's the most thrifty, the mic can be the cheapest thing you can find - in fact, anything (see post#5) that will react to the beep, and for the most part lots of other noises as well (cheap means this will be a given)...

It's the underlying (and yet very basic) code that will do the filtering.

But it looks like you've got lots of good ideas to pick from, including combinations thereof - go where your interests take you ;)

As it stands right now, I plan on using a TI LM567 Tone Decoder chip, combined with a mic and amp, to provide input to a Yun, which will send the email/text.

If anybody is willing, or just bored, I would LOVE a second opinion on my math. It’s been some time since I read datasheets and performed electronics math.

Today I used an app on my phone to identify the frequency of 5 beeps the coffee maker produces. Most of the beep is at 2045 Hz. The mic and amp I chose should put out approx 200mV.

The LM567 operates using 2 parameters, center frequency and bandwidth. These parameters are set by choosing R1, C1, and C2.

Center Frequency: 2048 Hz
Bandwidth: 4.87%

R1: 5.37k (probably a 5.1k and a 270)
C1 0.1uF
C2 4.7uF

Here are my handwritten calcs:
Center frequency calc(F0)

Bandwidth calc

Note that for the center frequency calc I used values in Farads, but in the bandwidth calc I used uF. It seems that the data sheet specifies this, it is the only way I could get my numbers to make sense. This is one reason I would like a second opinion. I appreciate all the input!

–Dan provides a different result.

jremington: provides a different result.

That is true, but I can't figure out how that calculator comes up with the numbers it does. They just don't jive with the actual formula in the datasheet. I'm not saying the calculator is wrong, but it doesn't make sense.


I get the same numbers you do. Try it and see.

Interestingly, different data sheets give different formulas for the 567 center frequency.

Signetics SE/NE 567 and Texas Instruments LM567C data sheets state fo ~ 1.1/RC, while the National Semiconductor LM567 data sheet states fo ~ 1/(1.1 RC).

Two out of three? You would have to lash it up and see. In any case, a 4.7 K resistor in series with a 1 K pot would cover the bases and allow for tunability.

If it were me, I would do it with the micro and not bother with the tone decoder.