Question/Issue:
I am running a simple example to detect when a motor is idle or running using the built in accelerometer on the Arduino Nano BLE33 Sense Rev 2 development board. While the Edge Impulse binary inference works, the Arduino IDE compilation does not produce inference that works.
Project ID:
771413
Steps Taken:
Successfully deployed using the binary that Edge Impulse offers for the BLE33 - inference worked correctly.
Successfully ran the static buffer Arduino example using raw features for both idle and run states.
Uploaded the Arduino example “nano_ble33_sense_rev2_accelerometer”, but inference does not work as it did in step 1 (Only detects one state).
Expected Outcome:
Inference should work the same way when compiling from Arduino IDE as it does when using the Edge Impulse binary.
Actual Outcome:
When compiling from Arduino IDE, inference is not working. However, when compiling directly from the EI binary, inference works as expected.
Reproducibility:
Always reproducible
Has anyone encountered this issue before? Any suggestions for troubleshooting would be greatly appreciated.
Hello @mark.smith24 first of all welcome to the Edge Impulse community!
What you reported is a very good question! I have other questions for you:
did you collect the samples of training with the Arduino in the same position as it is now? I’m thinking if the raw accelerometer values are coming with a different units or orientation?
could you please confirm the sampling rate and window size of your features? Is the arduino code using the exact sampling frequency during inference?
Yes, the board has maintained the same position and orientation during training and when running inference. The board has been attached to a bracket that attaches to the motor. I wanted to make sure that this was one less variable in my setup.
The frequency is set to 100Hz, window size to 300ms, window increase to 50ms with zero padding selected(I have tried other settings to no avail). The EI_CLASSIFIER_INTERVAL_MS is set to 10, which is correct for 100Hz.
Any other suggestions would be greatly appreciated.
@mark.smith24 discussing this with a colleague, he suggested that the arduino has the Rev2 firmware correct, but the given example from the studio might be giving the application working for the Rev1 board accelerometer.
Could you please check in the repo and see if there is any missmatch with the accelerometer parameters?
In that case, the embedded team will need to update the example application depending on the Arduino version.
Hi @Eoin, I didn’t run the continuous example because I was able to get inference running without using --continuous from the compiled binary. I just couldn’t replicate the same results when running from the Arduino code.
However, I did try to run the continuous example from the binary using the command edge-impulse-run-impulse --continuous. But I get the following error: “Error: no continuous classification available for current model”. Moreover, I tried the Arduino example and was not able to get the correct inference results.
On another note, when doing some additional testing on the compiled binary (not continuous), after around 2 minutes I get the following errors: “ERR: Failed to run DSP Process (-1004)” and “Failed to run impulse (-5)”. Could this be the issue?
Just an update on this project. I was able to get my project working on an Arduino Nano RP2040 Connect, using the same example (“nano_ble33_sense_rev2_accelerometer”) with just changes to the IMU to suit the RP2040 Nano.