Often, it becomes necessary to interface an existing or new 5V AVR / PIC / MCU project to new devices that use 3.3V logic, like memory cards, sim cards, etc. Described here is a circuit that converts +5V to +3.3V logic or +3.3V to +5V logic. This compact circuit makes it perfect for embedded systems that need to interface with different logic levels. The design is based on 74LCX 245 IC, which is a low voltage bidirectional transceiver with 5V tolerant inputs and outputs, from Fairchild.
The 74LCX245 IC contains eight non-inverting bidirectional buffers with 3-STATE outputs and is intended for bus oriented applications. The device is designed for low voltage (2.5V and 3.3V) VCC applications with capability of interfacing to a 5V signal environment. 74LCX245 IC is fabricated with an advanced CMOS technology to achieve high speed operation while maintaining CMOS low power dissipation.
The presented circuit features improvements that set it apart from other published logic level converter circuits. The improvements include on-board +3.3 low-drop voltage regulator, direction selection jumpers, easy-to-use input/output terminals and power on indicator LED. The circuit can be easily interfaced via standard jumper wires. The whole circuit can be fabricated on a small piece of prototyping board, with the help of an SOIC/SOP/SSOP – to – DIP adapter. Or you can prepare your own SMD printed circuit board for the construction task. In order to configure the circuit as +5V input and +3.3V output, the jumper (JP1) must be set to position A -> B. For configuring the circuit as +3.3V input and +5V output, the jumper (JP1) must be set to position B -> A. The onboard +3.3V can be used to supply power to the connected +3.3V device(s).
Logic Level Converter Features
IC1 is configured to enable output (OE pin -pin 19 of IC1- pulled down), and the default direction is A -> B (DIR pin -pin 1 of IC1- pulled up by jumper JP1). You can manage the OE and DIR signals by applying the desired logic value to these signals.
Lab Note: Prototype was tested with 74LCX245 IC in ‘Thin Shrink Small Outline Package’ (TSSOP). The prototype on the common circuit board was built with the help of a 20-pin TSSOP to DIP adapter.
MOSFET I2C Level Converter Circuit
The above circuit is built with the BSS138 MOSFETs and can be used when you need only the an I2C level converter from 5V to 3.3V or from 3.3V to 5V.