# Connecting Arduino to 3.3V devices

luca 12/09/2015 5

Increasingly you may need to connect to your Arduino devices that operate with 3.3V.

Lowering the integrated circuits’ operating voltage  has in fact several advantages:

• allows to realize smaller transistors
• requires a lower heat dissipation
• allows faster state changes (the voltage difference between a logic state LOW and HIGH is lower)

this is why manufacturers of modules, sensors … are adopting the voltage of 3.3V as the standard.

#### The problem

Take as a reference an Arduino Uno. The board can be powered in different ways (through the 2.1mm jack, via the USB connector…) but the operation voltage is 5V, supplied by the onboard regulator:

The board has also a 3.3V regulator (LP2985), you may use to power external devices with that voltage:

All the PINs therefore works at 5V: if a digital PIN is configured as output, a logical value 1 (`digitalWrite(PIN, HIGH);`) corresponds to a voltage of 5V on that PIN.

If instead the PIN is configured as input, a voltage greater than 2.5V on that PIN will be considered as a logical value 1; a voltage lower than 2.5V as a logical value 0.

Let’s now connect to that PIN a corresponding PIN of a device powered at 3.3V:

• if the Arduino PIN is configured as input (device -> Arduino) there are no problems: when the device wants to send a logic high, it imposes a voltage of 3.3V that is correctly interpreted by Arduino (> 2.5V);
• if instead the Arduino PIN si configured as output (Arduino -> device), in case of a logic high Arduino imposes a voltage of 5V, that exceeds the working voltage of the device and can thus damage it!

Some devices, while operating at 3.3V, can accept higher voltages on their I/O PINs. Those devices are usually defined 5V tolerant: always check the datasheet!

#### Solutions

There are several possible solutions to adapt the two operating voltages.

The simplest ones, require only passive components (diodes, resistors…). Le soluzioni più semplici utilizzano soltanto componenti passivi (diodi, resistenze…). These solutions work well from the point of view of the tensions but introduce transients during the transitions of state that do not make them suitable for high-speed communications. Some of these solutions are well described in this blog post and their effects are shown on an oscilloscope.

The solution I adopted and suggest uses a small module, sold by several webshops (for example I got mine from Banggood):

This module uses transistors to convert up to 4 signals.

Its use is very simple: first to connect the to HV the higher supply voltage and to LV the lower; then connect the ground (GND). Connect the PINs of the device with higher voltage to the PINs labeled as HVx, while the corresponding PINs of the other device to the PINs labeled as LVx.

For example, to make a serial connection between Arduino and a device working ad 3.3V, the connections are as follows:

Here’s an example of the use of the module on a breadboard:

### Related »

1. Pietro 07/03/2017 at 21:50 - Reply

Salve.
Una domanda: al pin TX e RX della parte di 5v, li collego a due pin che manderanno e riceveranno il segnale da un dispositivo collegato dal lato 3.3v… giusto?
esempio: lato 5v lo collego ad arduino e a due pin (D2 e D3), mentre lato 3.3v a un modulo alimentato a 3.3v che manda e riceve un segnale. Quindi arduino e il modulo interagiranno…

• luca 08/03/2017 at 12:37 - Reply

si esatto, il modulo si occupa solo di traslare il segnale

• Luigi Augello 14/02/2019 at 19:27 - Reply

Il sensore se è da 5vsarà alimentato dal modulo o da un alimentatore esterno? Se volessi collegare un relè che quindi non solo invia, ma anche riceve come lo collego? Devo usare due pin su Arduino?

• luca 16/02/2019 at 11:20 - Reply

Luigi non ho capito la domanda… se il sensore è da 5V non ti serve questo logic level converter… idem per un relay a 5V

2. Luigi Augello 16/02/2019 at 16:51 - Reply

Scusa,mi sono espresso male io, devo collegare dei sensori a 5v. sulla gpio di una gertboard che funziona a 3,3v