On one hand, a microphone on its own is usually not able to provide enough voltage for the Arduino to sense a change. The Arduino ADC senses voltage levels (typically in the range of 0-5V) and converts them to values in the range of 0 to 1024 (10 bit).ĭepending on what we are measuring, sound levels may be very quiet or very loud. Therefore, for an Arduino implementation, this process translates to connecting a measuring device (microphone for sound) to the MCU and sampling the value at the device by the ADC at a constant rate. Furthermore, each sample in time is also made discrete during this process as computers and integrated circuits have finite accuracy and storage.Īrduino capability for measuring signals and converting them to logic that the micro-controller (MCU) can process is provided by the Analog-to-Digital-Converter (ADC) that is pat of the MCU. Because we can only measure a finite number of times per time unit, this process of measuring is called sampling and it generates a discrete signal. You can think of this as sound passing through a microphone where it is being measured constantly and the measurements form the waveform.
Sound is a wave that moves in space and when it is stored (in digital or analog form) it is represented by a Waveform, which is the amplitude of the wave measured at each point in time at a certain point in space. This article is going to be targeted towards beginners, who are neither signal processing experts not electronics experts and it will be fairly high-level with links for more thorough reading. I will talk about sound, microphones, sampling, FFT and more. I will cover that project in more detail in one of the future articles, but now I would like to write about the process and best practices of measuring sound levels and analyzing frequencies with an Arduino. One of the projects involved benchmarking certain motors and required me to measure noise levels. Recently I have been doing some projects with the Arduino electronics platform.