I'm using <TWI Scanner> example on nRF52 DK to find my sensor's address.
According to the sensor datasheet, the sensor's address is 0x21. However, <TWI Scanner> finds the address at 0x20.
Any idea, please?
I'm using <TWI Scanner> example on nRF52 DK to find my sensor's address.
According to the sensor datasheet, the sensor's address is 0x21. However, <TWI Scanner> finds the address at 0x20.
Any idea, please?
I used this Arduino code from Github. Please remember to uncomment the code at line 13, which is used to customize the I2C address. If I change line 13 as I2C address 0x21, my sensor works well. For all other I2C addresses, my sensor has no data output.
Hi,
I see. Can you also make plots of the exact same read operation as you do from the nRF? I would like to see a comparison in order to understand more. Unfortunately I do not have the SDP31 so I am not able to test with that on my side.
Hi Einar, thank you very much for ur help.
For Arduino UNO, I used I2C to scan my sensor. Here are the plots of SDA (blue) and SCL (red).
Image 1: you could see the Arduino scans 127 I2C addresses.
Image 2: you could see for the 34th address (0x22), Arduino detects the sensor, which is correct.
Image 3: more detailed 34th address SDA and SCL signals.
It looks correct on Arduino.
Here is what I did on nRF52 DK:
1. Use one 4.7k ohm pull-up resistors for SDA and SCL respectively
2. Connect nRF52 detect pin to GND.
3. compile and run <TWI scanner> code.
I found that my nRF52 scans the other devices (e.g. Arduino UNO) show the I2C address is 0x20 as well. It seems like the nRF52 returned I2C address doesn't change.
Since Arduino UNO can detect the sensor at the correct address, I suspect that it's the issue of nRF52.
Thanks, Einar
Update.
In sdk config, I changed SCL and SDA pins as pin 3 and 4. These 2 pins work well in <twi_master_with_twis_slave> example. Then, I used <TWI scanner> to scan my sensor address.
It shows "No device was found".
Hi,
Thank you for the plots and info. This is a bit of a mystery, to be honest. I will look more into it tomorrow and get back to you.