Interfacing PCF8591 ADC/DAC Module With Arduino

by hIOTron IoT in Circuits > Arduino

15 Views, 0 Favorites, 0 Comments

Interfacing PCF8591 ADC/DAC Module With Arduino

Adc interfacing with arduino.jpg

As an analog to digital conversion is important in embedded electronics we have interfaced PCF8591 ADC/DAC with Arduino.

Supplies

Hardware Components

Arduino Uno

PCF8591 ADC/DAC module

Single Turn Potentiometer- 100k ohms

Jumper wires (generic)

About Project

pcf8591 adc module.jpg
Adc interfacing with arduino.jpg

PCF8591 ADC/DAC Module

PCF8591 is basically an 8 bit analog to digital or 8 bit digital to analog converter, which means each pin can read analog values up to 256. It needs 2.5-6V supply voltage and has a small standby current. If we need we can handle the input voltage by regulating the knob of the potentiometer on the module. We can see there are also three jumpers on the board.
There are two LEDs on board D1 and D2, out of which D1 indicates the output voltage intensity and D2 indicates the intensity of supply voltage. In this interfacing, we are going to read analog values from any of the analog pins and modify those values with the help of a 100K pot.

IoT Course will help you to learn more about IoT Solutions.

Run a Program

#include #include #define PCF8591 (0x90 >> 1) #define AIN0 0x00 const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); int Value = 0; void setup() { Wire.begin(); lcd.begin(16,2); } void loop() { Wire.beginTransmission(PCF8591); Wire.write(AIN0); Wire.endTransmission(); Wire.requestFrom(PCF8591, 1); Value = Wire.read(); lcd.print("ADC Value="); lcd.print(Value); delay(500); lcd.clear(); }