Analog port ADC not working

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
rajbadri
Normal user
Posts: 56
Joined: 21 Dec 2015, 21:38
Location: India

Analog port ADC not working

#1 Post by rajbadri » 03 Jan 2016, 20:36

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

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: Analog port ADC not working

#2 Post by costo » 03 Jan 2016, 23:07

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 .

User avatar
rajbadri
Normal user
Posts: 56
Joined: 21 Dec 2015, 21:38
Location: India

Re: Analog port ADC not working

#3 Post by rajbadri » 04 Jan 2016, 09:35

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

Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests