ESP8266 - PCF8591 - 8bit ADC/DAC driver example

Please find below a ESP Basic driver example for the PCF8591 I2c compatible 8 bit ADC/DAC IC:

Original Article about: Mailbag - PCF8591 I2c compatible 8 bit ADC/DAC

Part 2 will follow soon.

Happy breadboarding,
TJ.

Hi. It's nice. However, in the datasheet of esp8266 mentioned that having already integrated 10-bit ADC. And of course, in Arduino we can be easily to read analog value with function analogRead(). What is advantage or disadvantage of your way using PCF8591 comparing to built-in ADC function of Arduino. Thanks

Hello dgi52,

I was looking for a 4 x ADC + 1 DAC for a specific application, and as I find out 8 bit resolution was enough in that case, PCF8591 that has inside exact 4 ADC inputs AND a DAC was the best choice.

Regarding the ESP8266 Internal ADC ...I will not think to use it for any serious ADC usage. If you want more resolution (and precision in the same time) choose a dedicated one, like the MCP3421 for example. For DAC you can use MCP4726, a decent 12bit DAC at a decent price.

For the ESP8266 Internal ADC you have a lot of related informations here and a simple example tutorial how to calculate the voltage divider here

Happy breadboarding,
TJ.