搜索
bottom↓
回复: 133

发两个老外的光隔4-20MA输出电路,很聪明的方法,不翻译了

  [复制链接]

出0入0汤圆

发表于 2017-4-15 22:58:55 | 显示全部楼层 |阅读模式
本帖最后由 bg6agf 于 2017-4-16 09:02 编辑


图在二楼…楼下还有光隔离输入

第一个。用一个普通四光耦的线性部分
Optically Isolated 4- To 20-mA Current-Loop Transmitter Is Accurate, Inexpensive
Sep 25, 2008 W. Stephen Woodward | Electronic Design

attach://369161.gif

http://electronicdesign.com/site ... 29/19676/fig_01.gif
        EMAIL
    inShare
    Tweet

Comments 1

Galvanically (that is, optically or electromagnetically) isolated 4- to 20-mA current loops offer robust noise immunity and tolerate long cable runs. These advantages, combined with simple unshielded two-wire cabling, make this mature signaling standard popular for transmitting analog data in noisy industrial and process control environments. Unfortunately, the conversion of an analog voltage output to an isolated current-loop signal is relatively complicated. In addition to the actual signal isolator components, multiple floating power supplies are typically required.

The current-loop transmitter in the figure employs an unusual trick to inexpensively implement an optically isolated 4- to 20-mA transmitter: operation of the quad-channel LED/transistor optoisolator (an NEC PS2501-4) in a linear mode. Normally, this would be a dubious idea because LED/transistor optoisolator response is typically very nonlinear and temperature-dependent, making it incompatible with accurate transmission of precision analog data.

Working around this limitation and achieving adequate analog accuracy from this class of component requires meeting two goals:

• Nonlinearity and temperature-coefficient compensation through feedback matching of reference elements in a multichannel microcircuit so that nonlinearities will cancel.
• Scrupulous duplication and tracking of operating points (voltage and current bias) of the reference elements.

The first is achieved by matching LED/transistor pair U2c to U2a, b, and d. U2c is part of the feedback loop of op-amp U1, causing the LED drive current to be controlled so that I3 = IIN. Because all four LEDs in U2 are serially connected, the other three optical pairs receive an identical LED drive current, causing their phototransistors to conduct the same collector currents. That is:

I1 = I2 = I3 = I4 = IIN, which is 0 to 5.33 mA

However, this equality depends not only on the physical matching of the four U2 channels, but also on the match of their bias voltages, which is the second design goal. This goal is achieved through the equality of the 1.25-V set point of U1 to the 1.25-V internal reference of regulator U4.

Remaining circuit details include calibration trims for minimum (4 mA) and full-scale (20 mA) output currents and the option of operation with an external loop-voltage supply (passive mode) or with the dc-dc converter, U3 (active mode). ISUM is:

3(IIN + IMIN) = (0 to 16 mA) + 4 mA = 4 to 20 mA



第二个 用双光耦作PWM控制LM317


http://electronicdesign.com/site ... /4950/figure_01.gif

Simple Current-Loop Transmitter Converts PWM To 4-to-20-mA Output
Nov 20, 2000 W. Stephen Woodward | Electronic Design

        EMAIL
    inShare
    Tweet

Comments 0

Over long cable runs, an isolated 4-to-20-mA current loop offers robust noise immunity and tolerance. This characteristic makes it popular for analog data transmission in noisy industrial and process control environments. Unfortunately, the conversion of a digital output to an isolated current-loop signal is a relatively complicated proposition. In addition to the actual signal isolator components, paraphernalia such as multiple floating power supplies and DACs are typically required.

A simpler scheme is used for this circuit (Fig. 1). It’s based on pulse-width modulation to implement a cheap but accurate current-loop transmitter. A dual-channel isolator (E1-E2-Q1-Q2) provides galvanic isolation of the PWM input. It uses this input to chop the 1.25-V reference voltage of the LT317AT regulator in response to the 1- to 2-kHz PWM input applied to the E1/E2 LED pair. Phototransistors Q1 and Q2 switch R4 between the top and bottom ends of the R1/R2 current-set resistance.

The pulse-width duty factor of the PWM input varies between 0% and 100%. At the same time, the dc component of the isolated analog waveform sourced to R4 varies from 0.25 to 0.0 V relative to A1-pin 3. A1’s low-pass, gain-of-four filter extracts this dc portion and applies it to the adjust pin of VR1. This allows the voltage between the VR1 adjust and A1-pin 3 to fluctuate from 1.0 to 0.0 V. As a result, the voltage across the R1/R3 resistance varies from 0.25 V (at a duty factor of 0) to 1.25 V (at a duty factor of unity). Consequently, a 4- to 20-mA current is drawn from the out terminal of VR1 and circulated in the output loop.

The full-scale 20-mA output is trimmed via R1. The impedance of the low-pass filter network is quite high (≈ 3 MΩ). This limits the phototransistor saturation offset to ≈ 1 mV. Meanwhile, the picoamp-level bias current of A1 prevents these big resistors surrounding its summing point from causing significant errors. Relatively long (tens of milliseconds) filter time-constants are needed for adequate ripple reduction. The high-feedback network impedances allow this to be achieved with only modestly sized capacitors.

