KY-051 Voltage Translator / Level Shifter
From SensorKit X40 Wiki
Technical data / Short description
This level-shifter modulates the voltage of a digital signal into a higher or lower voltage. 4 channels are available which can be modulated.
There are many microcontroller-systems which are operating in different voltage ranges: older systems, like Arduino, are using 5V for their in/output pins and new systems, like Raspberry Pis, are using 3.3V. Back then, microcontrollers were needing higher voltages to communicate. Nowadays since the most problems with signal noise/ signal disruptions has been cleared, the voltage range is beeing kept as low as possible to decrease the heat and decrease the energy consumption. Systems with 1.8V are not unusual these days.
But to communicate between two different systems, like in our example (Arduino ----> Raspberry Pi), you have to shift the voltage range - if you don't, the systems with the lower voltage range will create more heat and could take constant damage.
The Pinout is printed on the module board.
The signal inputs/outputs A1-A4 also B1-B4 will be shifted to the needed voltage range (VCCa -> A1-A4 | VCCb -> B1-B4)
Arduino OUTPUT -> Digital [ON] = 5V @ B1 >>>>>>> 3.3V @ B2 -> Raspberry Pi INPUT
No additional software or code is needed that it works, The module works autonomously.
Please pay attention that VCCb has to be higher or equal to VCCa ( Example: VCCb=5V - VCCa=3,3V)
Example connection between Arduino and Raspberry Pi:
Connections Raspberry Pi:
|A2||=||GPIO03 / SCL||[Pin 05]|
|A3||=||GPIO02 / SDA||[Pin 01]|
Please take attention that both systems are connected with the same GND - you don't need to use OE with this module