Building a voltage divider to use ADC pin manually soldered/broken out on ESP-01

Hello,

I am using an ESP-01 to which there is a wire manually soldered to its ADC pin (pin 6). The ESP-01 is programmed using Arduino IDE 1.8.10 to read from its ADC pin to which i have connected a current sensor ACS712 20A which is powered by 5 V.

ESP8266EX.jpg

acs712-pinout.jpg

I have two questions:

  1. Is it OK to just have the sensor analog output signal connected directly to the ADC pin of the ESP-01? Or should i use some resistors or other components in-between?
  2. The sensor is outputting a variable ADC signal from 0-1024 but since the sensor is powered with 5 V (based on the ACS712 specifications, the input voltage should be 4.5 V - 5.5 V), then i am thinking that i will need a voltage divider to convert the 5 V to 1 V, since the ADC pin of the ESP-01 bare chip only supports 0-1 V.

ESP8266EX.jpg

acs712-pinout.jpg

The "Output Voltage versus Sensed Current" chart in the datasheet shows it potentially going up to at least 3.5 V. You will need a voltage divider. :astonished:

("Potentially" - yes, I liked that! :grinning: )

Paul__B:
The "Output Voltage versus Sensed Current" chart in the datasheet shows it potentially going up to at least 3.5 V. You will need a voltage divider. :astonished:

("Potentially" - yes, I liked that! :grinning: )

I am unsure about the values of resistors to use, since they could be too low or too high and i'm thinking that maybe this could interfere with the voltage limits or detection accuracy of the ESP-01's ADC pin?

This is my plan for the voltage divider setup (Vin is the analog output from the ACS712 20 A model current sensor):
esp01adcvoltagedivider.png
For example, instead of 500 Ohms and 100 Ohms, i could also use 5 KOhms and 1 KOhms, respectively. What would be the correct resistor values to use?

BTW, that was a potentially good one. :smiley:

esp01adcvoltagedivider.png

The Wemos D1 mini boards have a voltage divider made from 220K and 100K, more like 1000 times higher than the values you propose, and that seems to work very well. That gets the maximum input voltage up to 3.2V, so you may want to modify those values to give you a range that's higher than the sensor is likely to produce. 330K and 100K would get you up to 4.3V.