hobbyist here, hope someone can guide me.
I'm using I2C (only have 4 wires{PWR, GND, SDA, SCL}) to communicate with two exterior Circuit (Circuit A, and Circuit B, both have MCUs), which can be swapped between two locations (lets call them, left and right).
I need to identify which Circuit is in what location. I initially thought of using a voltage divider to lower left 5V to 4.9V and using an ADC on MCU to identify.
However, i now see this will melt my voltage divider as Circuit B draws 1.5 Amps, while the Circuit A draws 150mA.
Im now thinking if i can purposely add a fluctuation to my 5V DC PWR line, about 4.9V (between 5V to 4.8V) which my ADC could identify.
Can this be done with an OP-Amp? and if so, can you suggest the circuit.
If not, any other suggestions?
Thanks
Best Answer
I'm assuming the following
Then there are several options, which revolve around adding a location pin to the location's connector. This pin can have a digital signal (low for Left, high for Right). Or, it could have an analog voltage set by a fixed voltage divider (the voltage would be distinct at each location).