I have a DHT11 sensor unit (inbuilt pull up resistor) for humidity and temperature which was working well when plugged into my breadboard. I am now using an approx 1.5m cable and getting wildly incorrect results. I have checked the cable and there appears to be strong connection and no crossover between wires. Any ideas what may be causing this?
Results
I suspect that the 24 degrees and 63% humidity is accurate.
Temp=24.0C Humidity=63.0%
Temp=24.0C Humidity=63.0%
Temp=12.0C Humidity=159.0%
Temp=12.0C Humidity=159.0%
Temp=24.0C Humidity=63.0%
Temp=12.0C Humidity=159.0%
Temp=24.0C Humidity=63.0%
Temp=12.0C Humidity=159.0%
Temp=24.0C Humidity=63.0%
Temp=12.0C Humidity=159.0%
Temp=12.0C Humidity=159.0%
Temp=12.0C Humidity=159.0%
Temp=24.0C Humidity=63.0%
Temp=12.0C Humidity=159.0%
Temp=12.0C Humidity=159.0%
Temp=12.0C Humidity=159.0%
Temp=24.0C Humidity=63.0%
Temp=24.0C Humidity=63.0%
Temp=12.0C Humidity=159.0%
Temp=12.0C Humidity=159.0% <--Took the sensor out of greenhouse, so expect a lowering of humidity (which does happen)
Temp=24.0C Humidity=60.0%
Temp=12.0C Humidity=155.0%
Temp=11.0C Humidity=156.0%
Temp=22.0C Humidity=58.0%
Temp=11.0C Humidity=157.0%
Temp=21.0C Humidity=59.0%
Temp=21.0*C Humidity=59.0%
I have no idea why a longer cable would make this impact (have tested two cables now) given that 20m should be acceptable based on the product specs. I am using 4 core security camera cable (only using 3 of the cores though), so not sure if the twist (or lack of twist) within a cable could make an impact like the twisted pairs in cat6 etc.
Note: The sensor is connected to an RPi, but I have tested two different python libraries and getting similar errors, so feel the issue is with the sensor/cable and not the processing unit.