Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
I2C on LTE extension board
-
Hi,
I've connected a sensor with I2C interface to the LTE extension board (GND, 3.3V, SCL=D09/PWM3, SDA=D03/PWM) and ran the I2cScanner1.ino example, with the result that no I2C devices have been found. Cross-checked other sensors with I2C interfaces and other cables: same result - no devices found. Also cross-checked the same sensors connected to an ESP32 development board: all sensors recognized.
Any ideas? -
@dxcfl
https://developer.sony.com/develop/spresense/docs/hw_docs_lte_en.html#_how_to_use_i2cUnder the How to use I2C sections, this links says that "the LTE extension board is used exclusively with PWM2 and PWM3". Maybe that is the issue.
-
Hi,
Sorry to jump in from the side ... I read this documentation 5 times ... and did not understand it. Maybe the translation could be improved here. It is called "shared pin" in the answer below (共有ピン)
I was curious, so I googled for it and the first hit after the docu was ...
that this question has been asked on stackoverflow and answered by the official Spresense account
https://ja.stackoverflow.xn--com/questions/80455/lte-i2c--arduino--8839aupgf8drc62fqi61g7yat9b0640gh4uf3mobv20oThe translated summary is
- You have to use Wire1 and it is available from SPRESENSE beta release (2021/09/11) onward.
To understand the full answer please try google translate
https://ja-stackoverflow-com.translate.xn--goog/questions/80455/lte-i2c--arduino-?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=ja&_x_tr_pto=wapp-q733ggsb1k2i3d02kjta43oj4bmwf9u11jufske2vcwcxv -
@CamilaSouza Hi Camila, thanks for your repsonse.
'"the LTE extension board is used exclusively with PWM2 and PWM3". Maybe that is the issue.'
Yes, maybe. But what does this statement mean? That it is not possible to use I2C with the LTE extension?The document https://developer.sony.com/develop/spresense/docs/arduino_developer_guide_en.html#_wire_library
suggests, that it is possible to uses the pins D03/D09 with Wire1, which I tried without success. -
@jens6151-0-1-1 Hi, thanks for jumping in and thanks for the link.
That is how I did understand it.
https://developer.sony.com/develop/spresense/docs/arduino_developer_guide_en.html#_wire_library - Table 22
and
Wire1 ... SCL=D03 aka PWM2, SDA=D09 aka PWM3
So, I2cScanner1.ino (using Wire1 instead of Wire), should be able to find a connected device.
In the document you shared SDA and SCL are swapped, but I tried this also.
I also tried to change the voltage with jumper CN2 (for the sensor boards which could operate with boath 3.3 and 5 V). -
@dxc-fl
Do you have an analyzer to check it the board is actually generating the clock in the SCL pin?I have one and I can try and see if it's working on my side too.
-
Sorry, I don't have one at hand right now.
-
@dxc-fl
Ok. Let me see if I can figure out anything on my side. -
Hi Camila,
thanks for your support so far.I've run some additional tests with every I2C sensor I could get a hold of and it's quite interessting.
- It worked with e.g., some BMP180, BME280, TMP006, APDS9960, ... breakout boards.
- It didn't work with e.g., a VEML6075, a GY-906, a CJMCU-811, a MAX30100, ...
- All sensors worked on an Arduino UNO clone and an ESP32 Dev Board.
Maybe an issue with the pull up resistors?
-
That's interesting.
I still haven't found out why this is the case. I'll continue this investigation internally, but let me know if you have any progress in the issue.