I am currently working on a project involving the ICM42670P sensor, and I have successfully implemented the code on an Arduino Mega 2560. However, when I attempt to run the same code on the Seeed nRF52840 board, I encounter issues, and it does not function as expected.
Even when I scan for the device address, I receive a message indicating that the I2C device is not found. and IMU.begin(); not working
It looks like the ICM42670P has 3.3V input/output and the Arduino Mega 2560 has 5V input/output, how did you connect them?
Please tell me the link between the two devices you are going to use, and explain how to connect VDD, GND, SDA, SCL.
Seeed nRF52840 board
the ICM42670P sensor
edit
I saw a picture posted on the Arduino Forum. The sensor seems to be connected to 5V, shouldn’t it be connected to the 3V3 pin?
the seeed NRF processor is much more sopisticated and different than Arduino Mega… you will probably have to start with NRF code as a base and back into your device lib… Doesnt the NRF have a IMU onboard?
Yes, I connected to the 3V3 pin. I double-checked all the pins against the documentation, and everything seems fine. Should I change the IMU library? I’m unable to find the address of the I2C device. and my own problem is this line IMU.begin();
Is your ICM42670P a module? Or is it a breakout board?
There are no pull-up resistors on SDA and SCL of XIAO, but are there on the ICM42670P side?
Just to confirm, the hardware connections, including pull-up resistors, are OK?
I double-checked all the pins against the documentation, and everything seems fine.
Please tell us exactly how you made the connection.
What BoardServicePackage and ICM42670P libraries are you using?
I2C_Scanner needs to work before IMU.begin(). Were you able to detect the address of the IMU?
edit
I think the SDA and SCL pins of Arduino Mega 2560 may have a 10k pull-up resistor.
1 Like
I want to send a picture of a designed board, but I can’t upload it in this forum. Could you help me find another way to send the picture and assist me with it?"
I do not have an ICM42670P, so I am limited in my ability to help, but I will help as much as I can.
First, please answer the questions in post #5.
In particular, is there a pull-up resistor?
If you can’t post pictures, I can have them sent to me via direct mail.
There are pull-up resistors (10kohm) for the SDA-line and for the SCL.
I can’t find your mail so this is my Email: [email protected]
You can send an email by clicking on my “ms” mark and then on the “Message” mark.
Please answer any questions other than pull-ups. I am missing some basic information.
Elmira_Ab can’t post pics yet, so I’ll post them instead.
Is AP_CS(pin 12) open? For I2C interface, it must be connected to VDDIO.
I think the I2C is connected correctly because when I replaced the ICM42670P with another board, the MPU 6050 worked. Do I need to change the ICM42670P library to connect to the Seeed nRF? It seems I don’t have a hardware issue, but why can’t I find the I2C address, and why is IMU.begin();
not working?
I have asked many questions so far, is there any reason why you have not answered any of my questions other than pull-up resister?
I thought that by sending the circuit design photo, I would have answered your question. Regarding the pin that is for I2C, the answer is yes; it is connected as it was tested with another board. I sincerely apologize and thank you very much for your help.
Regarding the pin that is for I2C, the answer is yes; it is connected as it was tested with another board.
So AP_CS(pin 12) was connected to VDDIO. Please answer as explicitly as possible.
- ICM42670P has 3.3V input/output and Arduino Mega 2560 has 5V input/output, how did you connect them? I think you need a level shifter.
- Have you ever applied 5V to the ICM42670P, even momentarily? If so, it may have been destroyed or severely damaged.
- It appears to be wired to the battery pad, are you using a battery?
- Have you run I2C_Scanner with nRF52840 connected to ICM42670P board? I2C_Scanner does not require ICM42670P library and checks pure I2C hardware. If the address is not displayed, there is a problem with the hardware, including the connection.
If you can get to 4, think about IMU.begin()!
Why use a different IMU when there is an nRF52840 with an IMU on board? This is just a question out of curiosity.
1 Like
So the Arduino MEGA also has a 3.3V output via which the power supply of the ICM runs. No more than 3.3V was ever applied to the sensor itself, so I assume that it was not damaged. In the future, the power supply will be provided by a battery connected to the XIAO. At the moment, however, the whole circuit is powered via the USB cable. I have carried out an I2C scan and was unable to determine a unique address with the NRF. Therefore, I also assume that this is a hardware problem because pin 12 of the ICM is not connected. I was just hoping that it wasn’t.
Yes, i come to the conclusion, that it is a hardware problem and you are totally wright. I have to connect pin 12 to VDDIO to get what i want. Thanks for your help.
1 Like