Performance of the resulting current loop is respectable. The 1% guaranteed tolerances of the critical components (VR1, R1, and R2) yield typical accuracies greater than 8 bits. Resolution, differential linearity, and monotonicity are equal to that of the PWM digital waveform—that is, except in cases where the duty factor values are smaller than 0.01% or larger than 99.99%. At these extremes, the control signal may spend less time in the zero or one state than is required by the isolator to completely switch from one rail to the other. This results in a modest increase in differential nonlinearity for this very restricted range of values.

With risetimes less than 100 ms, the settling time to 0.1% is less than 500 ms. The output ripple is less than 0.01% of full scale. If the dc-dc converter is omitted, passive transmitter operation displays a voltage compliance spanning 7 to 45 V. In other words, it ranges from the minimum voltage drop necessary for proper operation to the maximum operating voltage of VR1.

The dependence of the output current upon loop voltage is less than 50 ppm/V over the whole range. This is due to the excellent line regulation behavior of VR1. Adding the dc-dc converter enables active transmitter operation with an isolated output compliance of 24 V. All circuit power comes from a single groundreferred 5-V rail.

A number of methods can be used to generate the PWM input. In microcontroller-based applications (e.g., Motorola 68HC12), the onchip counter/timer hardware can provide a convenient source. Figure 2 illustrates another possibility. This idea uses a constantfrequency PWM multivibrator that was derived from an earlier IFD (“A New Stable RC Pulse Generator,” Feb. 8, 1999, p. 104-106). That circuit is adapted to digital control via the Xicor X9440 dual “smart analog” comparator/potentiometer combination. The convenience of the X9440’s strapless-address SPI interface partially makes up for its somewhat limited (6-bit) resolution.


靠。附件图片传不上。。

谁能解释一下我点附件没用呢?


attach://369162.gif
我在回复里才加了了图

阿莫论坛20周年了!感谢大家的支持与爱护!!

月入3000的是反美的。收入3万是亲美的。收入30万是移民美国的。收入300万是取得绿卡后回国,教唆那些3000来反美的!

出0入0汤圆

 楼主| 发表于 2017-4-15 23:09:23 | 显示全部楼层
attach://369161.gif
attach://369162.gif

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2017-4-15 23:18:07 | 显示全部楼层
确实有创意,自己还真想不出来。

出0入0汤圆

 楼主| 发表于 2017-4-15 23:41:29 | 显示全部楼层


The accurate transmission of analog signals over long distances in noisy industrial environments is a difficult design problem. One of the oldest solutionsisolated current loopsis still one of the best. This Idea For Design presents a simple optically isolated linear current loop receiver that uses generic parts.

