Hello, In this video you will get idea about how to use 74HC245N as a logic level converter. It can be used for 3.3V to 5V conversion or 5V to 3.3V.



For example I have used here Ultrasonic Sensor (5V compatible) with Raspberry pi 3(3.3V compatible).

I have made this circuit using Fritzing.


Connections:
74HC245N Pin Direction B0 Direction A0
Pin 1 DIR Gnd
Pin 2 A0 Raspberry Pi 3_ pin-11 (GPIO17)
Pin 10 Gnd Gnd
Pin 18 B0 Echo of Ultrasonic sensor
Pin 19 OE Gnd
Pin 20 Vcc 3.3V


Now, in second case I have used L293D-dc motor driver (5V compatible) with Raspberry pi 3(3.3V compatible).


Connections:
74HC245N Pin Direction A0 Direction B0
Pin 1 DIR 5V
Pin 2 A0 Raspberry Pi 3_ pin15 (GPIO22)
Pin 3 A1 Raspberry Pi 3_ pin18 (GPIO24)
Pin 10 Gnd Gnd
Pin 17 B1 Motor Driver input-2 (pin-7)
Pin 18 B0 Motor Driver input-1 (pin-2)
Pin 19 OE Gnd
Pin 20 Vcc 5V


Datasheets for 74HC245N and L293D can be found here:

  1. 74HC245N.

  2. L293D.

If you have any questions feel free to ask.

Happy making :)