4 Ways to expand ADC in ESP8266

ESP8266 is a Wifi micro-controller, but has limited pins for ADC. Therefore this topic shows ways to expand ADC pins in the micro controller.

We are undergoing a phase in digital world, where everything is getting small, powerful and wireless.
With the emergence of the term Internet of things, the market is going crazy with all kind of internet enabled devices. One such buzz is created by ESP8266. This chip is already scrambled both in hardware and software by hackers to squeeze the best out of it. Starting from running Lua to analog Tv transmission its ruling the roost.

This chip though serves the purpose for which it is created that is IOT, it lacks in one thing which is needed for using it for IOT. Yes ADC or Analog to Digital Converter. The ESP8266  has just one ADC pin which for an IOT sensor is a bottleneck. That said, it does not mean that you cannot expand the ADC. There are quite a few methods to achieve it which are explained below.

Using ADC Expander:

This is a very common method. You expand the ADC by using an external chip which provides ADC pins and interfaces with ESP8266 via I2C, SPI or Serial etc. Search for “I2C ADC” or “SPI ADC” or ” Serial ADC” you will get plenty of chips.

Reference: http://www.esp8266-projects.com/2015/04/18-bit-adc-mcp3421-i2c-driver-esp8266.html












Using Analog multiplexer IC:

In this method, you use a chip which provides a switch to receive analog signals from different sources. Then it passes it on to the only ADC pin and use GPIOs to control the switch.

Reference: https://tinker.yeoman.com.au/2015/05/26/when-you-need-multiple-analog-inputs-for-your-esp8266-application/

Isolation using diode:

In this method, you connect all the Analog sensor’s one end to the ADC pin like a common bus. The other end gets enabled by a diode.

Reference: http://www.instructables.com/id/ESP8266-with-Multiple-Analog-Sensors/















Isolation using resistor:

In this method diode isolation and resistors are used. A pull down resistor is connected to the ADC pin to lower the voltage. One end of the sensor is connected to the ADC pin and the other end is connected to the GPIO pin through resistor.

Reference: https://hackaday.io/project/8435-2-analog-inputs-for-esp8266-without-multiplexer















At the end you need to chose a method which suits your needs. You need to Trade off between cost, capability and various other factor.

Do you have any other methods, if yes then comment below ?


Leave a Reply

Your email address will not be published. Required fields are marked *