0
\$\begingroup\$

for my home automation project i'm using 10 Sensirion SHT21 Temperature and Humidity devices, those devices are distant 30/50 meters away from my ESP32.

Those devices are driven using 5V and at both ends there is a PCA9306 level translator with EN pin wired to the respective GPIO (LINK HERE), so this solution gives to me the ability to use 5V over 3.3V on I2C side and go more meters away from my ESP32 using a simple cat.5E or 6 UTP cable.

So, on all 10 cables directed to the sensors there are: SCL-SDA-5V-GND.

Now, basically i want to "shut down" the sensor channels and avoid to leave 5V on all sensors (and wires) while they are not reading (the ESP32 polls them sequentially)...optimizing the power consuption that it's present on the wires.

I was thinking to use a PMBF170 mosfet (because i have a lot of them and the required current of the sensors and cables can be ok and far from the maximum 300mA drain current) in parallel of each GPIO (that send the EN signal to the respective PCA9306) and wire between VCC and DRAIN the VCC and GND cables directed to the sensors similar to the below image:

enter image description here

Is that a good idea? it can be feasible or it's completely useless?

\$\endgroup\$
  • \$\begingroup\$ That seems like a very long distance to send I2C... at 30m RS485 seems better suited. or possibly RS232. \$\endgroup\$ – Jasen Mar 6 at 20:47
  • \$\begingroup\$ Yes that's true! In this case the choice was to use the old classic I2C and for 30 meters using the PCA9306 i'm getting good results! \$\endgroup\$ – VirtApp Mar 6 at 20:49
  • \$\begingroup\$ is it one PCA9306 for each branch? \$\endgroup\$ – Jasen Mar 6 at 22:14
  • \$\begingroup\$ Yes a PCA9306 for each branch \$\endgroup\$ – VirtApp Mar 6 at 23:08
0
\$\begingroup\$

You may have some issues with the level translator chip if you turn off the 5V supply or try to use the EN pin. The VREF2 side is the only one that supports 5V, and the EN pin is referenced to that. Plus I don't see anything in the datasheet saying that you can run the VREF2 side at 0V.

It's possible that it will work, but you'll want to read the datasheet very carefully if you want to ensure that it will work reliably.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.