How to convert analogRead() value to db ?

+1 vote
asked Feb 9, 2016 by ghislain-vidal (380 points)

Hi there !

I would like to know if there's a way to get the sound power with a mic ?
There is the analogRead() function that return the frequence of the sound with the mic but I can't find a way to get the power ( I mean in dB)

2 Answers

+1 vote
answered Feb 9, 2016 by sebastien-arola (490 points)

The sound's power is the amplitude of the frequence. Maybe you can get it with analogRead().

0 votes
answered Feb 9, 2016 by sebastien-arola (490 points)

I looked at the wiki page for the db and it's equal to the log of the mesured voltage (give by analogRead() ) divided by a referenced voltage which is 0.775 V.
Here the equation :
volt : voltage return by analogRead()
db = log(volt/0.775)

It may be useful to test it with a true measuring device.

Welcome to OpenWiNo Q&A, where you can ask questions and receive answers from other members of the community.
To change your password you must follow THIS link.

24 questions

32 answers

18 comments

37 users

...