General project setup questions

Posted on
  • Hi,

    I like to build a device that recognizes certain audio frequencies. The usecase is as follows: 
    My daughter is diabetic and weares an Insulin pump. If the blood sugar is out of range the pump plays an alarm beep. At fast decreasing sugar values it plays a three tone melody. 
    I tried to use a standard Baby Monitor to transfer alarms to my bed room but baby monitors do not hear that frequencies at all. So I need to solder something.

    My basic question is: can I connect a microphone to the analog Input and separate the beep frequency from all the other noise by software in the espruino or shoud I connect an external ADC? At a later stage I like to recognize three tone melodies to separate different alarms. 

    Does this work at all?

    Thanks,

    Jolm

  • Hi Jolm,

    You'd probably need at least an amplifier before the ADC - but if you look online you can actually buy Microphone + Amplifier modules for Arduino really cheaply.

    You can capture audio with the Waveform class but only reliably up to about 8kHz. There's also an FFT function which you could run over the Waveform to detect certain frequencies too - I'm not sure if Espruino is fast enough to capture an 8kHz waveform and continuously FFT it as well - you'd have to try.

    But it may be that 8kHz is too low-pitched to pick up the alarm (as that's a max of a 4kHz pitch). The easiest option might be to make some kind of analog 'tuned circuit' that picked up the specific frequency you're after. You could then use a diode to turn that into DC and could measure the amplitude of that with Espruino - obviously it requires a bit more hardware though.

  • Hi Gordon,

    That sounds like a good plan. I'll go the analog circiut way first.

    Btw. I can't wait to get my picos! You are doing an awsome job!

    Cheers,
    jolm

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

General project setup questions

Posted by Avatar for Jolm @Jolm

Actions