Manage cookies

We use cookies to improve our services. Read more about how we use cookies and how you can refuse them.

The necessary cookies help to make the website work properly.

Anonymous statistical cookies help to understand how visitors use the website.

  • MicroPython
    2 min | 6407

    #MicroPython: Vu meter using WS2812B and SPW2430

    MicroPython | 2 min | 6407


    Hi everyone! As soon as I saw the WS2812B led strip, I thought: doing a vu-meter with these LEDs would be a nice thing!.

    I was looking for economical MEMS microphones with board (I didn't want to solder a board). I found two options: SPH0645LM4H and SPW2430.

    The SPH0645LM4H uses an I2S interface and the SPW2430 has an analog output. The second board (SPW2430) has two outputs: AC pin which has a capacitor in series to eliminate the DC output of the IC, and the output of the IC (DC pin).

    Preview

    Hardware

    I bought the MEMS mics from exp-tech, here some links:

    I planned to used the Wipy2.0, that's why I've choosen the SPW2430 for this project. The I2S is not implemented on the Wipy2.0 (some code can be found here, but it's not working, I think).

    Update August 2020:
    I've extended the MicroPython official version to support I2S.
    You can find the driver here:
    Additionally, you can read the following post:which is related with the M5tack ATOM Echo that has an I2S microphone.

    Wiring

    Wipy 2.0WS2812BSPW2430
    3.3vVCCVIN
    GNDGNDGND
    P11(G22)GREEN CABLE
    P13(G5)DC

    I sampled the DC output of the SPW2430 using an osciloscope and I got the following figure

    Audio sample SPW243!
    Fig. 1: Osciloscope capture: SPW2430 output signal

    The input was generated with my smartphone using a tone generator app at 440Hz (A). The output signal is not bad. Some noise peaks can be seen, but for a vu-meter that shouldn't be a problem. If you are going to use this microphone in your proyect, I would suggest to use an OP to amplify the signal. According to the board description the sensor can provide a Vpp = 200mV. More details about the board are: f = 100-10kHz, Zout = 450 Ohms and DC bias = 0.7V.


    Comments

    Empty