Take as example a DS18B20 Digital temperature sensor and the way one sensor can be connected to each other.
I am interested on using this design for an application where I have multiple modules connected to each other by two pins (parasitic power, ground) having the last device on the line connected to arduino. (Connections are less than 5 cm length).
Each device would have four ways to connect to each other via four different sockets (s1 ... s4), aways using up to 2 pins.
deviceA deviceB deviceC
arduino pin 2 ------ (s1), (s2), s3, s4 ---- s1, (s2), s3, (s4) ---- s1, (s2), s3, s4
ground ------ gnd ---- gnd ---- gnd
Arduino (only) needs to be aware of how devices were connected to each other and avoid ambiguity.
Furthermore, there will be cases where a device could be connected to three devices, creating branches:
deviceA deviceB deviceC
arduino pin 2 ------ (s1), (s2), s3, s4 ---- s1, (s2), s3, (s4) ---- s1, (s2), s3, s4
ground ------ gnd ---- gnd ---- gnd
||
deviceD
(s1), s2, s3, s4
gnd
also a looping case:
deviceA deviceB
arduino pin 2 ------ (s1), (s2), (s3), s4 ---- s1, (s2), s3, (s4)
ground ------ gnd ---- gnd
|| ||
deviceC deviceD
(s1), s2, s3, (s4) ---- (s1), (s2), s3, s4
gnd ---- gnd
I was reading about this IC, but not sure if I can implement on this project (Read ROM seems not to recommended for this design, maybe Search ROM?) . Even if I could use these ICs on each device socket, I could maybe end up with a list of PRESENT sockets but I am thinking how to associate them to represent the map of connections. I would have to previously map all ICs and that would also be a limitation.
Is there any feasible solution? if I could add one more wire to the design, maybe using attiny as slave on each device to read voltage on its sockets and yet use that socket pin for powering and communicate with master?