The receiver operates from a single non-isolated power rail (12 V) to generate a convenient analog 5-V voltage-mode output that’s ready for further analog signal conditioning, digital conversion, or whatever the application requires. In combination with an earlier IFD (“Optically Isolated 4- To 20-mA Current Loop Transmitter Is Accurate, Inexpensive"), it can complete a robust, analog multi-drop data link.

The circuit employs a simple technique to inexpensively implement accurate analog isolation: operation of a multiple-channel LED/transistor opto-isolator (NEC PS2501-4) in a linear mode (see the figure).

The incoming 4- to 20-mA current-mode signal is subdivided in a 1:4 ratio between the active coupler pair U2b and passive pairs U2a and U2d. This division provides a more manageable 0.8- to 4-mA signal to the downstream receiver circuitry. The 1:4 current ratio is approximately established by the 1000- and 249- series resistors and improved by the 31-k linearity compensation resistance in parallel with LED b.

The current density in LEDs a and d is twice that of LED b, which results in the forward voltage drop of a and d being about 35 mV higher than that of b. The current shunted around LED b by the parallel resistor cancels the resulting current offset and the possible nonlinearity of about 1%.

The U3 feedback loop ensures an accurate mirror of the LED b current on the opposite side of the optical isolation barrier in LED c. The LED c current drive is served to force equality of the U2b and U2c phototransistors. The only way this can happen is for the LED c current to track that of LED b.

Any minor mismatch between the transfer gains of the U2b and U2c optical pairs is calibrated out in test with the CAL trimpot, establishing an accurate overall voltage/current conversion function of 0.25 V/mA. Stability of the calibration against component aging and temperature variation is ensured by the similar operating points of the coupled pairs.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2017-4-16 00:14:31 | 显示全部楼层
光隔离的4~20mA的还不错

出0入0汤圆

发表于 2017-4-16 06:48:22 来自手机 | 显示全部楼层
英文看不懂呀

出0入0汤圆

发表于 2017-4-16 08:25:53 | 显示全部楼层
英文读起来还是有些吃力的,谢谢楼主。

出0入0汤圆

发表于 2017-4-16 09:16:04 | 显示全部楼层
先收藏了            

出0入0汤圆

发表于 2017-4-16 09:31:31 | 显示全部楼层
谢谢分享

出0入0汤圆

发表于 2017-4-16 09:37:04 来自手机 | 显示全部楼层
设计确实看起来很厉害,原来看过光耦补偿的电路,经搭建测试未能获取满意的结果,再后来偶然看到ti有隔离放大器来实现4-20mA的隔离,电路简单多了

出0入0汤圆

发表于 2017-4-16 09:46:27 | 显示全部楼层
谢谢,mark一下。

出0入0汤圆

发表于 2017-4-16 09:47:04 | 显示全部楼层
这个好好研究

出0入0汤圆

发表于 2017-4-16 10:13:51 | 显示全部楼层
有机会试试

出0入0汤圆

发表于 2017-4-16 12:55:09 | 显示全部楼层
很有意思的设计

出0入0汤圆

发表于 2017-4-16 13:58:10 来自手机 | 显示全部楼层
谢谢分享

出0入0汤圆

发表于 2017-4-16 14:07:29 | 显示全部楼层
好东西啊,先收藏,空了再试一试~!

出0入0汤圆

发表于 2017-4-16 14:07:59 来自手机 | 显示全部楼层
比较奇怪,4-20ma这种电流输出,一般用在什么场合呢

出10入10汤圆

发表于 2017-4-16 18:27:06 | 显示全部楼层
YS126 发表于 2017-4-16 14:07
比较奇怪,4-20ma这种电流输出,一般用在什么场合呢

两线制变送器

出0入0汤圆

 楼主| 发表于 2017-4-16 19:19:26 | 显示全部楼层
不知道这种用在产品上怎么样

出0入13汤圆

发表于 2017-4-16 20:56:20 来自手机 | 显示全部楼层
电路不错,谢谢分享

出0入0汤圆

发表于 2017-4-16 21:35:03 | 显示全部楼层
本帖最后由 3DA502 于 2017-4-16 22:02 编辑

还是用HCNR200靠谱,ps2501的电流传输比不保证匹配,老外直接奔放的设定四个couple的传输比是1:1:1:1,并且直接开环

出0入0汤圆

发表于 2017-4-16 21:57:22 | 显示全部楼层
设计亮点是用LM317,做类似三极管共基极电压放大

出0入0汤圆

发表于 2017-4-16 22:38:09 | 显示全部楼层
LM7101可以用其它的什么型号运放代替?

出0入50汤圆

发表于 2017-4-16 23:03:00 来自手机 | 显示全部楼层
本帖最后由 ilikemcu 于 2017-4-17 08:15 编辑

直接光耦传输232信号隔离,隔离侧用一片1¥多的少腿MCU,想怎么着都行,根本不担心光耦带来的模拟性能影响,神马温漂等等都是浮云,成本还低,效果更好

-------编辑原因:改正手机输入的错字

增加:这样可以方便批量生产,避开模拟器件离散性对产品最终的一致性的影响。

总之,能用数字电路实现的事情,尽量不用模拟电路解决;能用软件处理实现的事情,尽量不用硬件电路解决。

出0入0汤圆

发表于 2017-4-16 23:32:31 | 显示全部楼层
隔离电流环, 先mark下吧, 喜欢分立的可以验证下。

出0入0汤圆

 楼主| 发表于 2017-4-16 23:48:37 | 显示全部楼层
3DA502 发表于 2017-4-16 21:35
还是用HCNR200靠谱,ps2501的电流传输比不保证匹配,老外直接奔放的设定四个couple的传输比是1:1:1:1,并且 ...

假定4个特性一致,用一个作反馈另外三个做输出  

出0入0汤圆

发表于 2017-4-17 06:20:02 来自手机 | 显示全部楼层
ilikemcu 发表于 2017-4-16 23:03
直接光耦传输232信号隔离,隔离侧用一千1¥多的少腿MVU,想怎么着都行,根本不担心光耦带来的模拟性能影响 ...

一直都觉得你这种方法最土实用

出0入137汤圆

发表于 2017-4-17 07:57:41 | 显示全部楼层
ilikemcu 发表于 2017-4-16 23:03
直接光耦传输232信号隔离,隔离侧用一千1¥多的少腿MVU,想怎么着都行,根本不担心光耦带来的模拟性能影响 ...

没看明白,没接触过啊

出0入4汤圆

发表于 2017-4-17 08:44:56 | 显示全部楼层
英文读起来还是有些吃力的,先收藏了,谢谢~~~

出0入0汤圆

 楼主| 发表于 2017-4-17 09:06:40 | 显示全部楼层
pulan 发表于 2017-4-17 07:57
没看明白,没接触过啊

他的意思是上一个单片机。。。。

出0入0汤圆

发表于 2017-4-17 09:15:07 | 显示全部楼层

谢谢分享

出0入0汤圆

发表于 2017-4-17 09:22:35 | 显示全部楼层
ilikemcu 发表于 2017-4-16 23:03
直接光耦传输232信号隔离,隔离侧用一片1¥多的少腿MCU,想怎么着都行,根本不担心光耦带来的模拟性能影响 ...

指的是:CPU的TXD RXD信号------光隔-----少腿CPU-------232------输出端子???
这个少腿CPU有什么用?
之前这样用:CPU的TXD RXD信号------光隔--------232------输出端子,一切正常

出0入0汤圆

发表于 2017-4-17 10:10:30 | 显示全部楼层
pulan 发表于 2017-4-17 07:57
没看明白,没接触过啊

他的意思大概是先ADC,再用光耦传递数字信号,再DAC。

出0入0汤圆

发表于 2017-4-17 10:15:35 | 显示全部楼层
这些电路比一般电路多用了两个光耦,输出并联扩流,输入并联分流,估计都是为了减小传输电流,因为一般光耦在小电流下线性度比较好。

出300入477汤圆

发表于 2017-4-17 10:42:26 | 显示全部楼层
lcw_swust 发表于 2017-4-17 10:15
这些电路比一般电路多用了两个光耦,输出并联扩流,输入并联分流,估计都是为了减小传输电流,因为一般光耦 ...

问题是,没有人告诉你普通光耦的线性和传输比一致性怎么样啊
你测了一个就算参数还不错,也不代表你做100个都能不错~
专门的线性光耦也很贵的

出0入0汤圆

发表于 2017-4-17 11:10:52 | 显示全部楼层
学习一下, 先记好

出0入0汤圆

 楼主| 发表于 2017-4-17 11:13:38 | 显示全部楼层
redroof 发表于 2017-4-17 10:42
问题是,没有人告诉你普通光耦的线性和传输比一致性怎么样啊
你测了一个就算参数还不错,也不 ...

我觉得吧。一致性不一定好。但是单调性应该是好的。所以只要校准一下应该都是可以用的。

出300入477汤圆

发表于 2017-4-17 11:56:50 | 显示全部楼层
bg6agf 发表于 2017-4-17 11:13
我觉得吧。一致性不一定好。但是单调性应该是好的。所以只要校准一下应该都是可以用的。 ...

光耦的CTR不一致倒是可以校准,但线性不好是很难校的。
没有人给你保证过这些光耦的线性~

出10入120汤圆

发表于 2017-4-17 12:04:42 | 显示全部楼层
同意楼上的说法,这种电路也就是自己玩玩,用在产品上会害死人的

出0入50汤圆

发表于 2017-4-17 13:00:06 | 显示全部楼层
redroof 发表于 2017-4-17 11:56
光耦的CTR不一致倒是可以校准,但线性不好是很难校的。
没有人给你保证过这些光耦的线性~
...

你是明白银耳!
数字电路对器件性能离散性的容限远远大于模拟电路,所以隔离的电路尽量在数字部分实施,而不要搞模拟隔离。

出300入477汤圆

发表于 2017-4-17 13:11:42 来自手机 | 显示全部楼层
bg6agf 发表于 2017-4-17 11:13
我觉得吧。一致性不一定好。但是单调性应该是好的。所以只要校准一下应该都是可以用的。 ...

你错了。
你这个电路依赖的是线性而不仅仅是单调性。
单调性是个非常弱的要求,输岀只要随输入递增,就满足单调的要求。这只够数字电路使用。
但是大部分光耦恰好只保证了这一点,所以只能传输数字信号。

出0入0汤圆

 楼主| 发表于 2017-4-17 14:08:00 | 显示全部楼层
redroof 发表于 2017-4-17 13:11
你错了。
你这个电路依赖的是线性而不仅仅是单调性。
单调性是个非常弱的要求,输岀只要随输入递增,就满 ...

我没错。所有的光耦即使是线性光耦也不能完全保证一致的线性度。所以需要反馈。不然我直接单向传输就行 了。

出300入477汤圆

发表于 2017-4-17 14:51:10 | 显示全部楼层
bg6agf 发表于 2017-4-17 14:08
我没错。所有的光耦即使是线性光耦也不能完全保证一致的线性度。所以需要反馈。不然我直接单向传输就行  ...

你这种反馈也依赖线性度的匹配啊!
你期望几个普通光耦的响应曲线虽然可以是弯的,但是他们的响应曲线要互相匹配,也就是说大家都是弯的但是弯曲形式要一样
这并不叫“只要求单调性”。因为单调性的定义就是我上面写的。
你这种要求比严格要求响应曲线是直的要稍微容易一点,但照样还是厂家不会给你保证。
所以在稍微要求一点精度的情况下,照样没用。

说实话,用纯模拟技术极难做出只要求单调性就能正常运行的电路。至少你需要依赖线性或者需要响应曲线的匹配。。。。
只有数字电路才可以只靠单调性~

出0入0汤圆

 楼主| 发表于 2017-4-17 15:42:30 | 显示全部楼层
redroof 发表于 2017-4-17 14:51
你这种反馈也依赖线性度的匹配啊!
你期望几个普通光耦的响应曲线虽然可以是弯的,但是他们的响应曲线要 ...

如果全弯的一样最好了。。都可以做产品了。
可是如果不一样。只要依然是单调的。就可以通过软件查表或者曲线来修正啊。。
虽然不指望做产品。。但是偶尔用用一次还可以。。。

出0入0汤圆

 楼主| 发表于 2017-4-17 15:46:38 | 显示全部楼层
redroof 发表于 2017-4-17 14:51
你这种反馈也依赖线性度的匹配啊!
你期望几个普通光耦的响应曲线虽然可以是弯的,但是他们的响应曲线要 ...

另外。关键老外的题目里专门说了。这种做法。准确还便宜。。莫非真的还可以?

出300入477汤圆

发表于 2017-4-17 16:33:28 | 显示全部楼层
bg6agf 发表于 2017-4-17 15:42
如果全弯的一样最好了。。都可以做产品了。
可是如果不一样。只要依然是单调的。就可以通过软件查表或者 ...

您只要单调性,是因为只要有单调性就可以自己做曲线校准???
这倒没错。
但是曲线校准的代价多高啊!
这个代价远远高于你去买成品的线性光耦~
所以这样是没有意义的。

出100入101汤圆

发表于 2017-4-17 17:20:56 | 显示全部楼层
听大牛讲课

出110入170汤圆

发表于 2017-4-17 17:48:08 来自手机 | 显示全部楼层
以前仿真过差不多的电路,
随电压的影响有点大,
基本上就是±1 - ±5%的情况下可以接受吧。

出0入0汤圆

发表于 2017-4-17 18:04:32 | 显示全部楼层
4-20MA电路,mark

出0入0汤圆

 楼主| 发表于 2017-4-17 18:59:57 来自手机 | 显示全部楼层
18161319737 发表于 2017-4-17 17:48
以前仿真过差不多的电路,
随电压的影响有点大,
基本上就是±1 - ±5%的情况下可以接受吧。 ...

我真不信你说的…这个明明写了不受电压影响…因为几个光耦都是恒压驱动的

出0入0汤圆

发表于 2017-4-17 22:38:41 来自手机 | 显示全部楼层
有什么奇特,我几年前产品都用上量产了,比这个还要简化

出0入0汤圆

发表于 2017-4-17 22:39:00 来自手机 | 显示全部楼层
有什么奇特,我几年前产品都用上量产了,比这个还要简化

出0入0汤圆

发表于 2017-4-17 22:40:11 来自手机 | 显示全部楼层
有什么奇特,我几年前产品都用上量产了,比这个还要简化

出0入0汤圆

 楼主| 发表于 2017-4-17 22:41:47 | 显示全部楼层
R8C 发表于 2017-4-17 22:39
有什么奇特,我几年前产品都用上量产了,比这个还要简化

这都这么简单了?你还要更简单?我了个去。。 
怎么简化 的?

出10入120汤圆

发表于 2017-4-18 00:08:28 | 显示全部楼层
这个帖子看完了,给俺的印象就是“人有多大胆,地就有多大产。”

出110入170汤圆

发表于 2017-4-18 06:53:45 来自手机 | 显示全部楼层
bg6agf 发表于 2017-4-17 18:59
我真不信你说的…这个明明写了不受电压影响…因为几个光耦都是恒压驱动的 ...

这个电压不大可能恒定,

在实际电路中,
12V即使使用三端稳压7812,
按照±3%的误差,
就会影响到传输比。

前端的电压±3%,
后段电压变化±3%

电源电压是受负载变化肯定要估算±3%

出0入0汤圆

 楼主| 发表于 2017-4-18 08:31:35 | 显示全部楼层
18161319737 发表于 2017-4-18 06:53
这个电压不大可能恒定,

在实际电路中,

我先问一下。你说的是哪个电路行不?
我默认你说的是输出的那个
输出的那个12V 稳定不稳定完全不影响。自己去看英文说明。里面说的很清楚了。我不想再多废话了。

出0入0汤圆

发表于 2017-4-18 08:36:19 | 显示全部楼层
jh         

出0入0汤圆

发表于 2017-4-18 09:09:30 | 显示全部楼层
4-20ma虽然用不到,也不错,留名!!

出0入0汤圆

发表于 2017-4-18 09:39:22 | 显示全部楼层
直接用LM317恒流20Ma,PWM等分

出0入0汤圆

 楼主| 发表于 2017-4-18 09:52:18 | 显示全部楼层
本帖最后由 bg6agf 于 2017-4-18 09:53 编辑
R8C 发表于 2017-4-18 09:39
直接用LM317恒流20Ma,PWM等分


大概明白了。。。我靠!更聪明的办法!
可是实际上怎么用呢?

出0入0汤圆

 楼主| 发表于 2017-4-18 10:07:48 | 显示全部楼层
R8C 发表于 2017-4-18 09:39
直接用LM317恒流20Ma,PWM等分

思路我大概了解了。可是具体怎么实现还没想通。。。
求教。

出0入0汤圆

发表于 2017-4-18 12:26:05 | 显示全部楼层
的确是高呀!

出0入0汤圆

发表于 2017-4-18 12:32:57 | 显示全部楼层
YS126 发表于 2017-4-16 14:07
比较奇怪,4-20ma这种电流输出,一般用在什么场合呢

4-20ma这种电流输出工业上用的多啊,传输距离远,还方便检测有没有故障,低于4mA 说明断线了  高于20mA,说明你东西坏了。。是不是很方便

出0入0汤圆

发表于 2017-4-18 12:55:02 | 显示全部楼层
ilikemcu 发表于 2017-4-16 23:03
直接光耦传输232信号隔离,隔离侧用一片1¥多的少腿MCU,想怎么着都行,根本不担心光耦带来的模拟性能影响 ...

但是你这个还需要隔离电源啊~!

出0入0汤圆

发表于 2017-4-18 12:59:44 | 显示全部楼层
zuu0 发表于 2017-4-18 12:32
4-20ma这种电流输出工业上用的多啊,传输距离远,还方便检测有没有故障,低于4mA 说明断线了  高于20m ...

多谢兄弟讲解…

出0入0汤圆

发表于 2017-4-18 14:40:58 | 显示全部楼层
正好在搞这个,学习学习

出0入0汤圆

 楼主| 发表于 2017-4-18 14:48:19 | 显示全部楼层
jackiezeng 发表于 2017-4-18 12:55
但是你这个还需要隔离电源啊~!

工业上最不缺的就是24V电源。。。

出0入0汤圆

发表于 2017-4-18 15:57:10 | 显示全部楼层
光藕传PWM,然后变电压变电流,这种方式我觉得更便宜。

出0入0汤圆

发表于 2017-4-18 15:57:54 | 显示全部楼层
输出一定要用超过150V耐压的三极管。

出0入0汤圆

发表于 2017-4-18 16:11:43 | 显示全部楼层
如果光耦差别比较大,线性效果也不会太好。

出0入0汤圆

发表于 2017-4-18 19:53:29 | 显示全部楼层
谢谢分享

出0入0汤圆

发表于 2017-4-18 22:47:50 来自手机 | 显示全部楼层
明天上个图,老外的太复杂了

出0入0汤圆

发表于 2017-4-18 22:49:38 来自手机 | 显示全部楼层
明天上图

出0入0汤圆

 楼主| 发表于 2017-4-19 09:47:48 | 显示全部楼层

搬板凳等

出0入0汤圆

发表于 2017-4-19 11:18:47 | 显示全部楼层
这个电路设计的很好

出0入0汤圆

发表于 2017-4-19 11:49:59 来自手机 | 显示全部楼层
这个优点在便宜还是在性能

出0入0汤圆

 楼主| 发表于 2017-4-19 12:12:36 来自手机 | 显示全部楼层
huangqi412 发表于 2017-4-19 11:49
这个优点在便宜还是在性能

便宜…单体性能还可以…

出0入0汤圆

发表于 2017-4-19 22:11:22 | 显示全部楼层
收藏,谢谢楼主分享

出0入0汤圆

 楼主| 发表于 2017-4-19 22:21:42 | 显示全部楼层

我也在等呀。。。

出0入0汤圆

发表于 2017-4-20 08:30:05 | 显示全部楼层
好贴,先收藏了

出0入0汤圆

发表于 2017-4-20 08:37:03 | 显示全部楼层
mark  两个老外的光隔4-20MA输出电路

出0入0汤圆

发表于 2017-4-20 08:51:16 | 显示全部楼层
先收藏 暂时看不懂

出0入0汤圆

 楼主| 发表于 2017-4-20 08:52:20 | 显示全部楼层


By using an AD7245A DACPORT, a linear optoisolator, and a discrete V-I converter to control loop current, a 4-to-20-mA isolated current loop may be digitally controlled across a 5-kV barrier (see the figure).

The complete circuit exhibits excellent linearity between the digital input word and the isolated analog output current. Up to 11-bit performance is achievable with 12-bit monotonicity. The AD7245A contains a 12-bit digital-to-analog converter, an output amplifier, and a +5-V reference. Although the reference is used internally for the DAC, it can also be used for external biasing.

The IL300 optocoupler contains a single LED and two identical but isolated photodiodes. Both photodiodes receive equal irradiation from the LED. Therefore, by biasing each photodiode with a similar voltage, an identical current will flow through each. Because the relationship between both the LED and photodiode currents is nonlinear, it's necessary to use a feedback loop that monitors the current flowing through one of the photodiodes and then servos the LED drive current when needed.

The DACPORT is configured to operate in the 0-to-+5-V output range. This output swing (V\[subscript\]1) is attenuated by R1 and R2 to give 0 to +1.666 V at the noninverting amplifier input (V2). The negative feedback loop, which consists of the LED and one of the photodiodes in the IL300 (PD1) ensures that the voltage (V3) at the inverting terminal of the amplifier (A1) will be at the same potential as the voltage at the noninverting terminal.

The current flowing through the photodiode will be very small, and more importantly, the change in current flow for a 1 LSB change in DAC code will be negligible (12 nA). Therefore, it's important that a highly accurate and stable voltage reference source is used as a bias supply. The +5-V reference output on the AD7245A provides this bias.

A similar current will flow through the second photodiode, generating an equivalent voltage across resistor R\[subscript\]5. Again, it's essential that an accurate and stable voltage reference bias is used so that any current variations are minimized. In this case, the REF02 supplies a stable +5-V bias voltage.

The isolated output voltage (V4) is buffered by A2. V4 controls a V-I converter formed using A3and Q1.

The buffered output voltage (V5) ranges between 0 and +1.666 V, depending on the code applied to the DAC. This is transformed into a loop current by A3 and transistor Q1. The loop current (Iloop) is monitored with a 10-Ω sense resistor (R10). A low resistance value minimizes the voltage dropped across it and allows the loop to operate with low loop supply voltages. Q1 is connected as an emitter follower in a feedback circuit that controls the current flowing in the loop. The feedback circuit forces both A3 amplifier inputs to the same potential. Consequently, the voltage across the sense resistor (V6) is equal to the voltage across the feedback resistor (R8). Because no current flows into the amplifier inputs, current I3 flowing through R8 must equal the sum of the currents flowing through R6 and R7. Iloop is therefore controlled by I1 and I2.

I2 sets up a 4-mA loop-current offset, while Iloop is controlled by the DACPORT to add a further 0 to 16 mA. The loop current is:

I\[subscript\]loop (mA) = 4 + 16(D) where D is a fractional representation of the digital word applied. It may be programmed between 0 and 4095/4096.

The circuit contains an offset and full-scale adjustment facility. This offset potentiometer (P1) should be trimmed until a 4-mA current is measured flowing in the loop. This is done with all 0's loaded to the DAC. With all 1's loaded to the DAC, the gain-adjusting potentiometer (P2) should be trimmed until a current of 20 mA - 1 LSB (19.996 mA) is measured flowing in the loop. Note that 1 LSB of current is equivalent to 16/4096 mA = 3.9 µA.

attach://369891.jpg

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2017-4-20 08:57:27 | 显示全部楼层
这个很强

出0入0汤圆

发表于 2017-4-20 09:05:40 | 显示全部楼层
看了一下类似楼上的IL300,LC上的海外代购最便宜的批量5000+:¥17.69
还找了一个,HCNR200,LC上批量价块7¥,
推荐里面,ZMPT107,精密电压互感器,2mA/2mA,正弦波电流输入,输出等电流的正弦波,貌似便宜点。

出425入0汤圆

发表于 2017-4-20 09:10:24 | 显示全部楼层
TBG3 发表于 2017-4-18 15:57
光藕传PWM,然后变电压变电流,这种方式我觉得更便宜。

赞成。需要传输模拟信号时,把它变成PWM,光耦传PWM。mcu把PWM变成电压,如果要变成电流,复杂一些了。

出0入45汤圆

发表于 2017-4-20 11:09:45 | 显示全部楼层
谢谢分享 ,留个记号!

出0入0汤圆

发表于 2017-4-20 12:28:51 | 显示全部楼层
留个记号,有空再细看

出0入0汤圆

发表于 2017-4-20 14:08:24 | 显示全部楼层
值得参考

出0入0汤圆

发表于 2017-4-20 14:59:27 | 显示全部楼层
redroof 发表于 2017-4-17 10:42
问题是,没有人告诉你普通光耦的线性和传输比一致性怎么样啊
你测了一个就算参数还不错,也不 ...


线性不是主要的问题,主要还是电流传输比的问题。

它用其中一个作为反馈,另外三个用来复制这个电流,这样使用的条件是使四个光耦的 CE电压、IF 、温度都相等(并且工作在线性放大区),相当于给四个通道建立了一个相同的工作点,在同一片上的离散性及稳定性应该比四个分离的光耦好很多。

但实际能有多好估计也只能实测才能确定了,老外也应该是已经验证过了才会拿出来分享。

出300入477汤圆

发表于 2017-4-20 15:03:59 | 显示全部楼层
673104326 发表于 2017-4-20 14:59
线性不是主要的问题,主要还是电流传输比的问题。

它用其中一个作为反馈,另外三个用来复制这个电流, ...

我说了多次,精度是设计出来的,不是试验出来的。
做高精度的人都明白这句话。

你不能依赖厂家没给你保证过的参数。
而厂家并没有给你保证普通的4路光耦内部的一致性。
所以,over

出300入477汤圆

发表于 2017-4-20 15:05:47 | 显示全部楼层
673104326 发表于 2017-4-20 14:59
线性不是主要的问题,主要还是电流传输比的问题。

它用其中一个作为反馈,另外三个用来复制这个电流, ...

一个简单的例子:
你试验了10个个体,发现他们都满足某个手册没保证的参数。
然后你就量产了,做了1000个。结果里面有900个都不满足这个参数。
你就去哭吧

出0入0汤圆

发表于 2017-4-20 15:14:49 | 显示全部楼层
bg6agf 发表于 2017-4-17 11:13
我觉得吧。一致性不一定好。但是单调性应该是好的。所以只要校准一下应该都是可以用的。 ...

自己实际搭一下试试,让他们闭嘴。

三个电路都很巧,两个用了多路光耦的电流传输比匹配特性,无所谓线性或者非线性。精度的好不好,只由四个片上、工作点相同的电流传输比匹配程度决定。

但CTR这个参数太不稳定了,受温度、IF电流、工作时间都会有影响,还会有一定的离散性。电路靠反馈及偏置来实现相同的工作点:电压、电流、温度,工作时间自然相同。

所以剩下的只有四个通道的离散特性了,老外敢发出来估计也是做了验证,如果没有做那就 呵呵 了!

中间那个用了低CE电流情况下,很低的饱和输出电压的特性,由于是PMW,加入了低通滤波来对信号进行稳定,所以整体的响应及稳定时间会比较慢,而第一个则没有这个问题。

出0入0汤圆

 楼主| 发表于 2017-4-20 15:28:08 | 显示全部楼层
redroof 发表于 2017-4-20 15:05
一个简单的例子:
你试验了10个个体,发现他们都满足某个手册没保证的参数。
然后你就量产了,做了1000个 ...

我早就说了嘛。自己做一个很NICE 。做产品会哭。哈哈。

如果真的要做产品还得设计一个工装测试一致性。还不能保证不会随时间温度变化。。。这不是一个大坑么。

出0入0汤圆

发表于 2017-4-20 15:50:04 | 显示全部楼层
redroof 发表于 2017-4-20 15:03
我说了多次,精度是设计出来的,不是试验出来的。
做高精度的人都明白这句话。


我没有说精度不是设计出来的啊,只是有时候我们会用一些手册上没有给出来的特性。

没有给出来可能并不是因为这个参数不好,而是大多数情况下不会这么使用。就像LED手册里不会给出你把它来当成光传感器的用法或参数,但确实在某些情况下可以这么使用。

如果这个特性在实验后有较好的效果,那为什么不能用? 手册里给出来的参数,不也是实验测出来的。

电路的说明里,也没有具体给出精度到多少,5%?1%?0.1%?

只是这样上嘴唇碰下嘴唇凭的说,谁也不能给出一个定论,能理解到电路的设计要点就OK了,如果能动手验证那再好不过了。

出0入0汤圆

发表于 2017-4-20 16:25:54 | 显示全部楼层
好材料当然要收藏

出0入50汤圆

发表于 2017-4-20 17:52:05 | 显示全部楼层
楼上有人说用PWM光耦隔离传输,这个方法仍然会受到光耦性能的制约,包括温漂都会很大,因为PWM的波形经过光耦之后会明显失真,如果传输的是普通数字信号,这个失真的误差容限允许很大,但是如果是高分辨率的PWM信号,那这个失真会把整个传输信号的精度降低很多,在光耦的另一侧,完全失去了原来的PWM编码精度。

最低成本的方式,就是用RS232这种最古老简单的串行通信,把PWM占空比的数值,直接以数字信号的方式经过光耦隔离发送,这个只需要一个几毛钱的光耦+三极管整形电路,就可以轻松实现115200bps的隔离通信,接收端,使用一片非常低廉的MCU,引脚可以很少,只需要一个串口接收功能和PWM输出功能,一般来说,16位的PWM,如果使用两进制,那么只需要2个字节就可以传输,再加一个简单的校验和,也就3个字节,再搭配点静默时间来划分数据帧,用类似于MODBUS的那种方式通信,4个字节的时间,就可以完成一次数据的传输刷新,那么115200bps,每秒可以传输11.52KB,等于是可以做2880次的PWM数据刷新,对于99%的应用场合都可以轻松应付了,关键是精度和分辨率可以很高,而且成本低,大批量生产的一致性会很高。

模拟电路虽好,但是该放下的时候,还得放下,这是一个数字化生存的时代,要与时俱进才行啊

出300入477汤圆

发表于 2017-4-20 18:35:07 | 显示全部楼层
ilikemcu 发表于 2017-4-20 17:52
楼上有人说用PWM光耦隔离传输,这个方法仍然会受到光耦性能的制约,包括温漂都会很大,因为PWM的波形经过光 ...

是的。
光耦的延迟时间的分散性都很大,还有上升沿下降沿的判决门限电压也不确定。
除非用很高速的光耦或者干脆用磁隔离,才能尽量无损的传输PWM信号。
完全不如在接收端弄个小单片机,只传几个字节的数据,接收端单片机自己生成正确的占空比。

出0入0汤圆

发表于 2017-4-20 20:31:26 | 显示全部楼层
先标记一下
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-4-25 15:22

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表