user47579: I have two I2C devices connected to an Arduino Uno: an RTC and an OBD interface (see links below). The SCL/SDA of both devices connect parallel to SCL/SDA (respectively) of the Uno. My problem: when I set the time on the RTC (either using the autoset option, or explicitly) it reports back odd readings, like the date set back by 4 days, the hour set back by 2 hours etc. This happens even with the default bare-bones RTC sample sketch.
I tried two RTCs (one DS1307, and the one linked below): both show the same strange behavior. I tried 2 configurations: 1) NO pull-up resistors on either device, 2) two 10K pull-up resistors on BOTH devices. Both situations produce RTC errors. If I detach the OBD sensor from SCL/SDA, the RTC shows the proper time. If I remove the RTC, the OBD by itself (works fine. Before I spend more time experimenting: any advice how to solve this pull-up resistor situation (if this is what it is)?
Adafruit DS3231 Precision RTC
OBD Freematics interface

user7734: I imagine you are using the Adafruit Library, since thats the URL of the product you posted.
If so, in RTClib.h:
#define DS1307_ADDRESS  0x68
#define DS3231_ADDRESS  0x68

And in the OBDs product page:
OBD I2C Address: 0x68

MEMS I2C Address: 0x62

Which obviously causes a conflict.
It seems that they have a fixed I2C address (some devices are configurable via software, others with external pins). So the solution would be to use other RTC, other OBD (or change its address) or use a bus splitter, or use a MCU with more than one I2C bus.

47579: <p>I have two I2C devices connected to an Arduino Uno: an RTC and an OBD interface (see links below). The SCL/SDA of both devices connect parallel to SCL/SDA (respectively) of the Uno. My problem: when I set the time on the RTC (either using the autoset option, or explicitly) it reports back odd readings, like the date set back by 4 days, the hour set back by 2 hours etc. This happens even with the default bare-bones RTC sample sketch.</p>

<p>I tried two RTCs (one DS1307, and the one linked below): both show the same strange behavior. I tried 2 configurations: 1) NO pull-up resistors on either device, 2) two 10K pull-up resistors on BOTH devices. Both situations produce RTC errors. If I detach the OBD sensor from SCL/SDA, the RTC shows the proper time. If I remove the RTC, the OBD by itself (works fine. Before I spend more time experimenting: any advice how to solve this pull-up resistor situation (if this is what it is)?</p>

<p><a href="https://www.adafruit.com/product/3013" rel="nofollow noreferrer">Adafruit DS3231 Precision RTC</a></p>

<p><a href="https://freematics.com/pages/products/arduino-obd-adapter/" rel="nofollow noreferrer">OBD Freematics interface</a></p>
 7734: <p>I imagine you are using the <a href="https://github.com/adafruit/RTClib" rel="noreferrer">Adafruit Library</a>, since thats the URL of the product you posted.</p>

<p>If so, in RTClib.h:</p>

<pre><code>#define DS1307_ADDRESS  0x68
#define DS3231_ADDRESS  0x68
</code></pre>

<p>And in the OBDs product page:</p>

<pre><code>OBD I2C Address: 0x68

MEMS I2C Address: 0x62
</code></pre>

<p>Which obviously causes a conflict.</p>

<p>It seems that they have a fixed I2C address (some devices are configurable via software, others with external pins). So the solution would be to use other RTC, other OBD (or change its address) or use a bus splitter, or use a MCU with more than one I2C bus.</p>
