Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Logic Level Conveter: Examples, Pinouts, and Specs

Image of Logic Level Conveter
Cirkit Designer LogoDesign with Logic Level Conveter in Cirkit Designer

Introduction

The Logic Level Converter (Manufacturer: SparkFun, Part ID: BOB-12009) is a compact and versatile device designed to enable safe and effective communication between circuits operating at different voltage levels. It is commonly used to interface 3.3V and 5V systems, ensuring compatibility and protecting components from potential damage caused by mismatched voltage levels.

Explore Projects Built with Logic Level Conveter

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32 and Logic Level Converter-Based Wi-Fi Controlled Interface
Image of Toshiba AC ESP32 devkit v1: A project utilizing Logic Level Conveter in a practical application
This circuit features an ESP32 Devkit V1 microcontroller connected to a Bi-Directional Logic Level Converter, which facilitates voltage level shifting between the ESP32 and external components. The ESP32 is powered through its VIN pin via an alligator clip cable, and the logic level converter is connected to various pins on the ESP32 to manage different voltage levels for communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Wi-Fi Controlled Device Interface with Wemos D1 Mini and Logic Level Converter
Image of Toshiba AC D1 mini: A project utilizing Logic Level Conveter in a practical application
This circuit features a Wemos D1 Mini microcontroller interfaced with a Bi-Directional Logic Level Converter to facilitate communication with a 5V RX/TX module. The level converter ensures proper voltage translation between the 3.3V logic of the Wemos D1 Mini and the 5V logic of the RX/TX module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino and ESP32 Wi-Fi Controlled Communication Interface
Image of connect: A project utilizing Logic Level Conveter in a practical application
This circuit interfaces an Arduino UNO with an ESP32 using a Bi-Directional Logic Level Converter to manage voltage differences. The Arduino and ESP32 communicate via serial connections, with the converter ensuring proper voltage levels between the 5V Arduino and 3.3V ESP32.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 4B and mlx90614 Infrared Thermometer with Logic Level Conversion
Image of thermal Sensor: A project utilizing Logic Level Conveter in a practical application
This circuit connects a Raspberry Pi 4B to an MLX90614 infrared temperature sensor using an Adafruit 4-channel I2C-safe Bi-directional Logic Level Converter. The level converter is used to safely step down the 5V I2C signals from the Raspberry Pi to the 3.3V needed by the MLX90614 sensor, ensuring compatibility between the devices. Ground connections are shared among all components, and the sensor is powered by the Raspberry Pi's 5V supply through the level converter.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Logic Level Conveter

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Toshiba AC ESP32 devkit v1: A project utilizing Logic Level Conveter in a practical application
ESP32 and Logic Level Converter-Based Wi-Fi Controlled Interface
This circuit features an ESP32 Devkit V1 microcontroller connected to a Bi-Directional Logic Level Converter, which facilitates voltage level shifting between the ESP32 and external components. The ESP32 is powered through its VIN pin via an alligator clip cable, and the logic level converter is connected to various pins on the ESP32 to manage different voltage levels for communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Toshiba AC D1 mini: A project utilizing Logic Level Conveter in a practical application
Wi-Fi Controlled Device Interface with Wemos D1 Mini and Logic Level Converter
This circuit features a Wemos D1 Mini microcontroller interfaced with a Bi-Directional Logic Level Converter to facilitate communication with a 5V RX/TX module. The level converter ensures proper voltage translation between the 3.3V logic of the Wemos D1 Mini and the 5V logic of the RX/TX module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of connect: A project utilizing Logic Level Conveter in a practical application
Arduino and ESP32 Wi-Fi Controlled Communication Interface
This circuit interfaces an Arduino UNO with an ESP32 using a Bi-Directional Logic Level Converter to manage voltage differences. The Arduino and ESP32 communicate via serial connections, with the converter ensuring proper voltage levels between the 5V Arduino and 3.3V ESP32.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of thermal Sensor: A project utilizing Logic Level Conveter in a practical application
Raspberry Pi 4B and mlx90614 Infrared Thermometer with Logic Level Conversion
This circuit connects a Raspberry Pi 4B to an MLX90614 infrared temperature sensor using an Adafruit 4-channel I2C-safe Bi-directional Logic Level Converter. The level converter is used to safely step down the 5V I2C signals from the Raspberry Pi to the 3.3V needed by the MLX90614 sensor, ensuring compatibility between the devices. Ground connections are shared among all components, and the sensor is powered by the Raspberry Pi's 5V supply through the level converter.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Interfacing 3.3V microcontrollers (e.g., ESP32, Raspberry Pi) with 5V peripherals (e.g., sensors, displays).
  • Bridging communication between 5V Arduino boards and 3.3V devices.
  • Safeguarding circuits from voltage mismatches in mixed-voltage environments.
  • Bidirectional communication in I2C, UART, and SPI protocols.

Technical Specifications

