A Real-Time Networked VU Running On The ESP8266

Even though the ESP8266 WiFi chipsets are really cheap (and can be somewhat challenging to work with), they still pack a lot of processing power. For instance, [Mr.jb.swe] took one of these modules and made a stand-alone live VU meter with WS2812B LED strip. The VU runs entirely on the ESP chip, without any additional microcontroller. It’s an example we think a lot of projects could follow to do away with unused horsepower (extra microcontrollers) sometimes used to avoid programming directly on the ESP. The stuff you can do with these modules is wild… did you see this WiFi signal strength mapping project?

The ESP chipset acts as a UDP client which receives packets from a WinAmp plugin that [Mr.jb.swe] wrote. The plugin continuously calculates the dB of whatever track is playing and streams it over WiFi to his ESP8266. He also mentions that the ADC of the ESP chipset could be used to sample audio as well, although that pretty much eliminates the need for WiFi.

The whole setup is very responsive even though the processor is parsing UDP messages, driving the WS2812 strip, and driving a small OLED display for debug—and it doesn’t even use a separate microcontroller. [Mr.jb.swe] also posted snippets of his code to get you started on your own project. Check out the videos after the break to see it in action.

21 thoughts on “A Real-Time Networked VU Running On The ESP8266

  1. I think calling this a “Stand-alone Live VU meter” is to take it a bit too far. It’s actually just a remote display unit for winamp, it doesn’t do any metering itself. Would a microcontroller, connected by USB to the PC, driving a LED strip also be at “stand-alone” unit?

    Still, a cool hack…. But connecting a microphone and doing the fourier analysis on the ESP would be even cooler – and then streaming that data to the PC instead :-)

    1. true, it’s just a proof of concept .. this project is standing on shoulders of others like CNLohr and Boris Ribov

      >But connecting a microphone and doing the fourier analysis on the ESP would be even cooler
      I think there is more then enough horsepower…fix_fft 8-bit shouldn’t be a problem….but is the ADC up to the task thats the big ?? ( It might be necessary with an spi controlled ADC…but I hope not )

      I hope/believe this is within reach for the Esp8266
      https://www.youtube.com/watch?v=tCmaOb-VAEo

    2. Do you even need a “fourier analysis”? I’m not familiar with what, if any, frequency-domain weighting is used in a VU-meter, but surely that weighting can be realized in the time domain with an FIR or IIR filter, then take a rolling RMS average?

  2. What is the maximum latency you’re seeing? I’m thinking about using this to transmit ~2kB data packages with about 20+ Hz, but need a low latency (~20ms)… Is this realistic with WiFi and/or the ESP8266?

      1. Thanks for the answer. So you could send a message every ~2ms. Did you measure (or have an idea of) the delay between sending a message and the data actually arriving and being displayed at the ESP8266? For audio applications this latency should ideally be max. 20ms, otherwise it may become noticable…

        1. Cnlohr’s demo program top.c generates a pattern any irregularity’s will be noticeable by the eye …but I guess the ear might be more sensitive to short differences. Note that I have only received with Esp8266 ( guess sending will be easier )

  3. “and driving a small OLED display for debug”

    I believe this is just the power-meter in between the battery and the esp8266.
    So this is not at all ‘driven’ by the device, nor does it do any ‘debugging’.

Leave a Reply to bimoverbohmCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.