D

DIY Electronics

— Building circuits, programming microcontrollers, and making things blink
49 members Created Jun 2026

ESP32 OTA firmware update over WiFi — complete walkthrough

DS18B20 Temperature Sensor on Long Runs

Running a DS18B20 on 100 meters of cable introduces challenges that don't exist on a breadboard. Here's what matters.

With parasitic power mode, long cable runs cause voltage droop on the bus during strong pull-up mode (the high-current pull-up needed for temperature conversion). Switch to external (three-wire) power mode for runs over 10m — pin 2 connected to VDD, not to GND. Twisted pair cable between the MCU and sensor helps cancel common-mode noise.

For very long runs, a 4.7kΩ pull-up at the sensor end (not the MCU end) keeps the line high without relying on the MCU to drive it against cable capacitance. Add a 100nF cap from VDD to GND at the sensor. With these precautions I've had reliable DS18B20 operation at 80m without shielded cable. For 100m+ or electrically noisy environments, consider switching to a 4-20mA current loop temperature transmitter instead.

0

No comments yet

Be the first to share your thoughts.

Report thread

Why are you reporting this thread?

Restore the redacted content?

This will make it visible to everyone again. The clear action is logged in the mod log.