2 wire and 3 wire 4-20mA transmitter designs? - Page 1
Forum section: electronics / projects

author: incf
author_rank: Frequent Contributor
timestamp: May 21, 2025, 10:41:31 pm
content: I'm looking for links to reference designs for 2 wire and 3 wire 4-20mA transmitters (op-amp / transistor circuits)As well as general advice and experiences from those who've traveled this route before.I've been tasked with making a quick-n-dirty universal analog output card for a system: 4-20mA and 0-10V. The voltage output is easy. I've done 4-20mA receivers before but not transmitters. Not sure about the compliance voltage requirements on 4-20mA loops. I presume the users will supply somewhere between 5V and 30V.All input is welcome. The term "universal" has the potential to mean a lot of things with respect to the systems the card might be connected to/interfacing with.Thanks!edit: see my replies below for a more detailed technical description

author: langwadt
author_rank: Super Contributor
timestamp: May 21, 2025, 10:51:57 pm
content: https://www.ti.com/lit/ds/symlink/xtr117.pdf

author: Benta
author_rank: Super Contributor
timestamp: May 21, 2025, 11:22:59 pm
content: The standard loop voltage is 24 V, and sensors/actuators (both passive and powered) are expected to accept that.

author: pqass
author_rank: Super Contributor
timestamp: May 21, 2025, 11:26:00 pm
content: I would think isolation is important as you can't make any assumptions on the receiving end.And also which end will provide the loop voltage.Especially if your "universal output card" will provide multiple transmitters.I've only built the classic National LM35+LM317 transmitter.Thisoptoisolator solutionmay be what you need.

author: Perrold
author_rank: Contributor
timestamp: May 22, 2025, 04:34:08 am
content: I've had the misfortune of working with several custom engineered and widely deployed 4-20mA loop interface boxes of various flavors. Design deficiencies ranged from fundamental flaws that should have been caught, a general lack of understanding of how COTS 4-20mA instruments are actually used, and deeper issues that only became apparent way down the road after everything was (not) working together. All this hardware was, at best, frustrating to use while actively degrading signal integrity to outright worthless and should have been pushed over a cliff into the ocean. This is something that can appear deceptively simple and trivial to design but in practice many nuances get in the way between a good idea and a good product. Understand what you are actually tasked with doing, don't assume the person communicating the requirements understands any of them, and gain more than a passing familiarity with how 4-20mA instruments are used in the real world.There's been precisely one and only one instance of custom 4-20mA hardware that I've seen done right. Flawless execution. Hot garbage is the other 80-90% from my anecdotal experience. None of this includes instrumentation or other hardware that can be bought from a catalog. Spread there is usually narrower ranging from adequate to not that terrible.

author: H.O
author_rank: Frequent Contributor
timestamp: May 22, 2025, 04:53:19 am
content: I've worked with industrial 4-20mA stuff for many years, lots of 2- and 4-wire stuff but I don't think I've even come across a 3-wires installation. In fact I had to look up what it actually meant - live and learn.

author: Zero999
author_rank: Super Contributor
timestamp: May 22, 2025, 07:52:48 am
content: Self-powered or do you want to convert a voltage to 4mA to 20mA?Perhaps the following thread might be useful.https://www.eevblog.com/forum/projects/4-20ma-current-loop-185196/

author: PCB.Wiz
author_rank: Super Contributor
timestamp: May 22, 2025, 09:36:52 am
content: Quote from: pqass on May 21, 2025, 11:26:00 pmIsolation is getting easier to do.See parts like Guestgood GP8102 PWM to 4-20mA 9-36V 1mA, paired with a fast, low power Toshiba opto, like TLP2361 / TLP2761 ( < 1mA, 15Mbd ) / TLP2370 (< 0.4mA,20Mbd )They also have DC-PWM generators, or a MCU can do that part.Or, you can use the linear Dual-Photodiode parts from Vishay/Broadcom/Littelfuse etc, tho they need transfer adjustments.

author: incf
author_rank: Frequent Contributor
timestamp: May 22, 2025, 10:49:01 am
content: Quote from: Perrold on May 22, 2025, 04:34:08 am@PerroldCan you elaborate, or point me to a source that elaborates on this subject?Quote from: Zero999 on May 22, 2025, 07:52:48 amI'm leaning towards self powered for 4-20mA mode(we can ignore isolation in this instance)That thread is part of what prompted me to post. I'd like a more general look at the subject.Quote from: pqass on May 21, 2025, 11:26:00 pmThe card has two modes. It provides one signal that can be either 0-10V or 4-20mA.I'm okay paying very little attention to isolation - the source the card measures internally is floating already.I'd like it to be self powered in 4-20mA mode.In 0-10V mode the customer will supply some supply voltage (I speculate it might usually be 12V or 24V)

