4 -20mA Analogue input help


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237

    Default 4 -20mA Analogue input help

    Hiya

    Just a quick one ....need to interface a 4-20mA signal to a pic

    I know I can do it with probably a 250R resistor and Opamp LM358

    Wonder if anyone done anything similar

    Or any pointers / pitfalls

    Thank you for reading

    Andy

  2. #2
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: 4 -20mA Analogue input help

    Andy, a 250 precision Res is what I always used in the field for years. Just check the voltage across the res with the pic. I would think it depends on the accuracy you need.
    wayne

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,793


    Did you find this post helpful? Yes | No

    Default Re: 4 -20mA Analogue input help

    I'd recommend 0.1% or best and also an input protection for overvoltage on the PIC side. If for any reason the ground side of the resistor is disconnected, it is certain that the PIC will be destroyed.

    Ioannis

  4. #4
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default Re: 4 -20mA Analogue input help

    If you will use 10-bit ADC to read the voltage on 250R resistor, why would you need an opamp?250R will give you 5V at 20mA max.and, 1V at 4mA lowest.Your ADC reading will be from 205 to 1023.And remember, most 4-10ma sensors provide lower than 4mA and higher then 20mA; Mostly, 2mA to 25mA is the field.So you may want to keep your voltage range between 0.5V and 4.5V. I would not go for 5V at max mA. You should make it 4.5V at 20mA. So if it goes higher than 20mA you still have room to detect it.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,793


    Did you find this post helpful? Yes | No

    Default Re: 4 -20mA Analogue input help

    In case the ground return is somehow opened, won't this destroy the pic?

    Ioannis

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default Re: 4 -20mA Analogue input help

    Quote Originally Posted by Ioannis View Post
    In case the ground return is somehow opened, won't this destroy the pic?

    Ioannis
    Yes, I think so; Most likely it will burn the i/O circuity of the pin.
    If not, you get reset.

    And, most of the time, people tend to connect sensors without powering-off the reader device. So there is high possibility that what you said is indeed a highly possible scenario.
    Last edited by sayzer; - 3rd May 2020 at 11:31.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  7. #7
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: 4 -20mA Analogue input help

    Accidentally delivered 12VDC to GPIO.5 of 12F683. Port is now dead, but other ports and IC itself work properly.

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,793


    Did you find this post helpful? Yes | No

    Default Re: 4 -20mA Analogue input help

    But I do not see an input protection circuitry. Only the 250Ω resistor.

    I think better to use a 240Ω resistor, then a series resistor with diodes to Vdd and ground for the least protection.

    Better use these:

    1. A ferrite ring (say Murata BLM21, 1K@100MHz) in the input wire. Then a small capacitor of 47-100pf to ground. This will give a protection to very short transient input voltages.

    2. Then 1K in series and 100pf to ground for a strong low pass filter so a 500V pulse will give a 5V/ns slew rate on the 100pf.

    3. Two LND150 with a common resistor of 1K will give a two way current limit of 10mA so the diodes mentioned above can handle the excess current to power supply.

    Ioannis

  9. #9
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: 4 -20mA Analogue input help

    Hi All

    Thank you... Thank you ......

    I am more confused than ever now.....But all good advice.... I was thinking I was keeping it simple with my 250R and Op-Amp

    But lots of good advise here......like the 0-5v to 4.5v Idea.... Never thought :-)

    Precision resistor is good ... But again liking the 240R plus Series 10R with diodes

    Just swamped...... Thank you Again all

    Processing the help

    Andy

Similar Threads

  1. Creating 4 to 20MA ?
    By amgen in forum Off Topic
    Replies: 10
    Last Post: - 3rd May 2014, 23:45
  2. 32 LEDs with less than 20mA
    By Demon in forum Off Topic
    Replies: 11
    Last Post: - 23rd January 2014, 04:28
  3. 4-20mA output using PWM
    By gavo in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th December 2007, 10:45
  4. Pin as Digital and Analogue
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th July 2006, 10:41
  5. 4-20mA to 0-5V configuration
    By leonel in forum General
    Replies: 0
    Last Post: - 31st August 2005, 13:33

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts