Electronic – Communication between two AVR microcontrollers over SPI with different power supplies

atmegaavrpower supplyspi

I have two ATMEGA32 microcontrollers. First one has the following power supply: 220VAC-line filter-transformer-bridge rectifier-filter-voltage regulator-5VDC. Another one is powered by USB 5VDC. So they have different grounds.

I want to connect them over SPI.

How can i do that?

Best Answer

If you have isolated circuits you can always choose 1 reference point on each circuit to connect to the other. Only one. In most case that will be the grounds.

Both 5 V supplies are isolated from each other through transformers, then you can safely connect their grounds together.