author: Zero999
author_rank: Super Contributor
timestamp: May 22, 2025, 10:57:31 am
content: It still isn't clear what you want to do?There are ICs desogned for this, such as the XTR115 & XTR116.https://www.ti.com/lit/ds/symlink/xtr115.pdf

author: incf
author_rank: Frequent Contributor
timestamp: May 22, 2025, 11:28:22 am
content: Quote from: Zero999 on May 22, 2025, 10:57:31 amI need to implement it using dirt cheap commodity parts (TL431, LM321, diodes, transistors). I can't use TI's very nice all in one part.Here is a simplified description of the system and the problem I am hoping to solveThis is a module reads a 'floating' voltage source that varies from 0% to 100% of some reference voltage we the circuit designer supply (effectively a high impedance >100k potentiometer whose parameters are poorly controlled and vary with time)"No accuracy requirement" - roughly 5% absolute accuracy is my targetBandwidth <1HzIt is powered 100% from customer supplied powerIt has two output modes: 2-wire 4-20mA and 3-wire 0-10V (but not both at the same time)2-wire, 4-20mA mode is powered from the loop current, and tolerates reversed wires from a 10-30V source3-wire, 0-10V mode relies on the user providing 3 wires, 10-30V, COM and VOUTOpen questions:EMI? Noise? (it's a low bandwidth signal, and measuring a high impedance source, not sure I can do anything except low pass filter my input at ~1Hz or thereabouts, and hopefully design in a way that maintains a large power supply rejection ratio at the output)Transients? (I assume a large SMB TVS that clamps well below the op-amp max supply voltage should be more than sufficient)In 4-20mA mode the receiver (ie. a 4-20mA analog card on a customer's PLC) supplies the loop current, right? (edit: or at least the user wires the sensor to the local 24V supply on that end) And the transmitter (my module) can be powered by the receiver.I think I can design that, it seems fairly simple.At this point I think I'm mostly looking for "gotchas", "horror stories", or design manuals that might point out 'things to look out for' at this point

author: Zero999
author_rank: Super Contributor
timestamp: May 22, 2025, 08:26:21 pm
content: Quote from: incf on May 22, 2025, 11:28:22 amTry this. The input impedance is 500k, so should be acceptable with a 100k potentiometer, given its maximum output impedance will be 50k. If it's not, then you'll need a buffer, but the op-amp will either need to be changed to rail-to-rail, or the circuit will need to be redesigned.The op-amp can be the LM321/358 or any cheap single supply op-amp, so long as the supply current is comfortably under 4mA.The regulator must be the LM317L. Don't use the larger LM317. The LM317L has a lower minimum load requirement, which is important.Note I tried the LM358 SPICE model and it didn't work properly. It works with a generic model and should work with the LM321 in real life. Always build a prototype first!4mA to 20mA 0 to 5V LM317L.asc(15.02 kB - downloaded 11 times.)How are you going to get 10V and 0 to 10V out? You'll need a rail-to-rail op-amp and even then, there will be some voltage drop, unless you power it from a boost converter.EDIT:Using the TL431 as a reference is more accurate than the LM317L. The LM317L is used as a current source for the TL431 and as a 5V supply for the op-amp. Now your potentiometer can be run from the TL431 and the op-amp is still powered from 5V, so a buffer can be used to increase the input impedance.4mA to 20mA 0 to 2.495V TL431.asc(17.98 kB - downloaded 12 times.)

author: PCB.Wiz
author_rank: Super Contributor
timestamp: May 26, 2025, 06:45:09 am
content: Quote from: Zero999 on May 22, 2025, 08:26:21 pmI looked into that, and it seems the LM317 is fading, and that low current is not so easy.eg I can find older 2014 TI data that specs typ 1.5mA max 2.5mA, but their 2024 data mentions a new chip that is 5mA MAX.Some Asian LM317L's merely say 10mA min load. Maybe the falling volumes mean they all use a full LM317 die ?Quote from: Zero999 on May 22, 2025, 08:26:21 pmIf the LM317L is just used to supply TL341 and opamps, maybe a low current +high voltage standard LDO can have the right specs?You can even power the TL431 from a Dual PNP current source, ( maybe MMDT5401, MMBT5401D at 160V to give good spike margins)There are sub 100uA TL431's available, which could be a better choice.

author: Zero999
author_rank: Super Contributor
timestamp: May 26, 2025, 10:15:30 pm
content: Quote from: PCB.Wiz on May 26, 2025, 06:45:09 amI hate it when manufactures change characteristics of their devices, especially for the worse and don't bother to issue different part numbers.QuoteThe original poster wants to keep to common jellybean parts.Yes, I would just use a constant current source to power the TL431. There's no need for a low current part. The 1mA minimum isn't a problem.