Isolated digital communication between Uno and ATTiny85 slaves

Hello!

I've a project where I require galvanic isolation between a master which is likely to be an Arduino UNO/'328, and 10 slaves which will be either ATTiny13s or ATTiny85s. It's for a mains AC dimming circuit; the master tells a slave a particular percentage brightness, and the slave performs reverse phase-angle control on the AC to dim the LEDs. The master will be connected to a RS485 network for remote control, and will relay this to the slaves, but it will also have local buttons/pots to control the dimmers; which is the reason I need the master to be isolated from the slaves.

I would like bidirectional communication so the master can auto-enumerate the slaves, and so if any slave experiences over-current the master can "know" and report that over the RS485 network. The slaves could also report current power usage to the master too.

I considered using TTL serial with opto/digital isolators, but this can be unreliable on ATTinys due to clock drift etc, so I am considering I2C with an ATTiny85 and this isolator. I have discounted SPI as its 3 pin plus CS, so I'd need a shift register or 10 free pins on the master (and 10 opto-isolators!).

If anyone has any other suggestions or if I've made a fatal error please let me know!

Thanks! -Eli

What about infra-red serial. Have a look at this IR Thread.

...R

Thanks for your reply :slight_smile:

Using optoisolators would achieve the same as this and would be quite a bit simpler, the communication I'm doing is on the same PCB so no distances to cover.

It uses serial too which is reliant on fairly precise clocks between the transceivers, and unfortunately the oscillators on the Tinys aren't particularly accurate. I2C is clocked so inaccurate oscillators won't matter.

Edit: emoji broke my post, and couldn't edit due to 5-min posting timer sorry!