I am designing a pcb which should receive various types of sensors. The microcontroller is an ESP32 and the external input are RJ11 linked to I2C GPIOs of the uC. I have already planned a LevelShifter (considering that the voltage of ESP32's GPIOs are limited to around 3.3v) so that the ESP32 can receive sensors with 5v outputs. The problem is that I want to use the same GPIOS connected to the output of the LevelShifter to take into account 3.3v sensors that could be could be connected to the RJ11 port. For this I thought of using jumpers to either connect the output of the RJ11 port (sensor) directly to the I2C GPIOs of the ESP32 if the sensor is a 3.3v type. On the other side the jumpers are to be placed so that the I2C GPIOs of the ESP32 are connected to the output of the Level Shifter. Here is what I tried below. I suppose if the sensor is 3.3v type I cannot connect it to the LevelShifter. Is this right ? Is there any risk that the floating pins will disturb the communication between uC and sensor through the chosen "way"? Do you have better solution to suggest me for this case? Sorry for my English.
\$\begingroup\$
\$\endgroup\$
2
-
\$\begingroup\$ ESP uses 3.3V doesn't it ? So use 3.3 everywhere ti.com/interface/i2c/general-purpose-ios-gpios/… Scale sensors with R's \$\endgroup\$– D.A.S.Commented Oct 18, 2020 at 15:55
-
\$\begingroup\$ connect both power supply voltages to the connector ... place the level shifter at any sensor that requires it ... no jumpers required \$\endgroup\$– jsotolaCommented Oct 18, 2020 at 18:42
Add a comment
|
1 Answer
\$\begingroup\$
\$\endgroup\$
2
So you want to connect either 3.3V sensors OR 5V sensors to the (one) RJ11 connector? In that case, for 3.3V sensor, I suppose you also want to provide 3.3V power instead of 5V power?
My solution would be to leave the level shifter in place, and (only) jumper the power at the RJ11 side between 3.3V and 5V.
-
\$\begingroup\$ The problem is that the output voltage could also be different (not only the supply voltage is attended to be different). \$\endgroup\$– Abdou SyCommented Oct 19, 2020 at 12:50
-
\$\begingroup\$ In that case switch the supply voltage and the secondary I2C voltage independently. \$\endgroup\$ Commented Oct 19, 2020 at 13:07