You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow ADC attenuation for audio input to be selected #4091
Is your feature request related to a problem? Please describe.
Documents such as this or this describe "cheap microphone modules" as unusable for the "audio-reactive" modes primarily because the range of digital values obtained from the "cheap" microphones via the ADC is small.
Buying "better" microphones is probably always an option, but given that this is just about some lights blinking according to the music, this should really not require "high fidelity" input.
Analog microphones will be deprecated in 0.15 and removed in 0.16.
Reasons being removed I2S support for analog in newer frameworks and poor performance. @softhack007 can elaborate in more detail.
Hope you don't mind if I chime in to say that I've never seen poor
performance with my analog mics and analog audio input from an audio
source. Would love to see analog support continue if it's possible. It's
nice to just have to use one pin for input on setups where there's other
buttons and sensors hooked up and available pins are an issue.
Analog microphones will be deprecated in 0.15 and removed in 0.16.
Reasons being removed I2S support for analog in newer frameworks and poor performance.
If you know how to make use of the continuous ADC mode driver for audio sampling, please feel free to to write a driver for WLED and submit a PR. Just be aware that the I2S driver we currently use does not support ADC input any more on newer MCU's.
Regarding "poor performance", I wonder what measurement this refers to.
"Poor performance" is based on own experience, by comparing microphone modules like the MAX9814 (analog) with I2S mics like the IMNP441. In this comparison, the MAX loses, and the difference between the two devices is so huge it should be measured in lightyears.
Please also keep in mind that ADC on esp32 is very poor, compared to I2S. ADC has a very noisy 12 bit resolution, while I2S is delivering 24bits per sample.
So - given that ADC is deprecated in the I2S driver, given the low quality of ADC, and given that good I2S devices are available for cheap - the WLED core team has decided to focus our limited time and effort on I2S hardware, and drop I2S-ADC in the future.
Edit: if you are looking for simpler hardware, PDM microphone boards might be an option. We do support I2S PDM mode, and it's one wire less that you need to connect.
Activity
blazoncek commentedon Aug 5, 2024
Analog microphones will be deprecated in 0.15 and removed in 0.16.
Reasons being removed I2S support for analog in newer frameworks and poor performance.
@softhack007 can elaborate in more detail.
k7bbr commentedon Aug 5, 2024
lvml commentedon Aug 5, 2024
I2S support is still documented for the latest 5.3 Espressif IDF and the Analog to Digital Converter (ADC) Continuous Mode Driver is still documented to make use of I2S, internally.
Regarding "poor performance", I wonder what measurement this refers to.
softhack007 commentedon Aug 6, 2024
If you know how to make use of the continuous ADC mode driver for audio sampling, please feel free to to write a driver for WLED and submit a PR. Just be aware that the I2S driver we currently use does not support ADC input any more on newer MCU's.
"Poor performance" is based on own experience, by comparing microphone modules like the MAX9814 (analog) with I2S mics like the IMNP441. In this comparison, the MAX loses, and the difference between the two devices is so huge it should be measured in lightyears.
Please also keep in mind that ADC on esp32 is very poor, compared to I2S. ADC has a very noisy 12 bit resolution, while I2S is delivering 24bits per sample.
So - given that ADC is deprecated in the I2S driver, given the low quality of ADC, and given that good I2S devices are available for cheap - the WLED core team has decided to focus our limited time and effort on I2S hardware, and drop I2S-ADC in the future.
Edit: if you are looking for simpler hardware, PDM microphone boards might be an option. We do support I2S PDM mode, and it's one wire less that you need to connect.