Interface max9814 module to Arduino board

how to calculate Vrms from max9814 which is connected to Arduino. and ADC values are below
136
32
166
0
123
42
94
1
12
171
0
135
0
118

“how to calculate Vrms from max9814 which is connected to Arduino. and ADC values are below”

Request for Information to Assist with Your Problem:

I find your question interesting, but I have a problem understanding your setup. After reading your description, I still have no idea what your actual configuration looks like. To help you better, please provide the following:

  1. Annotated Schematic: Post a clear, annotated schematic of your setup showing all connections, including power, ground, and any power supplies. I do not work with Fritzing diagrams or unclear pictures. However, a readable photo of a hand-drawn schematic is perfectly fine.

  2. Technical Details: Provide links to the technical information for all hardware components used in your setup. There are many different and sometimes incompatible devices that look similar but behave differently, so it's crucial that we have accurate information. Avoid linking to marketplace sites like Amazon that often lack detailed specifications.

  3. Post the Code: Without that we cannot determine what the problem is.

  4. Why This Matters: All you want is to make everything work together correctly, and all we want is to help you achieve that. By providing the correct details, we can offer more targeted and effective assistance.

Helpful Resources:

Please share these details so we can guide you toward the right solution. We're here to help!

  1. Square all the values
  2. Add all the squared values computed in step 1
  3. Divide the sum computed in step 2 by the number of values.
  4. Take the square root of the value computed in step 3

What ADC are we talking about?

You can only get a simple “at this incessant of time” reading from an ADC. This can not be converted into an RMS value.

At the very least you would have to collect many samples from your ADC and get an average reading first. Then convert this average to an RMS value.

hi,

My goal is to detect vehicle sounds (cars and heavy trucks) approaching the microphone from a distance. I am currently evaluating a microphone with a MAX9814 module (see schematic) whose output is connected to the Arduino UNO ADC. I am sampling the analog output on A0 and sending readings to the serial monitor for analysis.

output connected to Arduino UNO board ADC

simple code as below
#include <SoftwareSerial.h>
int sensorValue;
void setup() {
// initialize serial communication at 9600 baudrate
Serial.begin(9600);
}
void loop() {
// get the analog value
sensorValue = analogRead(A0);
// display the analog value to serial monitor
//if (sensorValue>220)
//Serial.print(millis());
//Serial.print(",");
Serial.println(se
nsorValue);
}
please advice way is proper or not

Not proper.

This is a long way off the description in your initial post. And the thread's title, because it is so vague and gives no idea of what you want to do.

I suggest, in the light of what you wrote, to change it to something more sensible. As you don't want the RMS value at all, you lead us all astray on that.

Why on Earth are you using software serial, and at such a slow baud rate!

So what does that graph show you and how are you interpreting it? It is meaningless as far as I can see, so please explain what is means to you.

You might want to look at this How to get the best out of this forum before you proceed any further.

It will tell you, amongst other things, how to post code correctly here. Because that code is not posted correctly.

hello Grumpy,
i apologize for the inconvenience and forget my previous post

I am working on a project where I need to detect the sound of vehicles (cars, heavy trucks) from a distance of around 100 m. The microphone will be placed in an open area on land, and the goal is to identify when a vehicle is approaching.

Currently, I am evaluating microphones like AOM-5024L-HD-R and CMA-4544PF-W, connected to a MAX9814 preamplifier module, with the output fed into an Arduino Uno ADC.

My questions are:

  1. What type of microphone is most suitable for long-distance vehicle detection (100 m)?
  2. How can I calculate whether the microphone output voltage will be sufficient for reliable detection at that distance?
  3. Should I use additional filters (e.g., low-pass or band-pass) to separate vehicle sound from background noise (wind, people, etc.)?
  4. Would I need a higher-gain preamplifier or a different approach (like a geophone or array microphone) for better detection?

Any advice, references, or design suggestions will be very helpful.

Thank you!

I like the idea of a geophone. But then that probbly would be triggered by people walking next to it as well as distant approach.

I am assuming the 100 m range is 100 meters and not miles. I think the type of microphone is irrelevant here.

In theory you should but it is difficult to say what sort of filter you might need.

However, I think the best approach would be to involve some sort of AI sound recognition system,

These links might help you with this:-
sound recognition:-
https://www.eetasia.com/news/article/Data-is-King-for-AI-Sound-Recognition

AI - Google’s flagship machine learning library: “TensorFlow“

And if you want to switch to a Raspberry Pi the search for the free MagPI download of issue 98,
Recognising different sounds using AI MagPi 98 page 30

A Parabolic microphone would be a good choice.

Also see post #5

Here is something that might work but I think it is to pricey for your project. DPA 4017B Shotgun Microphone.

It appears you want to distinguish trucks from other vehicles (cars, bikes, etc.), or just detect any large moving object? Tell me which of those you mean (and what the environment is like line of sight, outdoors, day/night, moving or stationary. Have you looked at using using radar, lidar, cameras, or other acoustic sensors?

We use both acoustic and seismic sensors to detect vehicles and distinguish moving vehicles outdoors under all weather conditions. The product will be stationary in an open field and is designed for remote-area.

What sounds are you interested in? Engine sounds? air moving around the moving vehicle? The sound of rubber tires on concrete? On crushed rock? On asphalt paved road? What sounds do electric vehicles make? Some sounds will be below what humans can hear. Some will be way above what humans can hear.

hi Paul_KD7HB,

any sound like engine and rubber tires on concrete or soil. aim is to detect vehicle approaching towards the mic.

And also see post #6 that tells you why that will not work. What do you actually get when you try the method in post #5? You never told us.

Now I know you are not apt to believe anything I say, so look at this link which tells you one way of doing it correctly.

https://www.electrical4u.com/rms-or-root-mean-square-value-of-ac-signal/

Then compare that with what you did in post #5

hi Grumpy,

i got idea how to calculate rms value . but During lab testing the Max9814-based microphone is sensitive to noise sources (e.g., fans and air movement). I am investigating signal-processing and hardware methods to remove these unwanted noises from the module output.

Good luck with that, although unless you understand filter design I think you will struggle.

I did, at one time when I was a University lecturer, give an MSc lecture course on signal processing, and it can get very mathematical.

dear Grumpy,

is there any hardware circuit to remove those noise. because am new to analog circuit design.

Well an external filter would class as hardware, but you still need to know how to design filters. A filter can be one of several types

  1. Low Pass
  2. High Pass
  3. Band pass
  4. Band stop - sometimes known as a notch filter

All filters have an order like order 1, 2, 3 and so on. The order of the filter is how quickly the filter attenuates the signal the further away from the "break frequency" the signal is. This break frequency is the point where the signal has dropped to half the value.

Then there is the shape of the filter. The main one is called a Butterworth Shape, where the signal drops steadily as the frequency you are filtering gets further away from the break frequency. But there are other types called things like Chebyshev , Bessel, and Caurer, types that trade off a faster drop-off rate for some ripple in both the pass band and the stop band. That is in places before the break frequency , and in the ultimate amount of attenuation you get.

However, there is not much difference from implementing these in hardware or through signal processing software.

Sadly there is no filter that will just stop the noise you do not want. The only way to do that is with correctly setup series of samples that you do want and do not want, like the AI techniques I described in my post#10.

The RMS calulation in post #5 is correct for any set of data points. It's the definition of RMS for discrete data points. It applies to any signal not just AC

You are not likely to build any analog filters to do what you want.
A DSP IC would be more appropriate

dear Grumpy,
thanks for your input will check AI techniques.