1
\$\begingroup\$

I have created two projects, one with a Tiny RTC and another one with the BM180 sensor to read barometric pressure and temperature. Now I want to combine both.

I'm trying to connect both - the BM180 sensor and a TinyRTC clock module via. the I2C pins to my Arduino Uno (r3) and because I'm just a beginner I have some problems.

The BM180 works with 3.3V, but the TinyRTC is on 5V. Can I just connect all the SDA together and all the SCL together?

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Welcome to EE.SE. There is an Arduino StackExchange site that you might like to know about too. \$\endgroup\$
    – David
    Commented Jun 7, 2014 at 15:07

2 Answers 2

2
\$\begingroup\$

The DS1307 used in the TinyRTC is not designed to run at 3.3V. It will go into backup mode, only keeping time. But it has a Voltage Input High minimum of 2V. As I2C is a open collector bus, where a device only pulls the line low, and then releases it so the pull-up resistors bring it high, this can be done simply by making sure the pull-ups are connected to the right voltage. Since the BM180 can only run at 3.3V, that sets the required i2c voltage.

Power the TinyRTC at 5V, and the BM180 at 3.3V. Simply remove or cut the i2c pull-ups on the TinyRTC module. If your BM180 is a module with pull-ups to 3.3V, then you are done. If not, use two pull-up resistors (4.7k is average) to a 3.3V source. Then the rest depends on your code.

\$\endgroup\$
1
  • \$\begingroup\$ So it's not as easy as I thought... well thanks, I'll try to do this. I just saw that there is also another RTC (DS3231) that can run on 3.3V so if this doesn't work maybe I'll go check if I can find it somewhere. \$\endgroup\$
    – Jure1873
    Commented Jun 7, 2014 at 15:33
1
\$\begingroup\$

Here is an interesting article (technical paper) to read, which describes how to do it using only a MOSFET for each I2C line, and some resistors. link to app note an97055

Check out sparkfun's bi-directional logic level translator which is just a breakout board for this approach on 4 I/Os (you only need two though) link to schematic

link to product itself

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the response, but apparently this is a little to complicated for me (for now) :) \$\endgroup\$
    – Jure1873
    Commented Jun 7, 2014 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.