hannibal1986 Posted November 14, 2017 Posted November 14, 2017 I have the temperature sensor DS18B20 connected to port 20 of the gpio as w1, if I want to connect another sensor it is as easy as adding a w2 and its port in /boot/bin/orangepiplus2e.bin [w1_para] w1_used = 1 gpio = 20 [w2_para] w2_used = 1 gpio = 10 or [w1_para] w1_used = 1 gpio = 20 gpio = 10 So or something else? thanks
martinayotte Posted November 14, 2017 Posted November 14, 2017 OneWire support multiple sensors on a single bus, so, there is no needs to have a second bus, simply place sensors in parallel ...
hannibal1986 Posted November 16, 2017 Author Posted November 16, 2017 parallel? in the same gpio pin? thanks
martinayotte Posted November 17, 2017 Posted November 17, 2017 Yes ! OneWire is using UniqueID, so sensors won't answer to "discovery" function call at the same time, avoiding slave's answers collisions.
Blars Posted November 17, 2017 Posted November 17, 2017 Onewire does have limitations on bus capacitance and length. When using multiple sensors on one interface, it is best to not have stubs, wire to one sensor then the next rather than both from the pi. You are also more likely to need to power your sensors rather than have them just on the bus.
zador.blood.stained Posted November 18, 2017 Posted November 18, 2017 ...but the 3.4.x legacy kernel has a limitation - you won't be able to instantiate more than one 1-wire bus without patching and recompiling the kernel. Linear or star topology, not using parasite power, pull-up resistor value are details that would need to be adjusted for better reliability or even to make things work to start with. I would recommend reading this application note: https://www.maximintegrated.com/en/app-notes/index.mvp/id/148
Recommended Posts