Analog soil sensor

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
marktn
Normal user
Posts: 7
Joined: 06 Nov 2015, 19:43

Analog soil sensor

#1 Post by marktn » 28 Oct 2019, 20:17

Hello,

I have connected a Soil moisture sensor to my analog input.
It works in the ESP 8266, but the value that it sends to domoticz stays 0.

What to do?

TD-er
Core team member
Posts: 1808
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog soil sensor

#2 Post by TD-er » 28 Oct 2019, 22:25

What type of sensor did you define in Domoticz?
When in doubt, define a "custom" sensor in Domoticz.

marktn
Normal user
Posts: 7
Joined: 06 Nov 2015, 19:43

Re: Analog soil sensor

#3 Post by marktn » 29 Oct 2019, 19:41

Auuww.. that was easy. I used Soil moisture, that didn’t work.
Now with the custom sensor it works perfect!

Is there a way to invert the analog value? 0 is the sensor under water, 100 is dry.

TD-er
Core team member
Posts: 1808
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog soil sensor

#4 Post by TD-er » 29 Oct 2019, 20:43

You can use the formula on the device configuration page.
I guess something like this would do:

100-%value%

marktn
Normal user
Posts: 7
Joined: 06 Nov 2015, 19:43

Re: Analog soil sensor

#5 Post by marktn » 30 Oct 2019, 18:40

That doesn't work. Als no info the wiki.

TD-er
Core team member
Posts: 1808
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Analog soil sensor

#6 Post by TD-er » 30 Oct 2019, 22:40

marktn wrote:
30 Oct 2019, 18:40
That doesn't work. Als no info the wiki.
Where do you enter the formula and what exactly do you enter there?

Have you also read this part? https://www.letscontrolit.com/wiki/inde ... asyFormula

I have to admit it isn't the best documentation, but if you look for "formula" on the wiki, you do find a number of examples.

marktn
Normal user
Posts: 7
Joined: 06 Nov 2015, 19:43

Re: Analog soil sensor

#7 Post by marktn » 31 Oct 2019, 21:11

[/quote]
Where do you enter the formula and what exactly do you enter there?

Have you also read this part? https://www.letscontrolit.com/wiki/inde ... asyFormula

I have to admit it isn't the best documentation, but if you look for "formula" on the wiki, you do find a number of examples.
[/quote]

I have read that part of the wiki. I think a formula isn't possible to invert the analog signal.
Mark

Drum
Normal user
Posts: 296
Joined: 07 Feb 2016, 11:56

Re: Analog soil sensor

#8 Post by Drum » 02 Nov 2019, 15:03

I could be wrong here, if the value is 100 for dry and 0 for water, could the formula not do something like 100 - value? 100 become 0 and 0 becomes 100

By the way which sensor is it? I am always looking for a better soil moisture sensor.

User avatar
dynamicdave
Normal user
Posts: 183
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: Analog soil sensor

#9 Post by dynamicdave » 02 Nov 2019, 15:08

I use the formula (1024-%value%)/100 in my soil monitor.
Here's a link to the tutorial guide.

http://resources-area.co.uk/node-red-fl ... sensor.pdf

On my set-up I'm using a small-signal transistor to switch the +3V3 rail on/off to the soil sensor (to reduce the effects of corrosion).

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests