EspAudioSensor: Difference between revisions

From RevSpace
Jump to navigation Jump to search
(Created page with "{{Project |Name=ESP audio sensor |Picture=NoPicture.jpg |Omschrijving=ESP-based audio sensor |Status=Initializing |Contact=bertrik }} == Introduction == This...")
 
No edit summary
Line 11: Line 11:


This could be a decibel meter, or perhaps an environmental noise meter.
This could be a decibel meter, or perhaps an environmental noise meter.
== Measuring audio as a citizen science project ==
Possibly a nice match for measuring stuff by citizens could be to measure audio:
* ESP8266/ESP32 have an I2S input, there are cheap microphones available that directly output I2S, saving on interface electronics
* ESP8266/ESP32 is probably powerful enough to do basic processing, like FFT, summing power in various frequency ranges, etc.
* ESP8266/ESP32 has a wifi connection so it can easily upload data
Questions/stuff to investigate:
* what kind of measurements can we do reliably?
** probably absolute measurements are very difficult
** possibly useful relative measurements
*** calculate average over (say) 10 seconds, and compare it with the average over (say) 10 minutes
*** compare averages over time, e.g. compare daytime minute average with each other
*** determine peak-to-average ratios
Waag society uses the following microphone in their [https://waag.org/en/article/new-version-smart-citizen-kit-available kit 2.1]: Invensense ICS4342
On AliExpress you can find many INMP441, with claims of compatibility with ESP32, so I ordered those
[https://aliexpress.com/item/INMP441/32960945048.html INMP441].
External things to investigate:
* https://www.rijksoverheid.nl/onderwerpen/geluidsoverlast/geluidsoverlast-in-de-wet
* [https://www.invensense.com/wp-content/uploads/2015/02/INMP441.pdf INMP441 microphone datasheet]
* https://github.com/maspetsberger/esp32-i2s-mems


=== A-weighting ===
=== A-weighting ===

Revision as of 14:38, 14 April 2019

Project ESP audio sensor
File:NoPicture.jpg
ESP-based audio sensor
Status Initializing
Contact bertrik
Last Update 2019-04-14

Introduction

This project is about using an ESP-32 together with an I2S digital microphone to create an audio sensor.

This could be a decibel meter, or perhaps an environmental noise meter.

Measuring audio as a citizen science project

Possibly a nice match for measuring stuff by citizens could be to measure audio:

  • ESP8266/ESP32 have an I2S input, there are cheap microphones available that directly output I2S, saving on interface electronics
  • ESP8266/ESP32 is probably powerful enough to do basic processing, like FFT, summing power in various frequency ranges, etc.
  • ESP8266/ESP32 has a wifi connection so it can easily upload data

Questions/stuff to investigate:

  • what kind of measurements can we do reliably?
    • probably absolute measurements are very difficult
    • possibly useful relative measurements
      • calculate average over (say) 10 seconds, and compare it with the average over (say) 10 minutes
      • compare averages over time, e.g. compare daytime minute average with each other
      • determine peak-to-average ratios

Waag society uses the following microphone in their kit 2.1: Invensense ICS4342

On AliExpress you can find many INMP441, with claims of compatibility with ESP32, so I ordered those INMP441.

External things to investigate:

A-weighting

Audio levels are generally measured in dB using the A-weighted scale. A-weighting calculates a subjective loudness level from a physical loudness.

Energy it calculated per octave and an A-weight factor is applied. In decibels this means adding a octave-specific number to the loudness.

Hardware

The physical device consists of:

  • an ESP32 (or possibly an ESP8266), it has an I2S digital audio input.
  • a digital I2S microphone, like the INMP441 (datasheet)

The microphone is connected as follows:

  • INMP441 GND to ESP32 GND
  • INMP441 VDD to ESP32 3.3V
  • INMP441 SD to ESP32 A4/32
  • INMP441 SCK to ESP32 A16/14
  • INMP441 WS to ESP32 15
  • INMP441 L/R to ESP32 GND

Software

Initial code can be found on github.

See also: