목차 보기
  1. 왜 문제가 되는가
  2. 입력 문턱 전압 확인
  3. 방법 1: 저항 분압 (5V → 3.3V, 단방향)
  4. 방법 2: 직접 연결 (3.3V → 5V)
  5. 방법 3: 레벨 시프터 모듈과 IC
  6. I2C에서의 주의점
  7. 전원 전압 자체를 맞추기
  8. 흔한 손상 사례
  9. 선택 요약
  10. 정리
Table of contents
  1. Why it is a problem
  2. Checking the input threshold voltage
  3. Method 1: Resistor divider (5 V → 3.3 V, one direction)
  4. Method 2: Direct connection (3.3 V → 5 V)
  5. Method 3: Level-shifter modules and ICs
  6. Cautions with I2C
  7. Matching the supply voltage itself
  8. Common damage cases
  9. Selection summary
  10. Summary

최근 마이크로컨트롤러와 센서는 3.3V로 동작하는 것이 늘었지만, 오래된 로직 IC와 많은 모듈은 여전히 5V를 씁니다. 두 세계를 연결할 때 전압이 맞지 않으면 신호를 인식하지 못하거나 최악의 경우 칩이 망가집니다. 이 글에서는 3.3V와 5V 신호를 안전하게 연결하는 방법(저항 분압, 직접 연결 조건, 레벨 시프터 모듈, MOSFET 방식)과 쓸 곳, 흔한 손상 사례를 정리합니다.

왜 문제가 되는가

  • 5V 신호 → 3.3V 입력: 많은 3.3V 칩의 입력은 5V를 견디지 못합니다. 입력 보호 다이오드로 전류가 흘러 핀이나 칩이 손상됩니다.
  • 3.3V 신호 → 5V 입력: 5V 칩이 3.3V를 High로 인식하는지가 문제입니다. 인식하지 못하면 신호가 전달되지 않습니다.

입력 문턱 전압 확인

디지털 입력은 High로 인식하는 최소 전압(VIH)이 정해져 있습니다.

부품5V 전원일 때 High로 읽는 최소 전압(대략)3.3V 신호를 받을 수 있나
74LS(TTL)2.0V가능
74HCT2.0V가능
74HC약 3.5V (전원의 70%)불가
AVR(아두이노 우노)약 3.0V (전원의 60%)가능하지만 여유가 적음

3.3V 출력이 5V 입력에 닿는지 확실하지 않다면 데이터시트의 VIH를 확인하세요(데이터시트 읽는 법).

방법 1: 저항 분압 (5V → 3.3V, 단방향)

신호가 5V 쪽에서 3.3V 쪽으로만 흐를 때 가장 간단한 방법입니다. 저항 두 개로 분압합니다(분압 회로 설계와 부하 효과).

  • R1(위, 신호 쪽) = 1kΩ, R2(아래, GND 쪽) = 2kΩ이면 5V가 5 × 2 / 3 ≈ 3.33V가 됩니다.
  • 또는 2.2kΩ과 3.3kΩ으로 약 3.0V를 만들 수 있습니다.
장점단점
부품 두 개로 간단한 방향만 가능, 빠른 신호에서는 파형이 둔해짐(저항과 입력 용량의 RC)
비용이 거의 없음입력 임피던스가 낮은 곳에서는 전압 하락(분압 계산기)

예: 초음파 센서(HC-SR04)의 5V 에코 신호를 ESP32의 입력에 연결할 때 널리 쓰입니다.

방법 2: 직접 연결 (3.3V → 5V)

5V 부품의 VIH가 3.3V보다 낮다면(74LS, 74HCT, 일부 마이크로컨트롤러) 3.3V 출력을 5V 입력에 직접 연결해도 됩니다. 단 전원이 서로 다른 장치이므로 접지는 반드시 공유하세요. 5V 출력이 3.3V 입력으로 가는 방향은 직접 연결이 불가능합니다.

방법 3: 레벨 시프터 모듈과 IC

양방향 통신(I2C 등)이나 여러 신호에는 전용 부품을 쓰는 것이 안전합니다.

방식특징용도
N채널 MOSFET 양방향(BSS138 등) 모듈게이트를 3.3V에, 소스를 3.3V 쪽에, 드레인을 5V 쪽에 연결하고 양쪽에 풀업. 양방향I2C, 일반 신호
단방향 버퍼 IC(74AHCT125 등)3.3V를 5V 로직 레벨로 올려 줌3.3V → 5V 신호(LED 스트립 등)
버스 트랜시버(74LVC245 등)양쪽 전원 지원, 다채널병렬 버스
자동 방향 시프터 IC(TXB0108 등)방향을 자동으로 감지. 풀업이 강한 선에는 부적합일반 디지털 신호

모듈형 4채널 레벨 시프터는 저렴해서 입문자가 많이 씁니다. 연결은 보통 LV(3.3V), HV(5V), GND, 각 채널의 LVx와 HVx입니다.

I2C에서의 주의점

I2C는 양방향 오픈 드레인 방식이라 저항 분압이 맞지 않습니다. 3.3V와 5V 장치를 섞을 때는 MOSFET 방식 레벨 시프터를 쓰고 양쪽에 풀업 저항을 둡니다(I2C 배선 기초). 이미 풀업이 달린 모듈이 5V에 풀업되어 있으면 3.3V 장치가 위험해지니 모듈의 회로를 확인하세요.

전원 전압 자체를 맞추기

  • 3.3V 부품에 5V를 직접 공급하면 안 됩니다. 5V에서 3.3V를 만들려면 LDO 레귤레이터(AMS1117-3.3, AP2112 등)를 씁니다. 필요한 전류와 입출력 전압 차이에 따른 발열을 확인하세요(9V 배터리로 5V 만들기와 같은 원리).
  • 보드에 3.3V 핀이 있다면 소량의 3.3V 부품은 그 핀에서 전원을 받을 수 있습니다(전류 한도 확인).

흔한 손상 사례

사례원인
ESP32 입력 핀이 불량5V 신호를 직접 연결
센서가 신호를 인식하지 못함3.3V High가 5V 칩의 VIH에 못 미침
I2C 통신이 간헐적으로 실패풀업 전원 전압이 다르거나 풀업 저항이 지나치게 큼
보드가 뜨겁고 불안정5V를 3.3V 핀에 연결
한쪽 장치가 이유 없이 리셋접지가 서로 공유되지 않음

선택 요약

상황방법
5V 센서의 단방향 출력 → 3.3V 입력저항 분압(1kΩ + 2kΩ)
3.3V 출력 → 74LS·74HCT·AVR 입력직접 연결(접지 공유)
3.3V 출력 → 74HC(5V) 입력74HCT 또는 레벨 시프터
I2C, 양방향 신호MOSFET 레벨 시프터 모듈
많은 채널시프터 IC

정리

3.3V 입력에는 절대 5V를 직접 연결하지 말고, 5V → 3.3V는 저항 분압이나 시프터로, 3.3V → 5V는 5V 쪽 VIH를 확인해 필요하면 시프터를 쓰세요. I2C 같은 양방향 선에는 MOSFET 방식 시프터가 필요합니다. 어떤 보드를 쓰는지 정하는 데는 아두이노 우노·ESP32·라즈베리파이 피코 비교가 도움이 됩니다.

Recently more microcontrollers and sensors run at 3.3 V, but older logic ICs and many modules still use 5 V. When you connect the two worlds and the voltages do not match, the signal is not recognized, or in the worst case the chip is destroyed. This article covers ways to safely connect 3.3 V and 5 V signals (resistor dividers, conditions for direct connection, level-shifter modules, and the MOSFET approach), where to use each, and common damage cases.

Why it is a problem

  • 5 V signal → 3.3 V input: the inputs of many 3.3 V chips cannot tolerate 5 V. Current flows through the input protection diode and damages the pin or chip.
  • 3.3 V signal → 5 V input: the question is whether the 5 V chip recognizes 3.3 V as High. If it does not, the signal does not get through.

Checking the input threshold voltage

A digital input has a set minimum voltage it recognizes as High (VIH).

PartMinimum voltage read as High at a 5 V supply (approx.)Can it take a 3.3 V signal
74LS (TTL)2.0 VYes
74HCT2.0 VYes
74HCAbout 3.5 V (70% of supply)No
AVR (Arduino Uno)About 3.0 V (60% of supply)Yes, but with little margin

If you are not sure whether a 3.3 V output reaches a 5 V input, check the VIH in the datasheet (How to Read a Datasheet).

Method 1: Resistor divider (5 V → 3.3 V, one direction)

