I want to have two different Arduino boards that share an I2C device (EEPROM/FRAM storage), but are powered from different sources. One will always be on, and will sleep a lot (vehicle battery), the other one will only run when the vehicle is on (same power source, but going through a circuit which is only active when the engine is running).
Can I have two different boards that share a common ground (which I need so that they can both access the I2C device, right?), but they have different Vin sources?
osmosis311:
I want to have two different Arduino boards that share an I2C device (EEPROM/FRAM storage), but are powered from different sources. One will always be on, and will sleep a lot (vehicle battery), the other one will only run when the vehicle is on (same power source, but going through a circuit which is only active when the engine is running).
Can I have two different boards that share a common ground (which I need so that they can both access the I2C device, right?), but they have different Vin sources?
Thanks!
Make sure the one that is powered down does not have any signals on any of it's input while it is powered down.
If you only connection between the Arduino's is SCL, SDA, connect the pullup resistors to the powered Down Arduino. this will inhibit any I2C communications until both Arduino's are powered up.
If you need to access I2C devices while the other Arduino is powered down, you will have to use a bus isolater circuit. something like thist ti I2C bus translator
One board will be powered whether the engine is on or not, and the other board, since it draws a lot more power, will only be running when the engine is running.
I would use diodes to isolate each side.
Top diode lets either side supply power.
SCL diodes let master pull clock low.
SDA diodes let master pull SDA low, and lets slave pull SDA low when it sends data out.
Use fast, low Vf schottky diodes.
If I simply have two wires between the Arduino's used for Serial, and one sleeps sometimes and the other does not, I still need protection and isolation between them?
CrossRoads:
I would use diodes to isolate each side.
Top diode lets either side supply power.
SCL diodes let master pull clock low.
SDA diodes let master pull SDA low, and lets slave pull SDA low when it sends data out.
Use fast, low Vf schottky diodes.
I don't agree with this schematic,
Lets take this situation:
VCC1=0v
SCL1=0V
SDA1=0V
VCC2=5V
SCL2=5V
SDA2=5V
Diodes are numbered left top to left bottom D1..D4, Right Top to Right Bottom D5..D8
Resistors numbered From Left to right R1..R6
D3 is forward Biased, so Left side (cathode) is at 0V, Right side(anode) is 0.7V because of Pullup R4,
D8 is also forward Biased, on left side(cathode) it is at 0.7V, on right side(anode) it is at 1.4V because of pullup D8.