i tested today after my vacation.
Mic is not running
I tested again with this Arduino Sketch. My MIC needs 20000Hz not 16000Hz
then is working with SerialPlotter.
Can you check again?
i tested today after my vacation.
Mic is not running
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 https://github.com/arduino/ArduinoCore-mbed/issues/289
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.
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.
Best,
Louis
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!
Hey folks I am a newbie on this and kinda losing my mind trying to get my Adafruit LSM6DSOX ST work on edge impulse. I would really appreciate if you could help me. I am trying to read accelerometer and gyroscope values from Adafruit LSM6DSOX which is connected to Adafruit Feather RP2040. When I make the changes above mentioned in Wire.h, after flashing I get this error -
[SER] Could not find any devices connected over serial port
[SER] Retrying in 5 seconds
Any help would be truly appreciated!
Hi @dataexplorer007,
Did you load the pre-compiled RP2040 firmware from Edge Impulse onto your board? Raspberry Pi RP2040 | Edge Impulse Documentation You need this running on your RP2040 board prior to connect with the Edge Impulse CLI daemon.
Also, note that the firmware listed above only works with the sensors listed here: Raspberry Pi RP2040 | Edge Impulse Documentation. It will not work with the LSM9DSOX. So, you will need to either use an LSM6DS3 or write your own firmware to capture and store samples or switch to an LSM6DS3.
If you write your own firmware, note that you can use the Data forwarder to capture data from the serial and send it to your Edge Impulse project.
@shawn_edgeimpulse we actually support ST LSM6DSOX 6-axis IMU for RP2040 as well, it is mentioned in the same document Raspberry Pi RP2040 | Edge Impulse Documentation
a little bit lower
Support for Arduino RP2040 Connect was added to the official RP2040 firmware for Edge Impulse. That includes data acquisition and model inference support for:
onboard MP34DT05 microphone
onboard ST LSM6DSOX 6-axis IMU
the sensors described above still can be connected
However I really have no idea what it has to do with the original topic discussion.
@dataexplorer007 please create a separate topic with detailed description of the problem, thanks!