0
\$\begingroup\$

I want to convert PWM output of microcontroller to 4-20mA. I use below circuit for this work :

enter image description here

But voltage on pin + and - Are not equal in this circuit!!! for example when pin + is 1.2 volt with voltmeter ,pin - is 2.04 volt . while They should be equal http://en.wikipedia.org/wiki/Operational_amplifier

in your opinion , what is my problem ?

\$\endgroup\$
5
  • 3
    \$\begingroup\$ In my opinion the problem is an underspecified schematics (values for components missing, unknown voltages etc.), unclear information of measurement procedures and comparison to expected outcome, and unkown possible deviations to what is really on your breadboard. \$\endgroup\$
    – PlasmaHH
    Apr 14 '15 at 11:14
  • \$\begingroup\$ @PlasmaHH -Excuse me ,R load is 100 ohm , now enter other value in circuit \$\endgroup\$ Apr 14 '15 at 11:17
  • 1
    \$\begingroup\$ You have a RC filter with a corner frequency of 7.23MHz, and 125kHz PWM. The filter is not doing anything. \$\endgroup\$
    – Matt Young
    Apr 14 '15 at 12:06
  • \$\begingroup\$ @ Matt Young -ok ,but do Inappropriate selection for RC filter Will be cause This issue? \$\endgroup\$ Apr 14 '15 at 12:11
  • 1
    \$\begingroup\$ It's certainly a factor. This circuit has more problems than you can shake a stick at. \$\endgroup\$
    – Matt Young
    Apr 14 '15 at 12:21
1
\$\begingroup\$

The question "What's my problem?" cannot accurately be answered, since there are at least 5 problems.

1) The problem you're worried about, op amp conditions, has been addressed by Spehro. You are using an inappropriate op amp. Either change the op amp or provide a -12 volt negative supply.

2) An op amp problem not addressed by Spehro is that a 741 is not rated to produce 20 mA of current. It may work in your circuit, or it may not. One sample may work while another may not. The LM358 is better, but its maximum current rating is 20 mA only at 25 C. Over full temperature range it is only rated for 10 mA. As with the 741, it may work or it may not.

3) Although you have produced a current loop transmitter, it is not a 4-20 mA device. As configured, 5 volts on the input will produce 20 mA through your 100 ohm load resistor. 0 volts in will produce 0 mA out.

4) Another consideration is frequency response. Neither a 741 nor an LM358 will work at 125 kHz.

5) Related to 4), sending raw PWM over a 4-20 mA link is just silly. Assuming that you have a uC producing PWM at 0-5 volts, and you want to transmit that to a remotely located driver, you should use a (preferably differential) logic driver. A current loop is the worst possible choice. Current drivers, by their nature, are very high impedance: a perfect current source has infinite impedance. As a result, any capacitance on the line will produce a severe low-pass filter at the receiver, and your PWM signal will be grossly degraded. If you are using a current loop because you have heard that it rejects noise, you should drive a logic-level signal over shielded twisted pair with a controlled receiver impedance to match the link impedance, and optically isolate the receiver.

\$\endgroup\$
10
  • \$\begingroup\$ THANKS WhatRoughBeast, 1-so i should change 741 op amp ,2-so i can not use of op amp ? because current is problem? ,3-this subject is not problem for me,because i send 1 to 5 volt by program into uC ,4-so i should change Frequence ,5-i want to send 4-20 mA as AO to AI other device for example PLC ,,,,,,,finally , what is best circuit for this work ?? \$\endgroup\$ Apr 14 '15 at 12:50
  • \$\begingroup\$ I'm still not sure of exactly what you want. If you MUST communicate via current loop, send the PWM modulation signal instead, and generate the PWM itself at the second device. And I don't see how you think you can easily generate a 1-5 volt PWM signal in the first place. \$\endgroup\$ Apr 14 '15 at 16:35
  • \$\begingroup\$ i only want to generate 4-20 mA for analoge output . for this , What do you suggest ? \$\endgroup\$ Apr 14 '15 at 16:43
  • \$\begingroup\$ You generate 4-20 mA for analog output. You send this to the second unit. This unit converts the analog signal to PWM, WHICH IS DIGITAL. \$\endgroup\$ Apr 14 '15 at 16:48
  • \$\begingroup\$ no , second unit is plc(that analog input) and receive 4-20 mA , \$\endgroup\$ Apr 14 '15 at 16:55
1
\$\begingroup\$

No opinion involved- the 741 was not a 'single supply' op-amp, so the input common-mode range does not extend to the negative supply rail nor can the output swing all the way to that rail.

Replace it with half an LM358 and much will improve, though that is not really a good way to do 4-20mA- it's preferable to have one side of the load grounded.

Edit: You did not disclose the PWM freqency, but the values shown 100R and 220pF both seem inappropriately low.

\$\endgroup\$
8
  • \$\begingroup\$ PWM freqency is 125 khz , but do PWM freqency Will be cause This issue \$\endgroup\$ Apr 14 '15 at 11:29
  • \$\begingroup\$ The uC drive will not be symmetric with such high loading, and did you calculate the ripple voltage? For example, at 50% duty cycle? \$\endgroup\$ Apr 14 '15 at 11:34
  • \$\begingroup\$ i use of below site to calculate low pass filter sim.okawa-denshi.jp/en/PWMtool.php in your opinion ,what is best value for filter ? \$\endgroup\$ Apr 14 '15 at 11:38
  • \$\begingroup\$ Maybe 20K and 100nF (about 100,000 times higher \$\tau\$), which would give < 0.25% ripple and response time of some milliseconds. \$\endgroup\$ Apr 14 '15 at 15:36
  • \$\begingroup\$ yes , these values cause output without ripple ,but output voltage can not reach to 5 volt and become 3 volt , do i am in right? \$\endgroup\$ Apr 14 '15 at 16:19

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .