An Isolated DAC Using PWM Output
An Isolated DAC Using PWM Output
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:

The PWM output pin from the MCU drives the emitter side of the optocoupler.
Most MCU output pins can deliver at least a few mA current so driving an optocoupler directly
via a current limiting resistor should not be an issue.
In my implementation, a 4N35 optocoupler is used, but you can pretty much use any optocouplers.
The output waveform from 4N35 is inverted with regard to the input as the optotransistor within 4N35 operates like an inverter.
The inverted PWM signal is flipped once again through the unity gain inverting amplifier.
An RC low-pass filter (R5 and C1) turns the PWM output into DC voltage
and finally this DC voltage is buffered through a voltage follower to the output.
The RC constant needs to be chosen so that it is significantly larger than the PWM interval.
The PWM frequency via Arduino’s analogWrite is roughly 490 Hz (roughly a 2 ms cycle),
and the RC constant in the example above is 100 ms, which is sufficiently large to guarantee a smooth output.
Note that the circuits on either side of the optocoupler do not have to share the ground reference as illustrated in the schematics above.
I used LM358 as the OpAmp.
Since LM358 is not a rail-to-rail OpAmp, the DAC output range is going to be limited by the supply rail.
If your application requires higher accuracy, you could either use a rail-to-rail OpAmp
or use a slightly higher voltage dual supply rail to power the OpAmp.
An Isolated DAC Using PWM Output的更多相关文章
- STM32 Timer : Base Timer, Input Capture, PWM, Output Compare
http://www.cs.indiana.edu/~geobrown/book.pdf An example of a basic timer is illustrated in Figure 10 ...
- MCU PWM DAC OP Voltage Output
- Using PWM Output as a Digital-to-Analog Converter
http://www.ti.com/lit/an/spraa88a/spraa88a.pdf http://www.ti.com/litv/zip/spraa88a The high-resoluti ...
- Make a DAC with a microcontroller's PWM timer
http://www.edn.com/design/analog/4337128/Make-a-DAC-with-a-microcontroller-s-PWM-timer Many embedded ...
- how to generate an analog output from a in-built pwm of Atmega 32AVR microcontrloller?
how to generate an analog output from a in-built pwm of Atmega 32AVR microcontrloller? you need a re ...
- PWM DAC vs. Standalone
http://analogtalk.com/?p=534 http://analogtalk.com/?p=551 Posted by AnalogAdvocate on April 09, 2010 ...
- PWM DAC Low Pass Filtering
[TI博客大赛][原创]LM3S811之基于PWM的DAC http://bbs.ednchina.com/BLOG_ARTICLE_3005301.HTM http://www.fpga4fun.c ...
- How determine the RC time constant in PWM DAC low-pass filter?
how determine the RC time constant in PWM digital to analog low-pass filter? I 'm looking for the be ...
- The Secret Mixed-Signal Life of PWM Peripherals
The Secret Mixed-Signal Life of PWM Peripherals Pulse-width modulation (PWM) peripherals have enjoye ...
随机推荐
- MVC常用特性使用
简介 在以前的文章中,我和大家讨论如何用SingalR和数据库通知来完成一个消息监控应用. 在上一篇文章中,我介绍了如何在MVC中对MongoDB进行CRUD操作. 今天,我将继续介绍一些在开发中非常 ...
- How to fix Eclipse Tomcat startup timeout in 45 seconds?
命题:怎么修复 Eclipse 里启动 Tomcat 时, 默认启动超时时间为 45 秒的问题? 在 Eclipse 的 J2EE 项目里启动 Tomcat 来调试 Servlet 之类的,断点以后, ...
- Python常用time处理
#coding=utf-8 # python2.7工具语句 from sys import version_info import time import datetime if version_in ...
- Spring对象依赖关系处理
Spring中给对象属性赋值 1.通过set方法给属性注入值 2.p名称空间 3.自动装配 4.注解 编写MVCModel调用userAction MVCModel public class MVCM ...
- Solr7.4.0的API(Solrj)操作
一.SolrJ的概念 solr单机版服务搭建:https://www.cnblogs.com/frankdeng/p/9615253.html solr集群版服务搭建:https://www.cnbl ...
- 【转载】Java与C++语言在作用域上的差异浅析
http://developer.51cto.com/art/200906/126199.htm 差异一:变量作用域的不同 如下面这段程序代码是符合C++语言的语法要求的.其可以在C语言下正常运行.但 ...
- HBase0.99.2集群的搭建步骤(在hadoop2.6.4集群和zookeeper3.4.5集群上)
HBase介绍(NoSql,不是关系型数据库) HBase是一个高可靠性.高性能.面向列.可伸缩的分布式存储系统,利用HBASE技术可在廉价PC Server上搭建起大规模结构化存储集群. HBase ...
- 007 @CookieValue绑定请求中的cookie
1.介绍 2.使用的cookie 3.index.jsp <%@ page language="java" contentType="text/html; char ...
- centos 6.x x86 源码安装git-2.3.0
(1) 添加rpmforge源 wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686 ...
- 跟厂长学PHP7内核(四):生命周期之开始前的躁动
上一章我们对PHP的源码目录结构有了初步了解,本章我们继续从生命周期的维度对PHP进行剖析. 一.概览 生命周期是什么呢?你可以把它看作执行过程,PHP的生命周期也就是它从开始执行到结束执行的过程. ...