Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Sound Sensor

Sound Sensor

Scheduled Pinned Locked Moved My Project
31 Posts 7 Posters 24.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • epierreE Offline
    epierreE Offline
    epierre
    Hero Member
    wrote on last edited by
    #1

    HEllo,

    I've based myself on a cookbook recipie, but it appears two issue:

    • each analogread brings 1023

    • the runningAverage keeps on increasing, never decreasing

      My sensor has only analog output (see sensor

      Here is the sketch:

    SoundSensor2

    Has anyne an idea of the analog value always the same first and then from the formulae above ?

    z-wave - Vera -> Domoticz
    rfx - Domoticz <- MyDomoAtHome <- Imperihome
    mysensors -> mysensors-gw -> Domoticz

    BulldogLowellB 1 Reply Last reply
    0
    • epierreE epierre

      HEllo,

      I've based myself on a cookbook recipie, but it appears two issue:

      • each analogread brings 1023

      • the runningAverage keeps on increasing, never decreasing

        My sensor has only analog output (see sensor

        Here is the sketch:

      SoundSensor2

      Has anyne an idea of the analog value always the same first and then from the formulae above ?

      BulldogLowellB Offline
      BulldogLowellB Offline
      BulldogLowell
      Contest Winner
      wrote on last edited by
      #2

      @epierre

      you are maxing out the voltage on the analog pin.

      did you turn the potentiometer all the way down and check the input?

      try to debug the sensor with a basic sketch first, turning the pot while you look at the serial monitor. You may have to add a resistor... Then once you have it working, try your MySensors sketch.

      int inputPin = 3;  //check this
      
      void setup() 
      {
        Serial.begin(9600);
        pinMode(inputPin, INPUT); 
      }
      
      void loop() 
      {
        Serial.print(analogRead(inputPin));
      }
      
      1 Reply Last reply
      0
      • epierreE Offline
        epierreE Offline
        epierre
        Hero Member
        wrote on last edited by
        #3

        Hello,

        In fact it is a digital on-off output, playing with the potentimeter I saw that... so useless for my project...

        z-wave - Vera -> Domoticz
        rfx - Domoticz <- MyDomoAtHome <- Imperihome
        mysensors -> mysensors-gw -> Domoticz

        BulldogLowellB 1 Reply Last reply
        0
        • epierreE epierre

          Hello,

          In fact it is a digital on-off output, playing with the potentimeter I saw that... so useless for my project...

          BulldogLowellB Offline
          BulldogLowellB Offline
          BulldogLowell
          Contest Winner
          wrote on last edited by
          #4

          @epierre said:

          Hello,

          In fact it is a digital on-off output, playing with the potentimeter I saw that... so useless for my project...

          @epierre said:

          My sensor has only analog output

          Your sketch is looking for an analog input, yes?

          Your sensor is analog, or digital?

          1 Reply Last reply
          0
          • epierreE Offline
            epierreE Offline
            epierre
            Hero Member
            wrote on last edited by
            #5

            digital... sadly...

            z-wave - Vera -> Domoticz
            rfx - Domoticz <- MyDomoAtHome <- Imperihome
            mysensors -> mysensors-gw -> Domoticz

            BulldogLowellB 1 Reply Last reply
            0
            • epierreE epierre

              digital... sadly...

              BulldogLowellB Offline
              BulldogLowellB Offline
              BulldogLowell
              Contest Winner
              wrote on last edited by
              #6

              @epierre

              We can still make it work, tripping when you have a loud noise

              1 Reply Last reply
              0
              • epierreE Offline
                epierreE Offline
                epierre
                Hero Member
                wrote on last edited by epierre
                #7

                yes the only way, as a door contact... nut not to measure noise pollution...

                z-wave - Vera -> Domoticz
                rfx - Domoticz <- MyDomoAtHome <- Imperihome
                mysensors -> mysensors-gw -> Domoticz

                1 Reply Last reply
                0
                • wmylionelW Offline
                  wmylionelW Offline
                  wmylionel
                  wrote on last edited by
                  #8

                  Not sure what happened to the links in the mysensor store but here is the link to the sound sensor you need, make sure it is the one that has 4 pins, with analog output as an option.

                  http://www.ebay.com/itm/1pc-New-Analog-Sound-Sensor-Board-Microphone-MIC-Controller-For-Arduino/300951969384?_trksid=p2047675.c100005.m1851&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D24143%26meid%3D8558634634764594554%26pid%3D100005%26prg%3D10240%26rk%3D2%26rkt%3D6%26sd%3D251565637147&rt=nc

                  epierreE 1 Reply Last reply
                  0
                  • wmylionelW wmylionel

                    Not sure what happened to the links in the mysensor store but here is the link to the sound sensor you need, make sure it is the one that has 4 pins, with analog output as an option.

                    http://www.ebay.com/itm/1pc-New-Analog-Sound-Sensor-Board-Microphone-MIC-Controller-For-Arduino/300951969384?_trksid=p2047675.c100005.m1851&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D24143%26meid%3D8558634634764594554%26pid%3D100005%26prg%3D10240%26rk%3D2%26rkt%3D6%26sd%3D251565637147&rt=nc

                    epierreE Offline
                    epierreE Offline
                    epierre
                    Hero Member
                    wrote on last edited by
                    #9

                    @wmylionel yes I know this is my fault, I tried to order from one vendor rather to have several parcel, and lacking experience I did not check about this... nor about the wrong China Exports logo... experience come to a price...

                    z-wave - Vera -> Domoticz
                    rfx - Domoticz <- MyDomoAtHome <- Imperihome
                    mysensors -> mysensors-gw -> Domoticz

                    YveauxY 1 Reply Last reply
                    0
                    • epierreE epierre

                      @wmylionel yes I know this is my fault, I tried to order from one vendor rather to have several parcel, and lacking experience I did not check about this... nor about the wrong China Exports logo... experience come to a price...

                      YveauxY Offline
                      YveauxY Offline
                      Yveaux
                      Mod
                      wrote on last edited by
                      #10

                      @epierre said:

                      wrong China Exports logo

                      What do you mean by this?

                      http://yveaux.blogspot.nl

                      epierreE 1 Reply Last reply
                      0
                      • YveauxY Yveaux

                        @epierre said:

                        wrong China Exports logo

                        What do you mean by this?

                        epierreE Offline
                        epierreE Offline
                        epierre
                        Hero Member
                        wrote on last edited by epierre
                        #11

                        @Yveaux the CE marking but C touching the E, without space... it is not Conformité Européenne but China Export... no warranty to comply in European space... be aware...

                        see wikipedia

                        Anyway, do you know a way to solder something to have access to something analog on it ?

                        z-wave - Vera -> Domoticz
                        rfx - Domoticz <- MyDomoAtHome <- Imperihome
                        mysensors -> mysensors-gw -> Domoticz

                        YveauxY 1 Reply Last reply
                        0
                        • epierreE epierre

                          @Yveaux the CE marking but C touching the E, without space... it is not Conformité Européenne but China Export... no warranty to comply in European space... be aware...

                          see wikipedia

                          Anyway, do you know a way to solder something to have access to something analog on it ?

                          YveauxY Offline
                          YveauxY Offline
                          Yveaux
                          Mod
                          wrote on last edited by
                          #12

                          @epierre Hard to say without a schematic... Seems to be something like this: http://yourduino.com/sunshop/images/products/SoundSensorDiagYW-700.jpg

                          You can try to connect to the analog input of the comparator (pin 3 of LM393) and see if it brings anything, but only if your module is similar ofcourse...

                          http://yveaux.blogspot.nl

                          epierreE 1 Reply Last reply
                          0
                          • YveauxY Yveaux

                            @epierre Hard to say without a schematic... Seems to be something like this: http://yourduino.com/sunshop/images/products/SoundSensorDiagYW-700.jpg

                            You can try to connect to the analog input of the comparator (pin 3 of LM393) and see if it brings anything, but only if your module is similar ofcourse...

                            epierreE Offline
                            epierreE Offline
                            epierre
                            Hero Member
                            wrote on last edited by
                            #13

                            @Yveaux Hello I'm trying to compile a sketch using TIMSK, but to use it on an atm 128, I would need either timex8 or timex128 which only comes through an avrlib.

                            This is where I am lost, I have an avrlib on my disk, should I replace it with the full one ? how can I manage that ?

                            thanks,

                            z-wave - Vera -> Domoticz
                            rfx - Domoticz <- MyDomoAtHome <- Imperihome
                            mysensors -> mysensors-gw -> Domoticz

                            YveauxY 1 Reply Last reply
                            0
                            • epierreE epierre

                              @Yveaux Hello I'm trying to compile a sketch using TIMSK, but to use it on an atm 128, I would need either timex8 or timex128 which only comes through an avrlib.

                              This is where I am lost, I have an avrlib on my disk, should I replace it with the full one ? how can I manage that ?

                              thanks,

                              YveauxY Offline
                              YveauxY Offline
                              Yveaux
                              Mod
                              wrote on last edited by
                              #14

                              @epierre I have very little time, but sharing the sketch might help to make your problem clear...

                              http://yveaux.blogspot.nl

                              epierreE 1 Reply Last reply
                              0
                              • YveauxY Yveaux

                                @epierre I have very little time, but sharing the sketch might help to make your problem clear...

                                epierreE Offline
                                epierreE Offline
                                epierre
                                Hero Member
                                wrote on last edited by
                                #15

                                @Yveaux thanks, here it is:

                                avr_splmeter_02b.zip

                                http://davidegironi.blogspot.fr/2014/02/a-simple-sound-pressure-level-meter-spl.html

                                z-wave - Vera -> Domoticz
                                rfx - Domoticz <- MyDomoAtHome <- Imperihome
                                mysensors -> mysensors-gw -> Domoticz

                                YveauxY 1 Reply Last reply
                                0
                                • epierreE epierre

                                  @Yveaux thanks, here it is:

                                  avr_splmeter_02b.zip

                                  http://davidegironi.blogspot.fr/2014/02/a-simple-sound-pressure-level-meter-spl.html

                                  YveauxY Offline
                                  YveauxY Offline
                                  Yveaux
                                  Mod
                                  wrote on last edited by
                                  #16

                                  @epierre Had a quick look at the code. Seems the TIMSK stuff is just for timing the ADC samples at regular interval; the TIMER1_OVF_vect sets a flag (audioget_takesample) which is scanned for in the audioget_getsamples() function.
                                  Exactly the same behavior you can get by waiting using delay() or delayMicroseconds(), and then get the sample.
                                  That's probably easier then getting the raw timer stuff going.

                                  http://yveaux.blogspot.nl

                                  1 Reply Last reply
                                  0
                                  • epierreE Offline
                                    epierreE Offline
                                    epierre
                                    Hero Member
                                    wrote on last edited by
                                    #17

                                    Since @hek is interrested, I'm revivind this post with several microphone available out there, in fact impossible to know if these use real electet ones...

                                    IMG_20150801_185937.jpg

                                    @BulldogLowell I've seen you've participated here http://forum.arduino.cc/index.php?topic=208520.15 but do you think this was the good solution ? if you go through http://davidegironi.blogspot.fr/2014/02/a-simple-sound-pressure-level-meter-spl.html the questions is open...

                                    z-wave - Vera -> Domoticz
                                    rfx - Domoticz <- MyDomoAtHome <- Imperihome
                                    mysensors -> mysensors-gw -> Domoticz

                                    Moshe LivneM 2 Replies Last reply
                                    0
                                    • hekH Offline
                                      hekH Offline
                                      hek
                                      Admin
                                      wrote on last edited by hek
                                      #18

                                      Hmm.. not super easy to calculate an actual sound "pollution" value or do dB calculations using this I guess.

                                      Hmm.. Adafruit using a sample window in their example.

                                      https://learn.adafruit.com/adafruit-microphone-amplifier-breakout/measuring-sound-levels

                                      1 Reply Last reply
                                      0
                                      • hekH Offline
                                        hekH Offline
                                        hek
                                        Admin
                                        wrote on last edited by
                                        #19

                                        How does this differ from yours @epierre ?

                                        http://www.ebay.com/itm/Sound-Detection-Sensor-Module-Voice-Sensor-Intelligent-Vehicle-LM386-Audio-Power-/261598751181?pt=LH_DefaultDomain_0&hash=item3ce88029cd

                                        Seems to be two chips on it..

                                        1 Reply Last reply
                                        0
                                        • epierreE epierre

                                          Since @hek is interrested, I'm revivind this post with several microphone available out there, in fact impossible to know if these use real electet ones...

                                          IMG_20150801_185937.jpg

                                          @BulldogLowell I've seen you've participated here http://forum.arduino.cc/index.php?topic=208520.15 but do you think this was the good solution ? if you go through http://davidegironi.blogspot.fr/2014/02/a-simple-sound-pressure-level-meter-spl.html the questions is open...

                                          Moshe LivneM Offline
                                          Moshe LivneM Offline
                                          Moshe Livne
                                          Hero Member
                                          wrote on last edited by
                                          #20

                                          @epierre I have ordered almost any kind of sound sensor on aliexpress for my washing machine sensor (at first I thought to get the beeps). They were all really bad.... I went the vibration way, but if I had to start all over again I think I would get https://www.sparkfun.com/products/9964

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          11

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular