LM35DZ temperature sensor and long wires
Moskog
Posts: 554
For a project·I need several temperature sensors to measure on different places a few feet away from the microcontroller. So I soldered each sensor to a 150 cm shielded stereo phono cable,·the shield on both wires connected together and then to ground and Vdd and Vout to the inner wires.
When testing this setup·I·get·what seems to be·a random number each time the BS read the ADC. (I·spent a whole night wondering what was wrong with my setup, testing·the connections on the breadboard, changed ADC, changed to different·sensors and tried different input-pins on the·BS. And checked the supply but found nothing wrong. )
Finally I·took another sensor, not soldered to any cable and placed it directly on the BOE. This time I've got a steady, correct·reading, not flashing against me with random numbers.
So, now I need some advice on this sensor and long cables.
Is it a bad idea using this kind of cable? Should I use twisted cables instead? Recommended max lenght of cable?
Any other good advices here?
Thanks,
KjellO
·
When testing this setup·I·get·what seems to be·a random number each time the BS read the ADC. (I·spent a whole night wondering what was wrong with my setup, testing·the connections on the breadboard, changed ADC, changed to different·sensors and tried different input-pins on the·BS. And checked the supply but found nothing wrong. )
Finally I·took another sensor, not soldered to any cable and placed it directly on the BOE. This time I've got a steady, correct·reading, not flashing against me with random numbers.
So, now I need some advice on this sensor and long cables.
Is it a bad idea using this kind of cable? Should I use twisted cables instead? Recommended max lenght of cable?
Any other good advices here?
Thanks,
KjellO
·
Comments
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
This is my setup today.
Jim
The main reason I used shielded phono-cable is·because this·was the only light-weight 3-wire cable I could find in the shead. But I think I can dig up some 3-pairs phone cable somewhere where I think each pair is twisted.·I'll see what I find and then give it a try!
I hooked up Vdd and Vout to one [noparse][[/noparse]twisted] pair and the Vss to another pair and the reading is now steady and with correct value.
I wonder why MikeK didn't face this problem but perhaps he used a different shielded cable than me, with different capasitive values.
Anyway, thanks to hover1 and the others responding to the thread, problem solved and another lesson learned!
KjellO
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Jim