-->
Page 1 of 2

ESP-12 + moisture sensor ACD pin

PostPosted: Sun Jan 17, 2016 5:56 am
by mojESP8266
Hi,

so i have decided to try moisture sensor(YL-69) with my ESP-12. Let me just say that i have already tried it with arduino and it works.

But with ESP i have problem with analog pin.

My MS(moisture sensor) is using 3.3V and i know that ESP analog pin needs around 1.1V?

if i connect it directly without any dropdown voltage manipulation than i get always data 1024.
if insert between MS(analog pin) and ESP-ACD pin dropdown voltage(to around 1.1v) than i see in serial monitor numbers around 100-140points. If i put MS in water i get around 80points.
Not sure if this is ok or not but it should be on scale from 0 -1023?

what am i doing wrong here ...

Re: ESP-12 + moisture sensor ACD pin

PostPosted: Sun Jan 17, 2016 7:49 am
by WereCatf
How, exactly, do you drop the voltage? A simple voltage-divider should be the way to go.

Re: ESP-12 + moisture sensor ACD pin

PostPosted: Sun Jan 17, 2016 8:25 am
by mojESP8266
WereCatf wrote:How, exactly, do you drop the voltage? A simple voltage-divider should be the way to go.


YL-69:
1st pin (VCC): 3.3V
2nd pin (Gnd)
3rd pin (D0): /
4th pin (A0): voltage divider. I added 1k R1 and 510 R2 (output around 1.115V); is this ok?

results are the same... i got values around 70-120 range and not 0-1023.

Re: ESP-12 + moisture sensor ACD pin

PostPosted: Sun Jan 17, 2016 9:50 am
by WereCatf
It's 1.0V, not 1.1V, but yeah, it sounds like your setup is fine and the issue lies with your code instead. I don't have one of these moisture-sensors, but when connecting to a "real" Arduino-board you're getting values in the range of 0-1023? Mind showing your sketch?