What can I do with an I2C pcf8591 IC?

What can I do with an I2C pcf8591 IC?

Library to use i2c pcf8591 IC with arduino and esp8266. This IC can control (until 4) analog input and/or 1 analog output like measure voltage, read thermistor value or fade a led. Can read analog value and write analog value with only 2 wire (perfect for ESP-01).

How many analog inputs does the pcf8591 have?

This is the PCF8591 a single chip single supply, low power 8bit CMOS data acquisition device with four analog inputs. 1 analog output and i2c Serial communication bus interface that allows the connection to be connected in series integrated bus for a maximum of 127 units.

How to identify I2C address on Philips pcf8591 DAC?

To identify the i2C address of the device used the pin A0, A1, or A2. The selection of the ADC channel that you want to use is selectable via the control byte register and configurable via software as well as the Analog Output Management. refer to PHILIPS PCF8591 DAC Datasheet

Can a microcontroller communicate with an I2C device?

The “Wire.h” library allows the microcontroller to communicate with I2C devices. Therefore this library is essential every time you want to use the I2C communication. This sketch uses only the setup function, because we want only one time to scan all connected devices.

How is the pcf8591 connected to the potentiometer?

You’ll notice that the potentiometer is connected to the PCF8591’s first analog input. This is how we can measure the analog signal. Also, notice that the LED is connected to the PCF8591 on pin 15. This is the analog ouput. Rather than using PWM to control the brightness, we’ll be using a true analog signal from the PCF8591.

What is the default setting for pcf8591 on Raspberry Pi?

In this program, Raspberry pi read a variable register value (0-255) on PCF8591 default setting. And output to LED (located at lowwer in this picture) which is on PCF8591 using Digital analog converter.

What kind of resistor is the pcf8591?

Let’s take a look at the PCF8591. Potentiometers are resistors that vary in resistance based on an external action. There are many different kinds of potentiometers, but for this example, we’ll be using the rotary version. By turning the knob, the resistance will vary from 0-10kΩ.