# transfer analog signal via RJ45 cable

I want to use a TMP36 temperature sensor, so I thought to transfer the signal through an RJ45 cable. (Is that equal to a cat5 cable? I just used an old ethernet cable)

When I use the sensor next to the MCU (an Arduino) with some common jumper wires, I read a value of about 25oC.

• 25oC equals to 25*10 + 500 = 750mV

When I use the sensor a few meters away from the MCU and transfer the signal with an RJ45 cable, I get readings as low as 3oC.

• 3oC equals to 3*10 + 500 = 530mV

I use an RJ45 cable (8 wires inside) about 1.8m (6ft) long with terminals like these: https://www.sparkfun.com/products/716

I wonder how a voltage drop of about 200mV occures in less than 2 meters of cable? On the same cable (different wires) I transfer the digital signal of a DS18B20 temperature sensor as well as the signal of a DHT humidity sensor, and both seem to work fine.

Is this voltage drop reasonable? If so why? In any case what kind of cable should I use in order to transfer a signal for just a few meters?

Any thoughts would be appreciated.

• Generally it's a bad idea to drag the analog measurement signal farther than several centimeters. Not only because of a voltage drop (that would be that significant, since the current is low), but because the wires are making a good noise-picking antenna. Consider adding some small interface board digitizing/amplifying the signal right near the sensor itself. – Eugene Sh. May 21 '15 at 19:33
• You are right about the noise-picking antenna. If not solved otherwise, I am thinking of using an ADC right next to the sensor, and transfer the digital signal instead, through the cable. – user3060854 May 21 '15 at 19:43
• Please please if you are thinking of digitising the signal at the sensor, just buy an all-digital sensor like the DS18B20. They work over 30 m of wire, are accurate to +/- 0.5 °C and have a 0.0625 °C resolution. In a TO-92 package! For under \$10!! No contest. – tomnexus May 22 '15 at 5:00
• What is the power draw of the sensor? What is the resistance of the wire (short one end, measure resistance at other end, halve the value)? – teambob May 22 '15 at 5:16
• RJ45 cables usually have 28AWG wires. According to the table, 28AWG has 0.21 Ω/m. To get a 220 mV drop across a 1.8 m wire, the current would have to be 0.58 A. Is such current plausible, @user3060854? – Nick Alexeev Aug 8 '15 at 22:56

A standard technique to deal with line losses and sensors is to use two pairs of wires for the sensors. One pair is used to carry the excitation or power to the sensor (and you don't care if there are line losses here), whereas a second paid of wires are used ONLY to measure the voltage across the sensor. Since these sense wires carry almost no current (AD converters usually have a high input impedance), there are no negligible line losses and you get a good measurement, even with 100's of metres of wire. Your RJ45 conector/cable has lots of conductors, so maybe you can make this work.

You do need to take care that you don't create a ground loop. The easiest way to do this is to measure the output voltage on the sense pair with a differential AD circuit.

• I don't create a ground loop? Could you be more specific? Thank you. – user3060854 May 21 '15 at 20:13

You need to put a capacitor across the TMP36 supply terminals and (preferably) a small series resistor such as 750$\Omega$.

There should be no such effect as you are seeing from a reasonable length of cable operating into a high-impedance ADC as your Arduino/ATMega should be.

• Now I am totally comfused. The capasitors seem to have a small effect (I used 3-4 of them, even a 10μF electrolytic). The great effect occured due to the resistance value. For 25oC room temperature, a 1kΩ resistance gives about 21oC readings. a 10kΩ gives about 28oC. How is this happening? – user3060854 May 21 '15 at 20:28
• You might need a capacitor on the Arduino input (at the board itself). It's possible to get crosstalk between analog inputs if the input resistance is large. You would not expect to see that if you are reading only one analog input. – Spehro Pefhany May 21 '15 at 20:41
• Do you mean a capacitor between the Arduino input and the Ground? – user3060854 May 21 '15 at 20:44
• Yes, that's where it should go. – Spehro Pefhany May 21 '15 at 20:46