logo elektroda
logo elektroda
X
logo elektroda

Sound quality from MEMS microphone on ESP32 via ESP-NOW - is 12bit enough?

krzbor 1416 7
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18896873
    krzbor
    Level 27  
    I am thinking of making a wireless microphone based on ESP-NOW. The microphone is to be used to record the sound (speech) of a distant person.
    Transmitter - MEMS microphone with digital transmission or something based on a regular microphone and MAX9814. The latter will allow the use of popular tie microphones. Here, however, is the first question, will the 12-bit A/D converter in the ESP process the sound in good quality? However, does high quality require 16bit? (I'm talking about speech). I think the ESP will collect 100 16bit samples (200 bytes and send them). Such a packet is short about 3ms when sampling 32k. Here is another question, is 32k enough? A short packet should not introduce visible latency. The receiver will collect the data and send it to the DAC (8 bit in ESP32 is definitely not enough for audio). In your opinion, does it make sense to send (ESP-NOW technology) audio in this way? Is it suitable for real-time operation?
  • ADVERTISEMENT
  • #2 18896901
    khoam
    Level 42  
    krzbor wrote:
    Do you think sending (ESP-NOW technology) audio in this way makes sense? Is it suitable for real-time operation?
    .
    There was a similar thread on this topic recently:
    https://www.elektroda.pl/rtvforum/topic3719417.html

    krzbor wrote:
    Here's the first question though, will the 12 bit A/D converter in the ESP process the audio in good quality?
    .
    You would have to calibrate the ADC in the ESP32 or look for a factory calibrated version of the ESP32.
  • ADVERTISEMENT
  • #3 18897124
    krzbor
    Level 27  
    I think calibration is not crucial here - it's not a meter. More relevant is how much 12bit will be sufficient for good quality speech transfer. I say "speech" because for music it's certainly not enough.
    My second concern - how exactly does the ESP-NOW communication work? The description of the ESP-NOW function mentions acknowledgement which reminds me of TCP rather than UDP. So if a dispatch command goes, will it be immediately executed? If I set up a 3ms buffer then I can't afford to have ESP negotiate something or have any other delays. It simply has to work as a send over the 'radio' at 433MHz
  • #4 18897145
    khoam
    Level 42  
    krzbor wrote:
    The description of the ESP-NOW function mentions acknowledgement which reminds me of TCP not UDP.
    .
    The transmission is UDP, with no acknowledgement (it's basically WiFi over MAC, no IP) - either MAC unicasts or multicasts are sent. Of course, the devices require 'pairing'. Sending of packets is done immediately.
    https://www.espressif.com/sites/default/files/documentation/esp-now_user_guide_en.pdf

    krzbor wrote:
    that ESPs will negotiate something or there will be some other delays.
    .
    There is no handshake, but you can add your own.
  • ADVERTISEMENT
  • #5 18897230
    krzbor
    Level 27  
    khoam wrote:
    The transmission is UDP, unacknowledged (it's basically WiFi over MAC, no IP) - either MAC unicasts or multicasts are sent. Of course, the devices require 'pairing'. Sending of packets is done immediately.
    I thought so too, but the manual says "The sending callback function that can be set to inform the application layer of
    transmission success or failure." How is this supposed to be implemented? To do this requires an acknowledgement that is typical of TCP and absent in UDP (I'm leaving out UDP's own communication solutions implemented at a higher layer). Unfortunately, the only thing that can be said about the ESPRESSIF instructions is that they are (good and all). The ESP8266 Technical Reference is 117 pages long. For example, the description of the ATTINA 2313 is 274 pages, and these are, after all, completely different classes of processors.
  • ADVERTISEMENT
  • #6 18897294
    khoam
    Level 42  
    krzbor wrote:
    I thought so too, but the manual says "The sending callback function that can be set to inform the application layer of
    transmission success or failure."
    .
    This means that the callback function returns information about whether the packet has been sent from the output buffer. You should check this before requesting the next packet to be sent. The WiFi transmission medium is slower than the application, which will request that subsequent packets are sent.

    krzbor wrote:
    Unfortunately, the only thing that can be said about ESPRESSIF instructions is that they are

    https://www.espressif.com/en/support/documents/technical-documents
  • #7 18897374
    krzbor
    Level 27  
    I understand that, in your opinion, the realisation of a smooth transfer at 512kb/s (32ksample/s) with no delay is as possible?
  • #8 18897598
    khoam
    Level 42  
    ESP-NOW's default transfer on ESP32 is 1Mbps, but ... WiFi is not a cable. In case of interference, it can decrease. A packet of 250 bytes takes about 2ms to 'reach' the receiver.

Topic summary

The discussion revolves around the feasibility of using a MEMS microphone with an ESP32 for a wireless microphone application via ESP-NOW. The main concern is whether the 12-bit A/D converter in the ESP32 is sufficient for high-quality speech transmission, as the user contemplates the need for 16-bit resolution. The conversation also addresses the sampling rate of 32kHz and its adequacy for real-time audio transmission. Participants clarify that ESP-NOW operates similarly to UDP, with no acknowledgment of packet receipt, allowing for immediate transmission. However, they note that the actual throughput can be affected by interference, with a typical packet taking about 2ms to reach the receiver. The importance of managing packet transmission to avoid delays is emphasized.
Summary generated by the language model.
ADVERTISEMENT