3
\$\begingroup\$

Will I have some trouble if I try to establish a I2C communication between 2 µC powered from two different source?

Both µC run on 3,3v but this voltage is provide from a different regulator (LM317). Exact 3,3v isn't guarantee due to resistor tolerance. Since both regulator have same ground, there is no big voltage "gap" between the µCs.

I'm pretty sure it's gonna work but I'd like to have the EE community acknowledgment.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • 1
    \$\begingroup\$ It will work... \$\endgroup\$ – Eugene Sh. May 15 '17 at 21:57
  • 2
    \$\begingroup\$ I knew it. I should trust myself a bit more \$\endgroup\$ – M.Ferru May 15 '17 at 21:58
  • 2
    \$\begingroup\$ There should be no more than 0.7V difference or some protection diodes on the inputs may start conducting (which is bad). \$\endgroup\$ – Janka May 15 '17 at 22:02
  • 1
    \$\begingroup\$ You CAN run into problems on power-up if one LM317 gets to 3.3V before the other gets up (see Janka's note), even if no I2C transfers are attempted. Powering down has the same problem. \$\endgroup\$ – glen_geek May 15 '17 at 22:55
  • 1
    \$\begingroup\$ The moment you power on the master, R1 and R2 will provide 3.x Volt to the data lines, which, if the slave is not yet powered, means 3.x Volts more than the pins on the slave. This will make any protection diodes to Vcc in the slave conductive, passing (3.x-0.7) Volts to the slave's Vcc and to the output of its regulator. It may not break the chips, because the current is limited by R1+R2 to a few mA, but it may or may not cause undesired behaviour. \$\endgroup\$ – JimmyB May 16 '17 at 10:39
3
\$\begingroup\$

Yes it will work even there is a few voltage gap between the two regulators. However, this gap need to be smaller than 0.7V in order to prevent inner protection diode to conduct and cause (little) damage to the chip over time. Supply has to accurate to prevent this to append. Resistor with low tolerance value should be use to provide to configure the LM317 regulator.

When startup, both µC won't be powered at the exact same time. The bus line will eventually be powered before both µC (through R1 and R2). But this shouldn't cause any damage due to the low current flow (thanks to high pull up resistor value).

Thanks to JimmyB, glen_geek and Janka who helped me in the comment.

\$\endgroup\$
0
\$\begingroup\$

If you look up how I2C actually work you will quickly see that it is not that difficult to use with multiple voltage levels. Until the delta becomes too large (eg: 1.8V and 5V)

I2C equivalent circuit

All I2C can do is pull the line low. This is why you need the pull-up resistors.

Knowing this, you can use the lowest voltage level as pull-up, then you make sure the higher voltage MCU recognizes this as logic high with enough margin. For this margin you have to look at the bus capacitance and the required timings.

The opposite is also possible, but as @M.Ferru explained you have to stay below the threshold of the internal protection diodes. This methods it not recommended.

Thanks to sparkfun for the image.

\$\endgroup\$
0
\$\begingroup\$

Yes, what you propose will work as long as the pullups go to the lower of the two supply voltages. Of course that supply needs to be some margin above the minimum guaranteed high threshold for IIC. I don't remember what that is, but 3 V is fine.

Keep the maximum sink current to hold a line low in mind. That's 3 mA if I remember right (your job to check). That means with 3 V supply, the pullups can't be less than 1 kΩ.

\$\endgroup\$
  • \$\begingroup\$ Pull up resistor on I2C bus used to be around 10kΩ. But I'll do the calculation according to this post \$\endgroup\$ – M.Ferru May 16 '17 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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