Arduino Nano RP2040 help

i tested today after my vacation.
Mic is not running :frowning:

I tested again with this Arduino Sketch. My MIC needs 20000Hz not 16000Hz
then is working with SerialPlotter.

Can you check again?

Erm. An official example for using microphone on RP2040 Connect suggests using 16000 Hz frequency. Therefore RP2040 Connect microphone should support this frequency.
If the mic on your board does not support 16000 Hz recording, it means that you likely have a different board.

I found the Bug.
Decimation could be 128 not 64
There is a Codesnippet in PDM.cpp thats set to 64. Why?
I disable then MIC Data send to Edge Impulse.
But only set 16000Hz not 8000Hz the Record is ok.

But there is also a Spike Bug

Is this the Bug?

I will open a Github Issue by Arduino

The PDM library is taken from Arduino mbed core for RP2040. As your rightly pointed, the switch to 64 decimation factor was added by this PR
If left at 128 for 16000 Hz sampling rate, the clock frequency would be too high for RP2040 Connect mic.
I have tested the microphone ingestion just now and it works perfectly.

this is for quiet room at 16000 Hz

this is for quiet room at 8000 Hz
Would you like to send pictures of your board to see if it the same revision?
Regardless, if even Arduino Mic Plotter example sketch does not work for you, it is likely an issue on hardware side, that needs to be addressed by Arduino.

i set only decimation = 64 (remove 128 in PDM.cpp) and tested with 8000Hz
Thats running fine!!!

BLE33 MIC running fine with 16000Hz but there are no Filter Setting.

Whats the Problem with the Arduino Connect RP2040 with 16000Hz and 128???

is there any experience of whether 16kHz for audio training is better than 8kHz? I think it depends on the use case

To reiterate - if you look at the code, you’ll see that if you set frequency to 16000 Hz, the decimation rate will be set to 64. If frequency is 8000 Hz, then decimation rate is 128.
The microphone on Connect RP2040 will not support 16000Hz and 128 decimation rate - it exceeds the microphone sampling frequency limit, calculated as sampleRate * decimation * 2.
The problem you’re having is likely hardware one - again, I suggest take it to Arduino team. The best I can do here is to record which hardware do you have exactly.

I found this which also describes my problem.

Maybe the Arduino team’s decision to use the same microphone hardware as the BLE33 Sense wasn’t too good after all. Because the BLE33 works well with 16000Hz, only that unfortunately it does not have a Wifi module. There seems to be boards where it works and which ones where it doesn’t. The Nicla has the MP34DT06J not the MP34DT05 but the same library.

Hello Sir,
Thanks for your previous comment regarding the procedure to make firmware for Nano RP2040. I tried it and I was successful in it. Thanks to you. I have started training the model. However, I am facing one problem. When model training was done, I build library for the model. In that library, I only found nano_ble33_accelerometer. I didn’t found nano_ble33_accelerometer_continuous. Kindly guide me through this.
In addition, could you please tell me why did you change line #191 to EI_CLASSIFIER_SENSOR_FUSION. Kindly reply. Thanks in Advance

Hello @Jatin,

Also adding this reply here: Edge impulse is not providing arduino accerlerometer continious code on build - #4 by louis

nano_ble33_accelerometer_continuous examples will be soon added again. It was a bug on our side.



Hi @Jatin, thanks for your message. You can see my write-up in hackster here. The reason I change line #191 to EI_CLASSIFIER_SENSOR_FUSION is because I want to use both accelerometer & gyro data.
As for the continuous example, I had just downloaded the library from my project and there is no continuous example anymore, not sure why EI remove that. But if I recall correctly, I remember that example didn’t work well for my project (forgot whether is run out of memory or just didn’t work). Hopefully EI will reach out to you to answer your question.

Hi - I’m sorry to be confused here. I believe you developed and now support the Arduino RP2040 Connect, and refer to the documentation. The documentation also states full support, but in the same documentation refers support for Arduino Connect to “Raspberry Pi RP2040 - Edge Impulse Documentation”, where it says ‘no support for mic’, for example. The official Pi 2040 firmware does not appear to recognize the Arduino Connect, thinks it’s a Pi board.
I have both boards, but would like to use the Arduino Connect. Do you recommend I continue with the Pi board, or is there a separate build for the Arduino Connect?
Thank you very much!