Problem DS18b20 with very long cable.

You CAN....

Connect 3 DS18B20s to an Arduino by using three pins, and a ground connection.

You SHOULD... if not terribly difficult... use non-parasitic powering for the system....


However... if you don't mind working (much) harder on the software side, put 3 (or more) DS18B20s on a single pin of the Arduino. This means just 3 wires, instead of 5....

1-Wire data
Power
Ground

You then get into the 1-Wire techniques of chip addressing. The three devices remain "quiet" until you send a "tell me the temperature" command out on the 1-Wire data line... but you have to say WHICH chip you are sending that command to.

The simpler technique, using 5 wires....

Power
Ground
and a separate 1-Wire data wire to each chip

... works in a similar way, but as there is only one temperature sensor on each data wire, you can skip the addressing part.

(Much) more on 1-Wire at...