The simplest method when the signal flows only from the 5 V side to the 3.3 V side. Divide with two resistors (Designing Voltage Dividers and the Loading Effect).

  • With R1 (top, signal side) = 1 kΩ and R2 (bottom, GND side) = 2 kΩ, 5 V becomes 5 × 2 / 3 ≈ 3.33V.
  • Or you can make about 3.0 V with 2.2 kΩ and 3.3 kΩ.
ProsCons
Simple with two partsOnly one direction; the waveform dulls on fast signals (RC of the resistors and input capacitance)
Almost no costVoltage drop where the input impedance is low (voltage divider calculator)

For example: widely used to connect the 5 V echo signal of an ultrasonic sensor (HC-SR04) to an ESP32 input.

Method 2: Direct connection (3.3 V → 5 V)

If the 5 V part's VIH is lower than 3.3 V (74LS, 74HCT, some microcontrollers), you can connect a 3.3 V output directly to a 5 V input. But since the devices have different supplies, always share ground. Going from a 5 V output to a 3.3 V input cannot be connected directly.

Method 3: Level-shifter modules and ICs

For bidirectional communication (such as I2C) or many signals, using a dedicated part is safer.

ApproachCharacteristicsUse
N-channel MOSFET bidirectional (such as BSS138) moduleGate to 3.3 V, source to the 3.3 V side, drain to the 5 V side, with pull-ups on both sides. BidirectionalI2C, general signals
Unidirectional buffer IC (such as 74AHCT125)Lifts 3.3 V to 5 V logic levels3.3 V → 5 V signals (LED strips, and so on)
Bus transceiver (such as 74LVC245)Supports supplies on both sides, multichannelParallel buses
Auto-direction shifter IC (such as TXB0108)Detects direction automatically. Unsuited to lines with strong pull-upsGeneral digital signals

Modular 4-channel level shifters are cheap and widely used by beginners. The connections are usually LV (3.3V), HV (5V), GND, and each channel's LVx and HVx.

Cautions with I2C

I2C is bidirectional open drain, so a resistor divider does not fit. When mixing 3.3 V and 5 V devices, use a MOSFET-type level shifter with pull-up resistors on both sides (I2C Wiring Basics). If a module that already has pull-ups is pulled up to 5 V, a 3.3 V device is at risk, so check the module's circuit.

Matching the supply voltage itself

  • Do not supply 5 V directly to a 3.3 V part. To make 3.3 V from 5 V, use an LDO regulator (AMS1117-3.3, AP2112, and so on). Check the current you need and the heat from the input-output voltage difference (the same principle as Making 5V from a 9V Battery).
  • If the board has a 3.3 V pin, small 3.3 V parts can take power from that pin (check the current limit).

Common damage cases

CaseCause
The ESP32 input pin failsA 5 V signal was connected directly
A sensor does not recognize the signalThe 3.3 V High falls short of the 5 V chip's VIH
I2C communication fails intermittentlyThe pull-up supply voltage differs or the pull-up resistor is too large
The board is hot and unstable5 V was connected to a 3.3 V pin
One device resets for no reasonThe grounds are not shared

Selection summary

SituationMethod
One-way output of a 5 V sensor → 3.3 V inputResistor divider (1 kΩ + 2 kΩ)
3.3 V output → 74LS, 74HCT, or AVR inputDirect connection (share ground)
3.3 V output → 74HC (5 V) input74HCT or a level shifter
I2C, bidirectional signalsMOSFET level-shifter module
Many channelsA shifter IC

Summary

Never connect 5 V directly to a 3.3 V input; do 5 V → 3.3 V with a resistor divider or shifter, and for 3.3 V → 5 V check the 5 V side's VIH and use a shifter if needed. Bidirectional lines such as I2C need a MOSFET-type shifter. To decide which board to use, Arduino Uno vs. ESP32 vs. Raspberry Pi Pico can help.

이 글은 학습 목적의 일반적인 안내입니다. 부품마다 규격과 핀 배열이 다를 수 있으니 실제 작업 전에는 사용하는 부품의 데이터시트를 확인하세요. 안전과 관련된 작업은 항목별 주의 사항을 먼저 읽고 진행하세요.This article is general guidance for learning purposes. Specifications and pinouts differ between parts, so check the datasheet of the part you use before real work. For safety-related work, read the cautions for each item first.