Component guide · Beginner · 3 min read
PCF8591 ADC and DAC Module

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The PCF8591 module gives four 8-bit analog inputs and one 8-bit analog output over I2C at address 0x48. The common blue board also has a potentiometer, a light sensor (LDR) and a thermistor connected to inputs through jumpers, plus an LED on the output. It is a simple way to add analog inputs to a Raspberry Pi and learn how ADCs and DACs work.
Key specs at a glance
- Inputs
- 4 analog, 8-bit (0 to 255)
- Output
- 1 analog, 8-bit
- Interface
- I2C, address 0x48 (up to 0x4F)
- Supply
- 2.5 to 6 V
- Sample rate
- Limited by I2C, about 11 ksps at 100 kHz
- On board
- Pot (AIN3), LDR (AIN0), thermistor (AIN1), output LED
What the PCF8591 module is
Each read returns one byte. Because of the way the chip works, a read returns the result of the previous conversion, so read twice and keep the second value when you change channel.
Remove the jumpers P4, P5 and P6 to free the inputs for your own sensors. 8 bits is coarse (about 13 mV per step at 3.3 V) but plenty for knobs and light levels.
PCF8591 module pinout
The pins on the PCF8591 module and what each one does.
| Pin | Function |
|---|---|
| VCC | Supply, 2.5 to 6 V |
| GND | Ground |
| SDA / SCL | I2C data and clock |
| AIN0 to AIN3 | Analog inputs |
| AOUT | Analog output |
| P4 / P5 / P6 | Jumpers linking the LDR, thermistor and pot to the inputs |
- VCC
- Supply, 2.5 to 6 V
- GND
- Ground
- SDA / SCL
- I2C data and clock
- AIN0 to AIN3
- Analog inputs
- AOUT
- Analog output
- P4 / P5 / P6
- Jumpers linking the LDR, thermistor and pot to the inputs
Wiring the PCF8591 module
On a Raspberry Pi use pins 3 (SDA) and 5 (SCL) and power it from 3.3 V. The board already has pull-ups on SDA and SCL.
| PCF8591 module pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC | 5V | 3V3 |
| GND | GND | GND |
| SDA | A4 | GPIO 21 |
| SCL | A5 | GPIO 22 |
- VCC
- Arduino Uno:
- 5V
- ESP32:
- 3V3
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- SDA
- Arduino Uno:
- A4
- ESP32:
- GPIO 21
- SCL
- Arduino Uno:
- A5
- ESP32:
- GPIO 22
Example code
On a Raspberry Pi, the smbus2 Python library does the same with bus.write_byte(0x48, 0x43) then two bus.read_byte(0x48) calls.
#include <Wire.h>
const byte ADDR = 0x48;
byte readAIN(byte ch) {
Wire.beginTransmission(ADDR);
Wire.write(0x40 | ch); // enable output, select channel
Wire.endTransmission();
Wire.requestFrom(ADDR, (byte)2);
Wire.read(); // previous result, discard
return Wire.read();
}
void writeAOUT(byte v) {
Wire.beginTransmission(ADDR);
Wire.write(0x40);
Wire.write(v);
Wire.endTransmission();
}
void setup() { Wire.begin(); Serial.begin(115200); }
void loop() {
byte pot = readAIN(3);
writeAOUT(pot); // LED follows the knob
Serial.println(pot);
delay(100);
}Setup and tuning
keep them for the demo sensors, remove them to use the inputs yourself.
after switching channel; the first byte is the old result.
AOUT drives the LED or a high-impedance input, not a motor.
for better than 8 bits use an ADS1115.
What you need
Shop this list3 of 4 found in our store · ₹245
PCF8591 ADC / DAC Module: the part this guide coversPCF8591 ADC / DAC Module₹128- Uno R3 development board: the controller used in the wiring tableFind this part
Solderless breadboard: for extra sensorsSolderless Breadboard₹68
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Alternatives and when to choose them
- ADS1015 ADC: 12-bit, programmable gain, no output.
- MCP3008 ADC: 8 inputs, 10-bit, SPI.
- MCP4725 DAC: 12-bit analog output.
Common mistakes to avoid
- Using the first byte after changing channel, which belongs to the previous channel.
- Leaving the jumpers on and wondering why your sensor reads the pot.
- Expecting more than 8-bit resolution.
- Loading the output with more than a few mA.
Frequently asked questions
What is the PCF8591 address?
0x48 on most modules.
Why is my reading from the wrong channel?
The chip returns the previous conversion first; read twice.
Can I use it with Raspberry Pi?
Yes, it is a common way to add analog inputs to a Pi over I2C.
Can the output drive an LED?
A small indicator LED, yes, as on the board.
What are the jumpers for?
They link the on-board LDR, thermistor and pot to the inputs; remove them to use your own sensors.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

