
Kerry Wong writes:
Arduino‘s (ATmega328P) PWM outputs via analogWrite can be conveniently turned into analog voltage levels through the use of simple RC filters. Since the PWM outputs are not isolated, using them to drive other devices directly could be potentially dangerous. This is especially true if the target circuit uses a higher supply voltage.
Fortunately, it is quite easy to isolate the PWM output using an optocoupler. The following schematic shows how we can build such a fully isolated DAC

Over the summer I did a research project where I needed to make 1024 channels of isolated 3.3V DAC (16-bits) which would float ontop of a 0-60V signal (generated by a 12bit DAC).
I will say that I actually looked into a very similar methodology, we ended up using a very low power precision DAC, over using modulated signals, two suggestions though:
1) Sigma Delta Modulation will give you less noise and better results if you want high precision. I definitely suggest looking into it
2) Optoisolators are great, but if you need low current draw or are just interested in newer isolation technologies Analog Devices makes these spiffy ADuM1x00 devices which have a tiny transformer inside which acts as the isolation medium!
http://www.analog.com/en/interface-isolation/digital-isolators/adum1100/products/product.html
I actaully am working on a discrete logic version of the ADuM1x00 to learn more about how it works, there are some papers on the subject matter and they are super cool chips!
I do accept as true with all thhe ideas you’ve presented to your
post. They are very convincing and can certainly
work. Nonetheless, the posts are too brief for newbies. May you please prolong them a little from
subsequent time? Thank you for the post.