KY-051 Voltage Translator / Level Shifter

From SensorKit X40 Wiki

Jump to: navigation, search

Picture

KY-0051.png

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.

Pinout

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)


Example:

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)


KY-0051 PinBelegung.png


Example connection between Arduino and Raspberry Pi:

Connections Arduino:

VCCb = [Pin 5V]
B1 = [Pin 03]
B2 = [Pin 04]
B3 = [Pin 05]
B4 = [Pin 06]
GND = [Pin GND]

Connections Raspberry Pi:

VCCa = 3,3V [Pin 01]
A1 = GPIO18 [Pin 12]
A2 = GPIO03 / SCL [Pin 05]
A3 = GPIO02 / SDA [Pin 01]
A4 = GPIO14 [Pin 08]
GND = GND [Pin 09]

Please take attention that both systems are connected with the same GND - you don't need to use OE with this module