Skip to content

jcastro/esphome-sound-level-meter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ESPHome Sound Level Meter

ESPHome firmware for a DFRobot SEN0232 Gravity Analog Sound Level Meter connected to an ESP32-C3 Super Mini.

Hardware

  • DFRobot SEN0232 Gravity Analog Sound Level Meter
  • ESP32-C3 Super Mini
  • Sensor analog output connected to GPIO3

Parts Links

Wiring

DFRobot SEN0232 ESP32-C3 Super Mini Notes
VCC 3V3 or 5V The module supports both supply voltages.
GND GND Both boards must share ground.
OUT GPIO3 Use an ADC-capable GPIO. Change sound_adc_pin in sound-level.yaml if you move this wire.

The ESP32-C3 ADC input must stay below 3.3V. The SEN0232 documented analog output range is 0.6V to 2.6V, so it is safe for the ESP32-C3 ADC when wired as above.

Features

  • Native ESPHome API for Home Assistant
  • Local ESPHome web server on port 80
  • OTA updates
  • Live sound voltage reading
  • Sound level estimate in dBA
  • Runtime calibration offset exposed as Calibration Offset

Calculation

The DFRobot SEN0232 outputs an analog voltage where the documented conversion is:

dBA = voltage * 50

This firmware keeps the voltage reading unmodified and applies the calibration offset only to the calculated dBA value:

Sound Level = Sound Voltage * 50 + Calibration Offset

The current default calibration offset is -8.0 dB.

Setup

Create a local secrets.yaml file from the example:

wifi_ssid: "Your Wi-Fi SSID"
wifi_password: "Your Wi-Fi password"

Then compile and upload:

esphome run sound-level.yaml

To use a different analog input pin, change this substitution near the top of sound-level.yaml:

sound_adc_pin: GPIO3

About

ESPHome firmware for a DFRobot SEN0232 sound level meter on ESP32-C3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors