I know esp can read only 1V max, that is way I am using 1M Ohm and 4.7K Ohm resistor combination which converts 220VAC to 1VAC when the fan is at full speed and the 1V drops accordingly to the step regulator
I am getting right values when I test it using my Multi-meter. The problem is I get random values when I try to read from ADC pin.
I tried supplying DC power (between 0 to 1 V) to the ADC pin of esp and every time it gave me the accurate value.
So I though maybe because of the AC sine wave it's giving me the random value. Therefore I read 100 values from the adc read and printed the max values out of all (that should give me the peak value of the AC sine wave). But still I get random values.
Any idea how to solve this issue?