Codey OnlineArduino & ESP32 component library › Logic Level Shifter 8-channel
Logic Level Shifter 8-channel
Communication

Logic Level Shifter 8-channel

Logic Level Shifter 8-channel to convert 3.3V logic to 5V logic bi-directional

Protocols: I2C, SPI Width: 28.7 mm

Pinout — Logic Level Shifter 8-channel

Pin Signal Description
HV1 digital High-voltage side of channel 1 — connect to the 5V device line
HV2 digital High-voltage side of channel 2 — connect to the 5V device line
HV3 digital High-voltage side of channel 3 — connect to the 5V device line
HV4 digital High-voltage side of channel 4 — connect to the 5V device line
HV power-high High-voltage supply rail for the 5V side of the shifter
GND ground Common ground reference shared by both logic domains
HV5 digital High-voltage side of channel 5 — connect to the 5V device line
HV6 digital High-voltage side of channel 6 — connect to the 5V device line
HV7 digital High-voltage side of channel 7 — connect to the 5V device line
HV8 digital High-voltage side of channel 8 — connect to the 5V device line
LV1 digital Low-voltage side of channel 1 — connect to the 3.3V MCU line
LV2 digital Low-voltage side of channel 2 — connect to the 3.3V MCU line
LV3 digital Low-voltage side of channel 3 — connect to the 3.3V MCU line
LV4 digital Low-voltage side of channel 4 — connect to the 3.3V MCU line
LV power-low Low-voltage supply rail for the 3.3V side of the shifter
GND.1 ground Common ground reference shared by both logic domains
LV5 digital Low-voltage side of channel 5 — connect to the 3.3V MCU line
LV6 digital Low-voltage side of channel 6 — connect to the 3.3V MCU line
LV7 digital Low-voltage side of channel 7 — connect to the 3.3V MCU line
LV8 digital Low-voltage side of channel 8 — connect to the 3.3V MCU line

Example wiring diagram — Logic Level Shifter 8-channel

From To Wire
board:5V x1:HV red
board:3.3V x1:LV darkorange
board:GND x1:GND black
board:GND.1 x1:GND.1 black
board:A4 x1:LV1 green
board:A5 x1:LV2 blue
board:D4 x1:HV1 yellow
board:D5 x1:HV2 purple

Example Arduino code — Logic Level Shifter 8-channel

This example was written and compile-checked for the arduino-uno. Codey Online adapts it to any other supported board for you.

// Canonical beginner example for an 8-channel logic level shifter
// This sketch demonstrates two shifted digital channels:
// - A4/A5 on the Arduino Uno side (3.3V logic domain via LV1/LV2)
// - D4/D5 on the 5V side (via HV1/HV2)

const int LV_PIN_1 = A4;
const int LV_PIN_2 = A5;
const int HV_PIN_1 = 4;
const int HV_PIN_2 = 5;

void setup() {
  pinMode(LV_PIN_1, OUTPUT);
  pinMode(LV_PIN_2, OUTPUT);
  pinMode(HV_PIN_1, OUTPUT);
  pinMode(HV_PIN_2, OUTPUT);

  Serial.begin(9600);
  while (!Serial) {
    ;
  }

  Serial.println("8-channel logic level shifter demo");
  Serial.println("Toggling two channels on both sides of the shifter.");
}

void loop() {
  // Step 1: set all lines LOW
  digitalWrite(LV_PIN_1, LOW);
  digitalWrite(LV_PIN_2, LOW);
  digitalWrite(HV_PIN_1, LOW);
  digitalWrite(HV_PIN_2, LOW);
  Serial.println("All channels LOW");
  delay(1000);

  // Step 2: set channel 1 HIGH
  digitalWrite(LV_PIN_1, HIGH);
  digitalWrite(HV_PIN_1, HIGH);
  Serial.println("Channel 1 HIGH: A4 <-> D4");
  delay(1000);

  // Step 3: set channel 2 HIGH
  digitalWrite(LV_PIN_2, HIGH);
  digitalWrite(HV_PIN_2, HIGH);
  Serial.println("Channel 2 HIGH: A5 <-> D5");
  delay(1000);

  // Step 4: return everything LOW
  digitalWrite(LV_PIN_1, LOW);
  digitalWrite(LV_PIN_2, LOW);
  digitalWrite(HV_PIN_1, LOW);
  digitalWrite(HV_PIN_2, LOW);
  Serial.println("All channels LOW again");
  delay(1000);
}

Related components

Logic Level Shifter 4-channel

Logic Level Shifter 4-channel

MAX485 TTL to RS485 Converter Module

MAX485 TTL to RS485 Converter Module

Build your Arduino or ESP32 project with AI

Describe what you want to build. Codey Online writes the code, draws the wiring diagram, compiles it and flashes your board straight from the browser.

Start for free