Soil moisture with long cable...

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
albertobonati
Normal user
Posts: 40
Joined: 13 Dec 2016, 15:25

Soil moisture with long cable...

#1 Post by albertobonati » 11 Jun 2018, 21:13

Hi.
I have a problem with my soil moisture sensor (P47), I have connected it to ESP board with a 5 mt. cable.
If I use a ESP01 board it's ok and work fine but with ESP07, ESP12 or NODEMCU board id don't work at all.
I'm sure the cause is cable lenght, if I short it I have no problem.
I tried to use GPIO4 - GPO5 anf GPIO0-GPIO2 on ESP07 and NODEMCU device, but all is the same...ESP don't find I2C device.
GIT version is mega-20180606 for all devices, do someone have some advice to fix this?
Thank

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Soil moisture with long cable...

#2 Post by toffel969 » 12 Jun 2018, 13:19

albertobonati wrote: 11 Jun 2018, 21:13 Hi.
I have a problem with my soil moisture sensor (P47), I have connected it to ESP board with a 5 mt. cable.
If I use a ESP01 board it's ok and work fine but with ESP07, ESP12 or NODEMCU board id don't work at all.
I'm sure the cause is cable lenght, if I short it I have no problem.
I tried to use GPIO4 - GPO5 anf GPIO0-GPIO2 on ESP07 and NODEMCU device, but all is the same...ESP don't find I2C device.
GIT version is mega-20180606 for all devices, do someone have some advice to fix this?
Thank
Try to use a twisted pair cable with shielding. Make sure to connect the shielding to GND.
Also, when using standard network cable (CAT5-7) you will have 8 wires + shield.
Do:
- run SCA and SDL each together with a GND in a twisted pair of wires.


Do Not:
- run SCA and SDL in the same twisted pair
- Connect multiple wires together. More Cu will increase capacitance, which is THE limiting factor in I2C .

Next step would be a stronger (fewer ohms) pullup resistors.

Last resort are I2C extenders
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

albertobonati
Normal user
Posts: 40
Joined: 13 Dec 2016, 15:25

Re: Soil moisture with long cable...

#3 Post by albertobonati » 12 Jun 2018, 16:58

Hi...thanks a lot.
I'll try !!!
Regards
Alberto

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest