Activity › Forums › Questions & Troubleshooting › 24V 4-20mA industrial temp sensor, how to connect/read?
-
24V 4-20mA industrial temp sensor, how to connect/read?
-
Apologies, not sure where these “font” HTML codes came from, I didn’t put them there…
-
To be complete, this is the code I use:
/*
ReadAnalogVoltage
Reads an analog input on pin 0, converts it to voltage, and prints the result to the Serial Monitor.
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/ReadAnalogVoltage
*/
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
}
-
-
Did you take into account (see datasheet of sensor):
Minimum Sensor Voltage
8 V DC (all other models)Therefore you’d be better off if you’d be using a MAXI Automation (0-10V input) and a 500 Ohm resistor.
-
This reply was modified 4 years ago by
Friedl. Reason: typo fixed
-
Hi Friedl,
Thank you for your reply.
I must admit that I did see minimum supply voltage @8v for the sensor. I ignored that for convenience sake. Because the readings did change with the temperature I asumed the sensor still worked, furthermore @100C the voltage would have been well over 8v, but the reading did not change significantly.
That being said, you might be right this is an issue. I do however not see how using the Maxi Automation in 0-10v with 500ohm resistor would help my situation, am I missing something?
The more I think about it I start to see this sensor simply isn’t suited for 4-20mA to 0-10v conversion. Because of it’s two wire construction, the power supply and signal share the same wires.
Perhaps I should try again with a 3 wire sensor, where power and signal are separated.
-
You need to give the sensor “space to breath” (=enough voltage left), otherwise it just won’t work.
If you take this setup (from the product page):
https://www.calex.co.uk/site/wp-content/uploads/2020/01/pyromini-oem-connections-4-20-ma-1024×411.png
and add the 500 Ohm resistor across the +/- of the instrument shown in the picture, which would then be your Controllino, we can conclude:- 0,020 A * 500 Ohm = 10V
- 0,004 A * 500 Ohm = 2V
- 24V – 10V = 14V > 8V ! (24V power supply assumed)
And BTW (see datasheet):
Max. Loop Impedance
900 Ω (4-20 mA output)Put aside your Controllino, only leave the resistor, take a digital multimeter and verify your setup first. When you know what voltages are to be measured, verifying what you measure with the ADC is much easier.
-
This reply was modified 4 years ago by
Friedl. Reason: Stray DIV tags from the editor again. (PLEASE FIX THIS)
-
When you successfully verified the sensors output voltage, you can even
replace the sensor and the resistor with a lab power supply. This makes verifying your code much easier.
-
-
This reply was modified 4 years ago by
-
Log in to reply.