Ардуино датчик уровня шума своими руками

Hello! I am with you Igor on the
Home Made channel. And today we will make a
simple sound level sensor. Go! The device layout is very
simple. At the heart of everything is
a microphone amplifier based on the MAX4466 chip. This module has only 3 pins
+ power, minus, and output. The output connects to any
Arduino analog input. To reduce the size, I use
the Arduino Pro Mini. To display the sound level
indication, I use the OLED display, which is connected
via the I2C line. All this is powered by a
battery. The circuit turned out to
be very simple. The only thing you need to
pay special attention to is the power source. I tried to power this device
directly from the computer, but using power from the
computer causes a lot of noise and the microphone
picks up extraneous noise. Maybe the microphone is not
noisy, but the analog input is noisy. One way or another, the
quality of this sensor is very poor if you feed
it from some kind of power source. It works stably from the
battery and there are no problems. Let’s move on to the sketch
now and see what’s in the sketch. And so, at the beginning the
library is connected to work with the display. The display is initialized,
some variables are defined, with which we will
work. The variable sampleWindow
defines the period of time over which the sound value will be collected. The Draw function is intended to display values. In “Setup” there is practically
nothing. The only thing I made a font
definition in order to reduce the load on the “Draw” function. In the main program loop,
we update the value of the variables. We read the value at the analog
input, at which we accept the microphone output, and determines
the minimum and maximum value of the peaks from the
sound that was received. After that, we bring everything
to the values ​​suitable for display. And display. The result is a very simple
circuit with very simple code. And everything works fine. Since I do not have specialized
ones for measuring sound levels and noise levels,
I can’t fine-tune this sensor. I don’t know what is the noise
level in my room now, so I only set the value here
approximately. In order for this sensor to
correctly show the current noise level, you need to
measure the noise level in the room with a specialized device,
and set the corresponding values ​​in the MAP function. In order for these levels
to be reduced to the correct value. Then this sensor will
correctly show the sound level in decibels. But, one way or another,
the sensor works and shows that there is some kind of sound,
there is a reaction to the sound. I can even come closer:
1 – 1 – 1 – 2 – 3 … It works pretty well. And normally responds to
sound. Also, the sound level can
be adjusted on the microphone amplifier itself. If we get it, there is a small
regulator on the reverse side. In fact, it is a regulator
of sound amplification level. And with it, you can also
adjust the sound level. Here I’m tuned to almost minimal gain. And even with such minimal
effort it works very well. 1-2-3 … This is such an interesting
device. I wish you success! Let your projects be cool
and interesting! Subscribe to the channel. Bye everyone!

7 thoughts on “Ардуино датчик уровня шума своими руками

  1. Хорошая вещь.Можно соседу предъявить что громко слушает музыку?

  2. Спасибо вам. Но я, вероятно, ваш скетч использую для того чтобы сделать индикатор амплитуды сигнала чтобы ловить резонанс. А звуковой блок не нужно.

  3. Доброго времени суток, к вам можно обратиться с прозьбой помочь написать код для меню на базе дисплея nokia 1100 с управлением кнопками? Сам уже месяц не могу разобраться что и как

  4. Микрофон с АРУ , какой датчик уровня шума если он автоматически уменьшает усиление при громком звуке и увеличивает усление при тихом звуке???

  5. Все прекрасно, но считаю, что этого не достаточно. Это только вход шума определяется. Теперь надо добавить исполнительный механизм, который возвращает шум в любом виде по обратной связи. Например на китайскую долбилку, или включает мотор, или соленоид, или дверной звонок. А так получается послушал соседский шум и утерся как терпила. Не порядок. Надо продолжить работу!

  6. Спасибо за проект, можно сравнить и примерно откалибравать с программой для андройда, когда-то скачивал, их там много!

Leave a Reply

Your email address will not be published. Required fields are marked *