Sound Sensor
-
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:
Has anyne an idea of the analog value always the same first and then from the formulae above ?
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)); } -
-
Hello,
In fact it is a digital on-off output, playing with the potentimeter I saw that... so useless for my project...
-
Hello,
In fact it is a digital on-off output, playing with the potentimeter I saw that... so useless for my project...
-
digital... sadly...
-
We can still make it work, tripping when you have a loud noise
-
yes the only way, as a door contact... nut not to measure noise pollution...
-
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.
-
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.
@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...
-
@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...
-
-
@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...
-
@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...
@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,
-
@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,
-
@epierre I have very little time, but sharing the sketch might help to make your problem clear...
-
@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. -
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...

@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...
-
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
-
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...

@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...
@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
-
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...

@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...
@epierre Osrry, forgot to mention that the killer was the lack of amplification on the cheap modules. The diff between silence and hand clap few cm from the mic was only a few numbers on the reading. When you have amplification it stretch it across the 1023 range, I think.