# Using multiple sensors on the same i2C circuit

It’s possible to control multiple pH probes with one single i2C ph circuit (like this https://www.atlas-scientific.com/product_pages/circuits/ezo_ph.html) ?

Rather than buying I2C circuit for each probe, I would like to know if it’s possible to use the same I2C pH circuit for several probes (figure). In this case, I’m aware that I need to temporally separate the samples. Is it possible to use octocouplers to switch on/off each probe?

• it depends on the probe – jsotola Oct 6 at 15:43
• I want to use generic lowcost probes with BNC connector – Laurent Oct 6 at 19:06
• you could try using something like a 74HC4067 mux ... success would have to be determined experimentally – jsotola Oct 6 at 20:17
• I will try the 74HC4067 mux and I will keep you informed of the results – Laurent Oct 7 at 20:00

You can set a different I2C address for each of these devices by sending an i2c,<n> command where <n> is the address. After that you can address each device on the same bus.

You can probably send this command using I2C, but you need to use the current I2C address of the device.

I guess that all the probes are more or less at the same potential and that there is no need for more isolation than you already have for one probe. If you do need more isolation, you can use an I2C isolator for each device, but you would need as many galvanically separated power sources (isolated DC-DC converter or other method).

Also see https://www.instructables.com/id/UART-AND-I2C-MODE-SWITCHING-FOR-ATLAS-SCIENTIFIC-E/ with more details about different methods.

After reading your comment I understand that you are not using the pH Probe that you mentionned as an example. You have to know that pH Probes are themselves very high impedance. Therefore if you want to switch from one probe to another, the probe signals already have to be pre-conditionned (amplified/buffered, etc) - and each probe would have its own electronics for that. One you have an analog signal coming from each probe, you can sum them in a typical OPAMP summing circuit. As you would switch only one probe on at a time, you would get only one of the values. However the circuit to switch probes on and of might be more costly than using an analog switch. An analog switch allows you to select the signal you are interested in to sample with your I2C circuit.

• PH probes don't have an I2C address. In this system, there is only one i2C circuit which is separate from the probe and therefore only one I2C address. I want to use the same I2C circuit with several pH probes. for that I would like to separate the samplings in time: In other terms, I would like to find a system that allows to "switch on" one probe at a time. the others will be in "switch off" position. I hope that it's clearer – Laurent Oct 6 at 15:12
• @Laurent Any I2C slave has an I2C address. Apparenty I miread your question. You are not using the EZO pH circuit. – le_top Oct 6 at 17:56
• I use EZO pH circuit well but not ezo pH probe. Generic pH probes don't have an i2c address just a BNC connector. – Laurent Oct 6 at 19:05
• Well, Atlas Scientific rightfully warns about how you make the connection between your EZO pH circuit and the probe (do not use extended leads to the BNC connector, do not use perfboards or protoboards, only use shielded cables, ...). You simply can't multiplex the raw pH-probe signals. That is, with extremely carefull tedious and in-depth expert design you might be able to, but any experienced company designing circuits for pH probes will not even try such an approach. – le_top Oct 6 at 23:15

pH probes typically have impedance in the 20M to 1G ohm range so your multiplexer would have to be extraordinarily low leakage depending on the probe and how much added error you can tolerate, and preferably galvanically isolated.

You could use tiny relays to do this (providing both isolation and low-leakage switching), controlled by an I2C expander chip with GPIOs and some relay drivers, but the PCB contamination would have to be very well controlled.

Maybe I missed it, but usually pH probes have temperature sensors for compensation, and they present a different problem, typically being relatively low resistance.

• Could a MAX329 or TMUX1108 multiplexer do the trick? – Laurent Oct 7 at 19:39
• Maybe. The leakage is probably okay at lower Ta especially, but the lack of isolation could cause issues. If it’s a very well controlled situation it might be worth a gamble. – Spehro Pefhany Oct 8 at 4:42