Help with I2C for a project.

I've been working to connect an arduino slave to an arduino master in a submarine Robot (OpenROV) but I have some difficulties:
-The I2C bus which came from the OpenROV is 3V and I have an arduino UNO which I believe needs 5V for I2C so I have used this device, as someone told me to do in this forum:
https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide
And to do so I've connected the things in this way:

but something is not working.

The arduino UNO has it's own energy supply with a Lipo Batery

Please I would appreciate any help you can offer me!

Javi

You need to connect the ground signals as well on the two systems.

Can you explain a little more. What do you mean with connecting the 2 ground signals?

You have two Arduinos so as well as the two I2C lines going between them you also need the ground connected between the two systems.

You have two Arduinos so as well as the two I2C lines going between them you also need the ground connected between the two systems.

To tie "GND" pins togheter (of the two arduinos)

Best regards

Are you sure? You mean I should connect the to ground pins in the level shifter? I'll try later on to see if it works.

The rest of the wires are well hooked?

Yes I am sure. If you have not connected the grounds together there is no way it can possibly work. Why do you think it should?
All grounds must be connected together.

I thought both GND on the level shift converter were all ready connect it

That is an example of I2C conection with the device and each GND is in it own side.

Looks more like SPI to me.

Yes that is not an I2C system on the Arduino side.
Also note you can not draw more than 50mA from the 3V3 output of the Arduino so powering that second system from the Arduino could be tricky.

Oh, as you can see the electronics is not my strongest point.

How should I connect it then,.. like one of this schemes I am attaching?

I don't understant very good what you mean with tricky, I have a LiPo battery to feed the Arduino.

I found a Playground article that seems to answer your question.
3V3 I2C for Uno

oh! According to that guide I wouldn't need the level shifter at all. I could do it directly (activating the I2C resistors).

In my case my arduino is a slave device to another arduino, but I think with that guide it shoud be possible to fiure out how to do it.

Thank you a lot!

If you have any more advices, please tell me! In 3-4 hours I'll connect it like it is explained in the guide and I'll tell you the results!

You can only use that circuit if you use an I2C library that does not enable the internal pull up resistors.
The standard one does, so you have to hack it to stop that happening or use another like the I2C Master Library

I don't understant very good what you mean with tricky, I have a LiPo battery to feed the Arduino.

That circuit powers the second system off the 3V3 regulator of the first. By tricky I mean if your second system draws more than 50mA then you will fry the regulator on the first system if you wire it up like it is shown.

So if I am using a normal library how should I hooked it? directly to the GND, 3V3 (in the Arduino UNO), A4 and A5 pins???

I am very messed up. Coud you draw a scheme in paint, it would help a lot.

The LiPo battery wich feeds the arduino UNO is a 7.4 V battery.

Thank you a lot for the help ^^

Javi

So if I am using a normal library how should I hooked it?

It should go through the logic level shifter.

But how, like in scheme 1, shcheme 2 or scheme 3??? Or in another way?

groundfungus:
I found a Playground article that seems to answer your question.
3V3 I2C for Uno

The problem I see with doing dat conection directly it was that I don't know if it would receive the messages coming from the master arduino.

Well I don't do Fritizing abortions.

  1. Those pictures are far too big, have you clicked on one? You should have a picture no more than 1000 pixels wide.

  2. The wiring of your level shift can not be verified

Having said that then 3 might be the way to go but I am having a hard time turning those back into schematics in my head.
Can you not use schematics then we could all play.

You could turn the pull-ups off again. eg.

Wire.begin ();
// de-activate internal pullups for twi.
digitalWrite(SDA, LOW);
digitalWrite(SCL, LOW);

They would be on for a brief moment, which Grumpy_Mike will probably tell me is too long. You could always edit the source in your Arduino distribution (file: twi.c).

Grumpy_Mike:
Well I don't do Fritizing abortions.

  1. Those pictures are far too big, have you clicked on one? You should have a picture no more than 1000 pixels wide.

  2. The wiring of your level shift can not be verified

Having said that then 3 might be the way to go but I am having a hard time turning those back into schematics in my head.
Can you not use schematics then we could all play.

Hope you can see better like this, I can also upload some pictures.

This is the scheme for I2C conection the show in the webpage of the bidirectional level.


I don't use the wire wich goes from the arduino 3V3 to the LV pin, because in the other side I have another arduino wich gives 3V3 but, I don't know if I must hooked the GND or the devices do it internally.

And here there are the schematics of the level shifter:
schematics of the level shifter