This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

XTR111: Need help with designing 4-20mA circuit

Part Number: XTR111

Hi,

I Want to control a solid state relay (SSR) from my MCU. The SSR is controlled by 4-20mA (3.8-10V). I want to use the XTR111 and a PWM output from my MCU. R3 and C1 are supposed to filter the PWM to a DC voltage for the XTR111's VIN. I have no experience with XTR111 or designing 4-20mA circuits.

Will this work?

  • Hi Lars,

    The XTR111 will require a bypass capacitor of at least 100nF at the VSP (24-V) supply.  I have a few questions:

    If the voltage generated by the PWM output/FET/RC filter is 0V-5V, the resistive divider required at the XTR111 input is R5=40kOhm and R4=10kOhm as shown on Figure 43 of the XTR111 datasheet.  The schematic shows R5=23kOhm and R4=10kOhm, Is the filtered output of the PWM 0-5V as shown on your schematic? The gate of Q3 is shorted to the +3.3V supply. Is this what is intended?  Shouldn't the gate of Q3 be driven by the MCU directly instead to turn on and off the N-CH FET with the drain of the FET connected to GND?  What is the frequency and duty cycle range of the PWM signal?  Please clarify.

    Regards,

    Luis 

  • Hi Lars,

    One possibility, since your PWM output signal is 0V-3.3V from the MCU, an easier approach would be to set your Regulator voltage to 3.3V, by adjusting R7=10.1kOhm and R6=1.01kOhm resistors. Then you will adjust RSET to 1.65kOhm (for max input voltage of 3.3V, 20mA output).  After this, you will set R5 to 40kOhm and R4=10kOhm. 

    This will allow you to eliminate the N-FET transistor, and the R2 and R1 resistor in your schematic...  You will need connect the MCU PWM output through a passive filter into the XTR111 voltage divider (R5=40kOhm and R4=10kOhm).  The filter will need to be designed and tuned per your ripple tolerance and PWM frequency requirements.

    Attached is an application note that discusses how to design filters for a PWM application according to the maximum ripple that may be tolerable on your application. The application tunes the filter for a 12-bit resolution application, but the method could be used for different voltage resolution or ripple requirements. 

    TI Precision Designs: Verified Design Microcontroller PWM to 12bit Analog Out:

    https://www.ti.com/lit/ug/tidu027/tidu027.pdf

    Thank you and Regards,

    Luis

  • Hi Luis,

    When I simulate this in Spice, R5 must be 23k if the input is 0-3.3V. If R5 is 40k and the input is 0-3.3V, I get out 0.66-3.3V.

    For the PWM I need to filter it according to my PWM frequency and duty cycle. Using just R3 and C1 might be to insufficient. I need to simulate this stage.

  • Hi Lars,

    Thank you, converting the 3.3-V PWM to a 5-V signal using the FET can work; alternatively, you could scale VREG to 3.3V, and RSET to 1.65kOhm and use the 3.3-V PWM filtered signal. 

    Thank you and Regards,

    Luis

  • Hi Luis,

    I figured out that R5 has to be 40k and R4 10k. Then the 0-3.3V converts to 0.66-3.3V. When using RSET=1.65k, Iout=4-20mA. 

    I will do more simulation to see if I have to add more stages to the LP filter (R3/C1).

    I have attached the circuit I will use.

    Thanks!