Page 1 of 1

Analog port ADC not working

Posted: 03 Jan 2016, 20:36
by rajbadri
i want to use a soil sensor module with esp easy but cannot get the ADC port working in
1. Electrodragon esp8266 module http://www.electrodragon.com/product/es ... ter-board/
2. Sparkfun esp thing https://www.sparkfun.com/products/13231

but it works perfectly with this module

http://www.electrodragon.com/product/no ... ifi-board/

can anybody guide me why its not working ?

Thanks

Re: Analog port ADC not working

Posted: 03 Jan 2016, 23:07
by costo
The last module which is working for you has a resistive divider connected to the ADC input. a resistor of 220k in series and a resistor of 100k from ADC pin to ground. Usually the ADC can only measure voltage up to about 1 volt, thanks to the divider the last module can measure volteges up to 3.3 volt.

Most probably the other two modules do not have a divider on the ADC pin and cannot measure more than 1 Volt. They will give an output of 1023 most of the time. The solution is then to add 2 resistors to make a divider yourself .

Re: Analog port ADC not working

Posted: 04 Jan 2016, 09:35
by rajbadri
it has started working i am getting

dry : 980
in water : 420


can you please give formula so that i can convert values to percentage (and create events in domoticz)

Thanks Again