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 ...
随机推荐
- 【问题收集·中级】关于指示器自定义图片与UUID
博友问题: 大哥 求教一下 iOS7 能否获取到 uuid 大哥 忙不忙 iOS的加载的时候 动态旋转效果 是 图片 嘛 ? 我的回答 05:43:34hud指示器我用的是这个MBProgressHU ...
- bug处理
当提示405 method not allowed 时候,路由可能有问题,看看路由是get/post 是否合格
- Ubuntu 查看CPU温度
按照这篇文章: http://www.webupd8.org/2014/06/psensor-updated-with-option-to-display.html
- 【SVN】SVN的trunk、branches、tag的使用以及分支的概念
SVN命令参考: https://www.cnblogs.com/wlsxmhz/p/5775393.html svn的存储结构一般建议在根目录下建立trunk.branches.tags这三个文 ...
- robotium 中通过id获取 View 以及进行相应的操作
robotium 中id的几种表现形式 1)字符串形式:例如id/btn_example,源码中的布局里些的hierachy 中看见的都是这种. 2)数字形式:例如0x7f0700D,打开R.java ...
- 获取同一接口多个实现类的bean
@Service("taskExecutorFactory") public class TaskExecutorFactory implements ApplicationCon ...
- 对象克隆及属性转换-JavaScript
在某些项目中,需要将一些返回信息进行其他语言的翻译,可以为不同语言用户提供不同的语言版本.下面是一个实现: /** * @class Translate * @description 查询字典,翻译成 ...
- c++ primer 学习杂记1
读到p483 公有,私有,受保护的继承. 1.关于基类成员在派生类中的访问级别: 1) 无论何种继承方式, 派生类都无法访问基类中的private成员. 2) 派生类可以限制,而不能放松对所继承成员的 ...
- .NET Core 项目经验总结:Startup.cs 介绍(二)
原文地址(个人博客):http://www.gitblogs.com/Blogs/Details?id=643c9664-dc4e-42cf-a15f-5368ebfcd7c9 第一次面对 Start ...
- 基于用Path.Combine的优化
Path.Combine: 什么时候会用到Path.Combine呢?,当然是连接路径字符串的时候! 所以下面的代码可以完美的工作: public static void Main() { strin ...