Page 1 of 1

Soil moisture with long cable...

Posted: 11 Jun 2018, 21:13
by albertobonati
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

Re: Soil moisture with long cable...

Posted: 12 Jun 2018, 13:19
by toffel969
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

Re: Soil moisture with long cable...

Posted: 12 Jun 2018, 16:58
by albertobonati
Hi...thanks a lot.
I'll try !!!
Regards
Alberto