The SparkFun Logic Level Converter (BOB-12009) is a bidirectional device capable of converting voltage levels in both directions. Below are its key technical details:

Key Technical Details

  • Voltage Range (High Side): 3.3V to 5V
  • Voltage Range (Low Side): 1.8V to 3.3V
  • Maximum Current per Channel: 50mA
  • Number of Channels: 4 bidirectional channels
  • Dimensions: 19.3mm x 15.2mm
  • Operating Temperature Range: -40°C to 85°C

Pin Configuration and Descriptions

The Logic Level Converter has 6 pins, as described in the table below:

Pin Name Description
HV High voltage input (connect to the higher voltage, e.g., 5V).
LV Low voltage input (connect to the lower voltage, e.g., 3.3V).
GND Ground (common ground for both high and low voltage systems).
TXI High-side input for bidirectional communication (e.g., 5V signal input).
TXO Low-side output for bidirectional communication (e.g., 3.3V signal output).
RXI/RXO Bidirectional channel for data transfer (can be used for I2C, UART, or SPI).

Usage Instructions

How to Use the Logic Level Converter in a Circuit

  1. Connect Power Supply:

    • Connect the HV pin to the higher voltage source (e.g., 5V).
    • Connect the LV pin to the lower voltage source (e.g., 3.3V).
    • Connect the GND pin to the common ground of both systems.
  2. Connect Data Lines:

    • For each channel, connect the high-voltage signal to the TXI pin and the corresponding low-voltage signal to the TXO pin.
    • For bidirectional communication (e.g., I2C), use the RXI/RXO pins.
  3. Verify Connections:

    • Ensure that the voltage levels match the specifications of the devices being interfaced.
    • Double-check all connections to avoid short circuits or incorrect wiring.

Important Considerations and Best Practices

  • Power Supply Matching: Ensure that the HV and LV pins are connected to the correct voltage levels. Reversing these connections can damage the converter or connected devices.
  • Current Limitations: Do not exceed the maximum current rating of 50mA per channel.
  • Pull-Up Resistors for I2C: If using the converter for I2C communication, ensure that appropriate pull-up resistors are present on both the high and low sides.
  • Signal Integrity: Keep wires short to minimize noise and signal degradation, especially for high-speed communication protocols.

Example: Connecting to an Arduino UNO

Below is an example of using the Logic Level Converter to interface a 3.3V sensor with a 5V Arduino UNO:

Circuit Connections

  • HV: Connect to the Arduino's 5V pin.
  • LV: Connect to the sensor's 3.3V pin.
  • GND: Connect to the common ground of the Arduino and sensor.
  • TXI/TXO: Connect the sensor's data line to the TXO pin and the Arduino's data line to the TXI pin.

Arduino Code Example

// Example: Reading data from a 3.3V sensor using a 5V Arduino UNO
// Ensure the Logic Level Converter is properly connected as described above.

#include <Wire.h> // Include Wire library for I2C communication

void setup() {
  Wire.begin(); // Initialize I2C communication
  Serial.begin(9600); // Start serial communication for debugging
  Serial.println("Starting communication with 3.3V sensor...");
}

void loop() {
  Wire.beginTransmission(0x40); // Replace 0x40 with the sensor's I2C address
  Wire.write(0x00); // Replace with the sensor's register or command
  Wire.endTransmission();

  Wire.requestFrom(0x40, 2); // Request 2 bytes of data from the sensor
  if (Wire.available() == 2) {
    int data = Wire.read() << 8 | Wire.read(); // Combine two bytes into one value
    Serial.print("Sensor Data: ");
    Serial.println(data);
  } else {
    Serial.println("Failed to read data from sensor.");
  }

  delay(1000); // Wait 1 second before the next read
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Communication Between Devices:

    • Cause: Incorrect wiring or mismatched voltage levels.
    • Solution: Double-check all connections and ensure the HV and LV pins are connected to the correct voltage sources.
  2. Signal Degradation or Noise:

    • Cause: Long wires or high-speed communication.
    • Solution: Use shorter wires and ensure proper grounding. Add decoupling capacitors if necessary.
  3. Overheating or Damage:

    • Cause: Exceeding the current rating or incorrect power supply connections.
    • Solution: Verify that the current does not exceed 50mA per channel and that the HV and LV pins are correctly connected.

FAQs

Q: Can I use the Logic Level Converter for SPI communication?
A: Yes, the Logic Level Converter supports SPI communication. Connect the MOSI, MISO, and SCK lines to separate channels on the converter.

Q: Do I need external pull-up resistors for I2C?
A: Yes, pull-up resistors are required for I2C communication. Ensure they are present on both the high and low voltage sides.

Q: Can I use this converter for 1.8V to 5V communication?
A: Yes, the converter supports voltage levels as low as 1.8V on the low side and up to 5V on the high side.

By following this documentation, you can safely and effectively use the SparkFun Logic Level Converter (BOB-12009) in your projects.