Problems uploading sketch when gnd is shared with high pwr

Update on this circuit. There have been a lot of opto-isolator failures in the field. So I would not recommend using TLP5771. I am in the process of building a new circuit using a different component.