I’ve been using two arduino’s uno connected via I2C (A4,A5) and ground of both connected. They are powered separately each one from two AA batteries via a step-up to 5v. It is working 100% and the master arduino is sending the data correctly to the slave.
However I’d like to have only one pack of 2xAA powering both of them. In this case I assume I must remove the ground wire connecting them to avoid a ground loop. Is that correct?
Why would you get a ground loop with a single connection? Make a drawing how you think it should be wired. Then maybe we can fix your misunderstanding of a ground-loop.
In the mean time I made a crude drawing of what a ground loop would be. Also, if you would use shielded cable to run the SDA and SCL wire through, and the shield connected to ground then you would also get a ground loop. But long wires and I2C don’t go together well anyway since signal quality drops. It’s meant to be used for short distances.
[EDIT] The step-ups can probably be reduced to a single one also.