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.
The shield will be connected to the GND of the MCU side only.
- 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)
- If it works, is there any considerations I should make to make it better?
thank you for your time, and the knowledge.