donnersm / FFT_ESP32_Analyzer

Spectrum analyzer 8-64channels FFT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I2S dma errors & pcb suggestions

Ultrawipf opened this issue · comments

Regarding the software i am not able to get it working and spent some time debugging without any results yet:
After one iteration of the mainloop the chip hangs and does not read another sample buffer after the first buffer is processed.
In the serial terminal on every call to the i2s_adc_enable or i2s_adc_disable function it will print a dma error: "I2S: dma error, interrupt status: 0x00002000"

The led matrix is set as a 2x64x64, hub75 enabled, i2s SAMPLEBLOCK = 1024 as default with 2 dma buffers and a sample rate of 44.1kHz.
Increasing the amount of dma buffers to 4 for example will process 3 buffers before it hangs.
The ADC data itself looks valid.

Regarding the PCB design i have a few suggestions of things i noticed while assembling:

If it is intended for the led matrix to be driven by the board i would replace the LDO with a switch mode converter or leave out the power input side completely and expect a regulated 5V input to just pass through.
The expected currents are way too high for a linear regulator and the diode drop will be significant as well resulting in very poor efficiency and high heat at those currents expected by a larger panel. I am completely bypassing the power input section with a fixed 5V PSU.

The analog circuitry should probably be supplied by 3.3V either via a separate LDO or the ESP32 onboard one so it safely clips to 3.3V reducing the need for resistors as there are also a lot of unique resistors and capacitors that may be possible to combine reducing the complexity.

Maybe i misinterpreted some design decisions but thats probably how i would have designed it.

Thanks for reminding me to check the library versions, should have tried that before.
Downgrading the hub75 library from 2.0.7 to 2.0.5 actually fixed it so there did something change in the newer versions it seems.

Still need to do some debugging of sampling and FFT later but at least i get adc samples and a smooth fire animation.

I would like to switch to add an alternate mode with wifi support which does not have to run at the same time as the ADC if there are conflicts. Mostly for remotely displaying messages/graphics or possibly even video via a simple protocol.
Would you be interested in such features as well?

Regarding the power supply using 5V for the amplifier section might be helpful to get the best performance. But still i would leave out the LDO for the led supply.

Anyways nice project :) I see that you already put in a lot of work and it has a lot more potential as well.