Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›PCF8591 ADC and DAC Module

Component guide · Beginner · 3 min read

PCF8591 ADC and DAC Module

Pinout, Wiring and Code

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the PCF8591 module isPCF8591 module pinoutWiring the PCF8591 moduleExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

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
01

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.

02

PCF8591 module pinout

The pins on the PCF8591 module and what each one does.

PinFunction
VCCSupply, 2.5 to 6 V
GNDGround
SDA / SCLI2C data and clock
AIN0 to AIN3Analog inputs
AOUTAnalog output
P4 / P5 / P6Jumpers linking the LDR, thermistor and pot to the inputs
PinFunction
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
03

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 pinArduino UnoESP32
VCC5V3V3
GNDGNDGND
SDAA4GPIO 21
SCLA5GPIO 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
04

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.

Read the pot and dim the LED with the output (Arduino) · Arduino C++Verify & upload in Electrolark
#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);
}
05

Setup and tuning

Jumpers

keep them for the demo sensors, remove them to use the inputs yourself.

Read twice

after switching channel; the first byte is the old result.

Output load

AOUT drives the LED or a high-impedance input, not a motor.

Higher resolution

for better than 8 bits use an ADS1115.

06

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
07

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.
08

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.
09

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

  • PCF8591 ADC / DAC Module
    ₹128View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • Solderless Breadboard
    ₹68View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
Shop Interface & RF Encoder ICs

Keep learning

Component guideIntermediateADC and DAC ModulesAn external ADC module gives a microcontroller more, better or cleaner analog inputs.3 min read · Semiconductors & ICsConcept explainerBeginnerADCs ExplainedAn analog-to-digital converter (ADC) measures a voltage and returns a number.4 min read · Electronics FundamentalsConcept explainerIntermediateI2C ExplainedI2C is a two-wire bus that lets one microcontroller talk to many sensors and displays using a data line (SDA) and a clock line (SCL).4 min read · Electronics Fundamentals

Sources

  • PCF8591 8-bit A/D and D/A converter datasheet (NXP)

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the PCF8591 module isPCF8591 module pinoutWiring the PCF8591 moduleExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide2 items · ₹196

PCF8591 ADC / DAC Module · Solderless Breadboard

Run itChange the inputs and watch the output

8 bits: 0 to 255. AIN3 (the pot on most boards) is copied straight to AOUT.

AOUT LED 40%
Serial monitor115200 baud
102

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question