Creating 4 to 20MA ?


Results 1 to 11 of 11

Threaded View

  1. #9
    Join Date
    Aug 2012
    Location
    Comodoro Rivadavia - Patagonia Argentina
    Posts
    51


    Did you find this post helpful? Yes | No

    Default Re: Creating 4 to 20MA ?

    Name:  RX_4_20-0_5V_TX_0_5V-4_20ma.PNG
Views: 3539
Size:  26.8 KB
    Hello, last night very nearly completely finished my hardware to read 4-20mA (24VDC) and generate a PWM 4-20mA (24VDC) ... Everything runs based on two LM358 with single source (one is supplied 12Vdc and the other to 24VDC). GND is shared between the two operational amplifiers.
    I share the diagram, if you need anything else, ask me and I will share it...
    To read the 4-20mA signal and place it on the display, as I was tired last night and I can not think of anything to work with floating point, implement the following lines:

    Code:
    ADCIN 0, ent420
    nivel = ent420
    aux1=(ent420*100)/250            ;(V*100)/(R*100)
    aux1= aux1 *2
    ;****blabla bla
     LCDOUT $FE, 1
    LCDOut $fe,2,"Sal: ",DEC4 aux1,"mA"
    to generate the pwm to take me filter 0-5Vdc to create the 4-20mA, implement these lines:

    Code:
    PWM PORTC.2,nivelAUX,100  ;nivel PWM = (Vout * 255) / V.Fuente
    Sorry for my spanglish!!!!

    En Español
    Hola, anoche termine casi casi por completo mi hardware para poder leer señales 4-20mA (24Vcc) y generar con un PWM 4-20mA (24Vcc)... Todo corre en base a dos LM358 con fuente simple (uno se alimenta a 12Vcc y el otro a 24Vcc). GND se comparte entre ambos amplificadores operacionales.
    Te comparto el diagrama, si necesitas algo mas, me pedis y te lo comparto
    Para leer la señal 4-20mA y colocarlo en el display, como anoche estaba cansado y no se me ocurria nada para trabajar con punto flotante, implemente las siguientes lineas:

    Code:
    ADCIN 0, ent420
    nivel = ent420
    aux1=(ent420*100)/250            ;(V*100)/(R*100)
    aux1= aux1 *2
    ;****blabla bla
     LCDOUT $FE, 1
    LCDOut $fe,2,"Sal: ",DEC4 aux1,"mA"
    para generar el pwm que me lleve el filtro de 0-5Vcc para crear los 4-20mA, implemente estas lineas:

    Code:
    PWM PORTC.2,nivelAUX,100  ;nivel PWM = (Vout * 255) / V.Fuente
    Last edited by martintorres; - 3rd May 2014 at 22:55.

Similar Threads

  1. 4 pin 4 x 4 keypad interface using pic basic pro
    By dunlao_john in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th January 2009, 05:21
  2. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  3. 16f88 - pin RA4 as analog input
    By savnik in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 15th December 2006, 13:55
  4. Real Time Clock & Eeprom
    By smart_storm in forum General
    Replies: 8
    Last Post: - 17th February 2006, 19:03
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

Members who have read this thread : 0

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