4-20mA Comunications

Discussion in 'General Electronics Chat' started by Diego Bonilla, Sep 18, 2014.

  1. Diego Bonilla

    Thread Starter Member

    Sep 18, 2014
    35
    0
    Hi actually i try to connect to a fuel dispenser.
    The dispenser use a two wire 4-20mA comunication.

    I have the protocol but i dont know how is the circuit to make the interface with my microcontroler.

    I think the comunication are simplex, some body can help me?
    to convert the 4-20mA to TTL, but TX -RX system
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,571
    2,381
    What do you need, 4-20ma to TTL or the RX/TX part? or both?
    Max.
     
  3. wmodavis

    Well-Known Member

    Oct 23, 2010
    737
    150
    Does the fuel dispenser require a power supply to operate? i.e. Does it have a 2-wire or 3-wire interface?
    Can you provide dispenser specs?
    What microcontroller are you using? Does it have an A/D converter? What is the input range of the A/D converter?
    The "communication are simplex" - the communication of what 'are simplex'?
    Last couple lines are somewhat incompressible.

    If the dispenser is NOT powered separately you likely will need a loop power supply.
    The A/D conv will read the DC voltage across a load resistor which can be scaled to your A/D input range.
     
  4. Diego Bonilla

    Thread Starter Member

    Sep 18, 2014
    35
    0
    Hi Max...both
     
  5. Diego Bonilla

    Thread Starter Member

    Sep 18, 2014
    35
    0
    Hi wmodavis

    The interface are two wires.
    The specs about all dispenser ....yes, and the protocol, but the 4-20mA specs...no
    Well ....the microcontroller still have not selected yet, but i think in a ARDUINO, GALILEO or EDISON for the DEMO.
    Yes the comunication i think are simplex, if you want i share the protocol.

    what worries me is that as I receive and send information right through the loop, should put certain protections and other

    Oh...and excuse my english, my native language are spanish.
     
  6. BR-549

    Well-Known Member

    Sep 22, 2013
    2,007
    395
    Hello there. The 4-20 ma loop does not have a protocol. The "data" on the loop is the current flow thru the loop. The range is 4 to 20 ma. They start at 4 ma, so that you know the circuit is on. Usually this current is put thru an appropriate resistor to give you the desired voltage swing for a adc.
     
  7. wmodavis

    Well-Known Member

    Oct 23, 2010
    737
    150
    What is the function of the "TTL, & TX -RX system"? Is that part of the fuel dispenser spec?

    4-20 mA is a DC signal proportional to the sensor that is monitoring the flow, I assume, of your dispenser. If you want to read it with a microcontroller it must either have an A/D converter built in or you must provide one separately to convert the 4-20mA DC signal to digital data so that the microcontroller can process it.

    If the dispenser is two wire then you must provide power to it with a suitable DC power supply to power the dispenser and the current loop.

    If you do not provide us with the dispenser specifications and the specific microcontroller we can only guess how to help you.

    I do not understand your worry. In 4-20mA loop the only communication is a DC signal supplied by the sender/transmitter (that is your fuel dispenser) if in fact it does have a 4-20mA loop output, and that 4-20 mA signal is proportional to what ever the fuel dispenser is measuring. Without the full specs I can only guess what you are actually trying to do and maybe be of more help.

    There are lots of resources on the web on proper use of 4-20 mA loops. You can also search on AAC as this has been discussed many times.
     
  8. Diego Bonilla

    Thread Starter Member

    Sep 18, 2014
    35
    0
    Hi guys

    Console=Microcontroler
    Pump=Dispenser
    Let me explain a little more. The manual says:

    "The two wire protocol is a Gilbarco propietary protocol, which use a 11 bit data format. The protocol was designed to support up to 16 active fueling on one communications loop."

    "The line level protocol is basically a multi-drop protocol which supports up to 16 terminals (pumps). When the master (ie console) sends the data or the terminal (pumps) responds, every unit in the loop will receive the same data. Only the addressed terminal (pump) should response and the rest of the terminals should ignore the data. The master (console) will be the only unit in the loop which is allowed to initiate communication."

    I have the manual complete...but only for the logical interface, conventions and effects; the hardware i dont.
     
  9. faley

    Member

    Aug 30, 2014
    94
    13
    So the controller did not come with the pumps Diego?
     
  10. BR-549

    Well-Known Member

    Sep 22, 2013
    2,007
    395
    Hi Diego, may I ask, what makes you think those two wires are a 4-20ma loop?
     
  11. Diego Bonilla

    Thread Starter Member

    Sep 18, 2014
    35
    0
    Well... friend that if you have the right, mine are just assumptions. I thought it was so because it is the most discussed in the industry. But good .... for that between here for help.

    How could I know what kind of loop is? or connect?

    Thanks for your help
     
  12. BR-549

    Well-Known Member

    Sep 22, 2013
    2,007
    395
    Have you got a scope?
     
  13. faley

    Member

    Aug 30, 2014
    94
    13
    Let's try this Diego: What is the make (manufacturer) and model number of the pumps (dispensers)? What is the make and model number of the controller?
     
  14. Diego Bonilla

    Thread Starter Member

    Sep 18, 2014
    35
    0
    Nop...but i can obtain one
     
  15. Diego Bonilla

    Thread Starter Member

    Sep 18, 2014
    35
    0
    The pumps are GILBARCO, every model use the same interface and protocol.
    The controller (I guess you mean the microcontroller) I still can not decide which ......
     
  16. wmodavis

    Well-Known Member

    Oct 23, 2010
    737
    150
    They are NOT 4-20 mA loop interface.
    It sounds 'similar' to Modbus protocol. You must get the full data communication protocol from Gilbarco if you want to interface to some yet as unknown microcontroller.
     
    MaxHeadRoom likes this.
  17. wmodavis

    Well-Known Member

    Oct 23, 2010
    737
    150
    Full disclosure will greatly aid various experts in helping you. Else we will only be guessing.
     
  18. BR-549

    Well-Known Member

    Sep 22, 2013
    2,007
    395
    I'm not really familiar with that apparatus. The scope would give you an idea of the signal, but it's their own code. Faley seems to be familiar with that equipment.
     
  19. faley

    Member

    Aug 30, 2014
    94
    13
    Yep, controller = micro-controller. The micro-controller and pumps must be compatible.
     
  20. Diego Bonilla

    Thread Starter Member

    Sep 18, 2014
    35
    0
    I have the full communication protocol ....what I need is the hardware to interface
     
Loading...