Isolating grounds with voltage divider and current shunt

I have designed an alternator regulator which uses an ATtiny84 and includes I2C to talk to an Arduino. The 5v power and the ground for the ATtiny85 is supplied from the same rails the main Arduino (a Mega) uses. This is powered from a switchmode power supply and filtered to provide very clean power. The problem I have is how to isolate the noisy alternator ground from the ATtiny but still allow such things as the voltage divider, chopper MOSFET and shunt resistors to work. For the MOSFET I could use an optoisolator, but due to their nonlinearity I am unable to use one for the analog shunt nor voltage divider. I also can’t use it for I2C due to it needing to be bidirectional. I don’t want to connect the alternator and switchmode PSU grounds due to that creating a ground loop. Would adding two RS422 differential chips (one attached with the ATtiny to the noisy alternator supply/ground, and one to the clean switchmode power supply/ground) do the trick?

Probably quite an unusual question but if anyone has any help I’d appreciate it.


Schematic is below…

You want to opto isolate the signalling, not between the ATtiny and MOSFET - that's going to be much less ambitious an approach.

Opto-isolation means an I2C bus-style interface cannot be used easily.

Its possible something like RS485 signalling could work, if the noise isn't too bad. Still you'd need a comms protocol on top of that (serial?).

Thanks for your reply, apologies for the massive block of text last post, i had to tap it up quickly before boarding a plane…!

I had considered RS485 (mistakenly wrote RS422 in the OP) but the problem with using a protocol other than I2C is this module is part of a larger system, namely a remote controlled robot. The alternator runs from an engine to keep the batteries topped up, and I’d like it to be able to tell the main CPU the current/rpm/load via I2C.

I discovered something interesting about the '84, its got differential ADC which I think I could use for the voltage and current, as presumably the inputs are isolated from signal ground (indeed from any low impedance silicon inside the chip); and being relative to each other, noise wouldn’t be an issue. I could then optoisolate solely the MOSFET and the '84 could run from the switch mode PSU. Do you think that might work?

Thanks again