0
\$\begingroup\$

I'm curious if this method of level shifting works fine or not; or it suits the design I manage to do.

I want to extend the cable length of both an I2C, and an I2C-like, low clocked communication sensor(SHTxx sensors). I've seen many articles and answers on this website, which most of them conclude on using PCA9xxx I2C bus buffers. the reason that I'm not considering them, is that the added cost and very low availability on my local stores, is not reasonable according to the required robustness.

These are the conditions:

  • A maximum of 8 meters of a cheap 4*AWG28 shielded cable for the sensor[s]. the supply voltage of the sensor is sent via one of the AWG28 threads. the exact specifications (e.g. the capacitance) are not available.
  • Communication speed is not concerned. any clock value would be fine.
  • It doesn't need to obtain an international standard. it just needs to be trusted to over 70% successful transactions.

I saw some simple, mosfet-based level shifters, which are used in cheap modules available. It is said they are fine for up to 2MHz of SPI, and 400KHz I2C communications. however, I don't know if they can be used like this or not.

Here is my Idea (based on above application note, and the aforementioned modules) to shift the voltage of the cable to a higher value (e.g. 9V or 12V considering the mosfets maximum tolerant drain-source voltage) and translate the signal levels to this value; perhaps the same way RS232 buffers do it, so the signal is more robust to noise. the sensors supply would be drawn from the same 12V supply line that the cable signals are pulled up to.

schematic

simulate this circuit – Schematic created using CircuitLab

The shield will be connected to the GND of the MCU side only.

  1. Does this design, do what I expect, according to the conditions mentioned above? or it's just a foolish try. (I'm not sure because despite the apparent simplicity, I have not seen any design like that)
  2. If it works, is there any considerations I should make to make it better?

thank you for your time, and the knowledge.

\$\endgroup\$
2
\$\begingroup\$

No, this setup does not improve noise immunity at all; in fact, quite the opposite. Unlike RS232 drivers and receivers, this kind of level shifter has no voltage or current gain.

Consider what happens when a device at either end wants to pull a line low. It must now do that through two transistors and a long wire, and it must sink the current of all three pullups. The low level at the other end of the wire can only be degraded by all of this, and that's before you consider any noise coupled into the cable.

Running the middle of the connection at a higher voltage has no benefit at all. The devices at either end only see the voltage of their local pullup.

\$\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.