Shop OBEX P1 Docs P2 Docs Learn Events
Converting the industry standard 4-20 ma signal to digital for the basic stamp. — Parallax Forums

Converting the industry standard 4-20 ma signal to digital for the basic stamp.

MorteAzureMorteAzure Posts: 8
edited 2009-12-23 18:16 in BASIC Stamp
I am trying to figure out how to use these 4-20ma signals with the basic stamp. My understanding is that this signal is converted to a 12 bit more or less so the computer can have a better resolution. I know maxim sells signal conditioners to ease the gap but it still doesn't answer my question on what kind of conversion takes place to digitize these analog signals. I am working with PLC's and would like to understand the process.



Thank, Morte Azure.

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2009-12-23 01:20
    A common technique is to run the 4-20 mA signal through a 250 ohm resistor. This will generate a 1 - 5 volt signal which you can feed into a 12-bit a/d like the LTC1298.

    The code running in the Stamp talks to the a/d and allows the value of the 4 - 20 mA signal to be determined.

    In a PLC, the 4 - 20 mA signal often goes into a dedicated card in the PLC rack which has the 250 ohm resistor and the a/d built into the card. The PLC processor talks to tthe card through the backplane and gets the value of the signal for use in the program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • MorteAzureMorteAzure Posts: 8
    edited 2009-12-23 12:21
    So my understanding is that the analog signals are not digitized in this method, by the R/C Circuit, but converted into a 12 bit binary code.
    That sounds much simpler and more managable by the computer.· Thanks for answering my question. It took a long time to find this answer.
  • stamptrolstamptrol Posts: 1,731
    edited 2009-12-23 13:19
    First, the external a/d method as described above is the best way, IMO.

    But, you can use the RCTIME method but the results are very non-linear and usually not suitable for industrial applications.

    You run the 4-20 mA through the LED of an optocoupler. You want the output side of the opto to be a transistor. Setup the RCTIME example as shown in the Editor HELPFILE. The opto's transistor goes in parallel with the resistor. As the current varies, the RCTIME value returned will vary from some maximum (at 4 mA input current) to some minimum when 20 mA flows.

    Works really well as a setpoint detector as opposed to interpreting a varying analog value.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • LeonLeon Posts: 7,620
    edited 2009-12-23 18:16
    ADI makes some nice ICs for current loop interfacing.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
Sign In or Register to comment.