How to use multi 1-Wire sensor

Hello

I would like to have an advise regarding the use of 4 Ds18B20 1-Wire sensor.

I am used to use one DS20B19 as the following

1-Wiew
GND. => GND
3V3. => D13 (to power when needed)
READ => A0

The measure is read from A0 with a 4K pull-up reistor on A0

Now I would like to use 4 DS20B18 sensor.

I unerstand, I can have all 3V3 wires together, as for the GND and the READ wire. So in other words, the read wire can be read from the same bus.

However, I prepare my PCB to have

  • One 3 pin JST connector connected to A0 with 4.7K pull-up resistor
  • One 3 pin JST connector connected to A1 with 4.7K pull-up resistor
  • One 3 pin JST connector connected to A2 with 4.7K pull-up resistor
  • One 3 pin JST connector connected to A3 with 4.7K pull-up resistor

I added a jumper before the 4.7K resistors, to disconnect its if I want to use an analog sensor with JST_0, JST_1, JST_2 or JST_3.

Otherwise I keep connected the pull-up resistors, and I would like to connect my 1-Wire sensor as the following

Sensor1
3V => D13
GND => GND
RAED => A0

Sensor2
3V => D13
GND => GND
RAED => A1

Sensor3
3V => D13
GND => GND
RAED => A2

Sensor4
3V => D13
GND => GND
RAED => A3

I beleive, it will work?

If a 1-wire sensor can be read on A0, a second can be rad on A1, and so on, isn't?

Thanks for the interresting link, but I am aware about that way to connect the 4 sensors.

I was wondering, if i can connect one sensors to one analog pin as well.

For exemple,
the first DS18B20 is read from A0
The second is read from A1
the third is read from A2
and the last is read from A3.

I beleive that wouls work, but as I never tried (and I can not right now), I wonder if some one as a experience, working in that way

Cheers

Yes it will work. The only requirement is good power, a digital pin, and proper timing for each DS18B20

Hello
Thank for reply. What do you mean by a good power.
i usualy power it by a pin of the ATSAMD21 and it work fine.
As I understand, the active current is max 1.5mA.
So a pin is enough to power 4 of them, isn't?