Simple I2C level converter
Often we need to connect different modules and nodes with different supply voltages via I2C or SMBus. Therefore, so that your microcontroller or sensor does not fail, you need to perform the simplest level matching.
During prototyping, you will have to deal not only with the connection of the corresponding board, but also with its power supply. Therefore, we made our version of the converter suitable for installation on a breadboard. We also used standard 0805 enclosures, which are more convenient for manual assembly.
The scheme is based on four bi-directional channels for connection to the i2c bus, each of which is implemented on just three components.
The board can be easily expanded by adding additional paired segments. Although, in our opinion, two pairs are more than enough.
Above you can see the PCB trace for this device.
The popular N-channel transistors 2N7000, 2N7002 or NDS7002, which are cheaper and pin compatible with the FDV301N, are also suitable as a transistor.
How it works?
In the normal state, when the device on the lower side (LV 3.3 volts) voltage transmits a logic “1”, the field-effect transistor is off, and on the high voltage (HV) side there is 5 volts through the pull-up resistor R2.
When the device on the low voltage side transmits a logic zero, that is, pulls the pin to ground, then the MOSFET opens, and the voltage on the high voltage (HV) side also drops to 0 volts.
When the device on the high voltage (HV) side transmits a logic zero (0 V), the substrate parasitic diode begins to conduct current, pulling up the low voltage side to about 0.7 volts, this is also enough to open the transistor and finally set low on the low side voltage (LV 3.3 volts).
The same circuit will work with other open collector devices and interfaces.
What’s on Ali and Amazon?
The Chinese mass industry allows you to purchase many similar and, most importantly, ready-made boards. For almost every taste and wallet.
Why might this information be relevant? If such an adapter costs 40 cents on Ali, then Europeans buying on Amazon should already pay 2 euros. Because taxes, logistics and etc.
Therefore, in some cases, it is still advisable to assemble it yourself, or approximately know its device in order to implement it in your project.
Originally published at https://vk.com/hobbyelectronics.
This is our main Russian-language channel.