Problem with Sound sensor

I'm current working on a project with an RGB LED, hoping to change the colour according to how loud the sound is. I'm using a DFRobot sound sensor, and the problem is when ever I look at the Serial monitor I get the same value 705, sometimes 704 or 706. I am 100% it is connected properly ( I had the same step up when I got the sensor to test it, clap my hands and the LED blinks). I've even tried it with a simple sketch to make sure my code was not the problem. I've just tried using my vibration sensor the same way and it works perfectly. Being new to electronics, is there something wrong with the sensor or is it something I'm doing?

Have a data sheet for sensor or link to grab it?

This is best done with an "envelope follower" circuit.

That would be useful as a sensor/shield device as having a log response is so much more useful in most applications that an arduino could handle. I know I've seen a could of FFT libraries that claim some limited signal analysis on a Arduino, but I think that is a little overloading an arduino without additonal external hardware support.

My favorite device for this kind of thing is the AD8307 log amp ( AD8307 Datasheet and Product Info | Analog Devices ) responds from DC to 500 Mhz. I made a cool standalone RF milliamp meter with it, displays from -77 dbm to +15 dbm and tracks accurate levels within a db with my HP 8601A sweep generator. A little pricey but you kind of get what you pay for when wanting good log measurements.

Lefty

Even if you really wanted to sample the audio waveform directly, you still have the problem of DC offset. It would be almost trivial to add DC offset to a product like that board,

As I read that schematic you posted, they do offset the internal op-amps at 1/2 Vcc, but then screw it up by having a series output cap to the output. ]:slight_smile:

Jumper out that output series cap and it might all fit into 0-5vdc, however I see no gain control to taylor the signal to the arduino?

Thanks for the help guys! Especially the article regarding envelope follower circuits, that put things in a better perspective. I am going to look in to making my own at a later stage because the DFRobot ones are all I have access to.
However it still doesn't explain whats wrong with this particular board? Whether its next to a speaker, claps or completely silent the reading remains 705? Again I am 100% sure i have connected it properly.

Thanks again

I've connected a capacitor in series to the analog input, only change is that it now reads 699 constantly instead of 705, and still does not react to sound.

Thanks

KE7GKP

Thanks, I've just tried what you suggested but now the readings are 701 and don't change. I'm now convinced board is not working as it should. Previously the board at least responded to claps.

I confess the diode I used was not the same (1N4004). When connected to a speaker there is just a constant hum/ noise, it doesn't change in response to other noises.

Great. I won't be able to get another one soon. would a regular mic work with the circuit you provided?

I meant getting one from another appliance. But thanks, I will give the test a try. If the amp is bad I guess I'll have to get another sound sensor, down side is the long wait.

Thanks again for the help, it is appreciated.

That was one of the first problems i read about and checked out while googling. I have the usual usb that I normally use as well as a connector to a 9V battery, both pretty much have the same results, except that the battery gives a reading of 1023 while the usb gives one of 705 and both values remain constant.

Hey sorry for the late reply, the internet was down. To answer the question it was purchased built. The problem is now solved, tested it the way you suggested and found that it was the board that wasn't working. Purchased a new one which has just arrived and have it set up exactly the same way, running the same code and everything is working perfectly :). Thanks for the help, at least I now know what to do/check for in the future!

If you really want to go crazy with LED(s) and audio, try out a MSGEQ7 - Seven Band Graphic Equalizer Display Filter. I have used the MSGEQ7 chip by itself on several projects with great success. I'm working on another one right now that drives a 7 foot LED light bar to audio output from a TV. I will document it soon, but I just keep finding new effects to code into it! To get an easier start you can use a shield...

Bliptronics created something called the Spectrum Analyzer Shield, which uses the MSGEQ7 to read the 7 bands from an audio source. See their product page for an example video of what you can do with one:

Spectrum Analyzer Shield
http://bliptronics.com/item.aspx?ItemID=116

SFE also just started selling something very similiar:

willnue