I have a GTD2000-Tx fixed gas sensor with an output of 4-20mA DC. How do I connect it directly to a raspberry pi 3? The power supply is 24 volts and is supplied externally.

  • Could you explain what you have tried so far? – joan Feb 17 at 8:50

Short answer is "you can't" as the 4-20mA current loop is an analogue signal and the Pi does not have any direct analogue inputs. You can, however, add a device called an Analogue to Digital Converter (ADC) to your Pi that will let you then take analogue measurements.

Typically you'd "drop" the current loop output of you sensor across a 100 or 120 Ohm resistor and measure the voltage generated (V=I×R) with the ADC.


simulate this circuit – Schematic created using CircuitLab

Sometimes the sensor you're using is "loop powered", in which case you'd need to supply voltage in to one end of the loop and measure the output on the return path using your small resistor.


simulate this circuit

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.