4-20mA current loop transmitter: Arduino code

Ok, I have modified the image

The + and the - are correct on the green connector?

the green will not connect to the Gnd it will connect just the battery -ve.

The 4-20mA has in build polarity protection, so you are fine with +,- either way.

Ok, thank you for the suggestions.

So my system will look like this:

I still have two questions concerning the tuning of the DAC.

Blockquote
If you want better resolution you can use it with following config
set the vref to 2.048V ( using on board gain jumper)
Resolution 16 bit.

In this case which are the DAC values for 4mA and 20mA?
Where are the gain jumper on the board?

Thank you in advance for your reply.

The gain jumper applies to 16bit DAC.

I am not sure about the DAC value, will need to look into datasheet of the DAC and the XTR.

Ok, thank you.
I have purchased the two boards, just to check which is the best for my purposes.
From the link of resources, there are these specifications:
image
I will follow them.

I still have a doubt about the code:

It seems any value is passing…I was wondering, is it right the part:
Wire.write(DAC_value);

or I have to do something different?

Thank you in advance for your reply.

it should be
int SET_DAC( int DAC_Value)
{
Wire.beginTransmission(0x60);
Wire.write(DAC_Value >> 4); // 8 MSB
Wire.write((DAC_Value & 15) << 4); //4 LSB
delay(1000);
Serial.print("4-20mA current transmitter output ");
Serial.println(i*0.013);
Serial.print(“n”);
Wire.endTransmission();
}
sorry about that.

Ok, thank you so much.
I will try it and keep you informed about the results.

Hi,

The part where I pass a value to the DAC is in the void loop ().
Why use a function as you suggested?

int SET_DAC( int DAC_Value)
{
Wire.beginTransmission(0x60);
Wire.write(DAC_Value >> 4); // 8 MSB
Wire.write((DAC_Value & 15) << 4); //4 LSB
delay(1000);
Serial.print("4-20mA current transmitter output ");
Serial.println(i*0.013);
Serial.print(“n”);
Wire.endTransmission();
}

Thank you.
This is clear for me.

Hi,
my program works now, but I have a question concerning the hardware.

Am I correct?

The resistor connected to the pin2 of XTR115.

Is it where on the board?

Thank you in advance for the help.

20K is right next to XTR. Labeled as RNE1.
Thanks

Thanks for the information.

Hi,
I am using this code:
Wire.beginTransmission(MCP4725_ADDR); //MCP4725 address
Wire.write(64); //update DAC
Wire.write(DAC_value>> 4); // 8 MSB
Wire.write((DAC_value & 15) << 4); //4 LSB
Serial.print("4-20mA current transmitter output ");
Serial.println(DAC_value*0.00676,4);
Wire.endTransmission();

It seems that I have some problems in updating the DAC value duringmy test so I want to measure Vin to better check the DAC output.

Could you please indicate to me where I have check on the board?

Thank you in advance

1st pin of part U5.
Thanks

Thank you for the information.

I wired the leads to the DAC out because I was thinking to have some problems in updating a new value on the DAC.

I have just tried to pass 500 and 1500 to DAC and the updating works perfectly.
The strange happens when I connect the power loop to measure mA: I stop seeing the transition of the DAC output from a voltage value to another if I pass to the DAC different values.

So, I monitored the DAC output with the power loop on and off.
When the power loop is OFF things work perfectly.
For example if I pass 500 to the DAC I measure 587mV at DAC output. When the power loop is ON, it adds a sort of Offset to the DAC outputs and no updates.

Do you have an explication for that?

My setup is the following:

Thank you in advance

Hi,
I am just continuing in my reverse engineering, it seems that everything is OK.
Do you think there is something is better to check on the board?

do you want to check the mA output or the DAC output?
you can read the DAC output by sending an i2c command( can be found in data sheet)

Thanks

Hi,
I have checked both:
DAC output from pin 1 and 2 of U5 and mA at the screw terminal.
If the XTR115 is not switched and the power loop is off I measure the expected value at DAC ouput. When I switch on the power loop and the XTR115, I can see that it adds an offset to the DAC output.
So, I asked an advice because I would like to know where it comes from. Am I doing something wrong?

Thanks

I will recommend checking this with TI( manufacture of XTR115).
set the dac value to 1000 and repeat the test and see if it does it again.

Thanks