-->
Page 6 of 9

Re: Teperature / humidity sensor recommendation

PostPosted: Mon Nov 27, 2017 10:45 pm
by bkenobi
Never mind. I found the issue.

So my results are pretty much as I expected. If I use a 6' or 15' CAT5 cable, I get 100% reliability. If I jump up to a much longer length (50'), the reliability suffers. With the longer cable and 2 sensors, I see that one of the sensors does not respond to initialization every time. If I reset the Wemos several times, I can eventually get both sensors live but that won't work for my production unit.

If anyone can help get SPI running to see if extended cable length works better, I'd be grateful. Thanks!

Re: Teperature / humidity sensor recommendation

PostPosted: Tue Nov 28, 2017 6:02 am
by schufti
try reducing I2C speed, make sure to use sensors without levelshifter and pullups, have pullups only at one end.

Re: Teperature / humidity sensor recommendation

PostPosted: Tue Nov 28, 2017 8:43 am
by bkenobi
I saw the various options in the advanced sketch. Any recommendation on speed? I guess I could make it the minimum setting since I plan on only checking once a minute or so.

EDIT: It looks like I need to change the I2C bus speed. I've seen the wire.begin called with 2 pins and a yet unknown number. I'm guessing that nomenclature would include the bus speed. I have only found refe re nce to 100, 400, and 1.7 (I assume kbps and mbps). I can't locate in the wire lib r rare where this would be a valid call though.

Re: Teperature / humidity sensor recommendation

PostPosted: Tue Nov 28, 2017 11:35 am
by schufti
unfortunately the default allready seems to be 100kHz, the lowest value supported.
You could try to modify core_esp8266_si2c.c and define e.g. 50kHz
see here https://github.com/esp8266/Arduino/pull/3401/files
and use

Wire.setClock(50000);

to activate.