You are reading a single comment by @Maarten and its replies. Click here to read the full conversation.
  • In short these devices are not really designed to be "several meters away". Bottom line, they may just not work at such distances. Some issues to consider...

    I would first try to talk to the devices connected directly together and not several meters apart across cabling. The outcome tells you whether this is a software or hardware problem.

    I suspect very likely switching times are too fast for long distances and/or the capacitive loading too large to drive. Rule of thumb: if the signal rise/fall times are less than 10ns/ft the cable will exhibit transmission line effects, meaning reflections that degrade signal integrity. For example, if several meters were say equal to 15ft, then rise/falls less than 150 ns will cause reflections, likely degrading signal integrity, where faster equates to more degradation.

    Second rule of thumb: most cabling will contribute ~50 pF/ft. So, a 15' cable would present a hefty 750 pF load that the DHTxx must drive.

    One thing that may help both cable problems would be to add a small series resistance at the device, 1-10 ohms/ft.

    The large capacitive load will lead to large supply spiking currents that requires local supply bypassing, meaning you need a capacitor AT THE DEVICE connected between VDD and VSS. Third rule of thumb: bypass cap >100X loading; if larger than 0.1 uF then parallel with a 0.01 uF or smaller, which improves high frequency response.

    What kind of cabling? Open wiring (i.e. just individual wires) will exhibit more variability and crosstalk when transmission line effects come into play. May be better off using coax.

    Note, all these problems apply to the Espruino end of the line as well since it must drive the initialization pulse. If you have a scope, probing the signals at each end would shed a lot of light on the situation.

  • Thanks for your informative reply. There sure are lots of factors worth considering. But what I ment by "old module" was the old version of the software module for Espruino. My sensors are actually 26ft/8m away and connected through common telephone cable. They work flawlessly with the old software. Why it doesn't work with the new software is beyond my competence in electronics. Regarding long distance TTL signals I also have relay modules and IR signal LEDs connected 8 meter away. It works well but sometimes the IR signals doesn't get interpreted by the receiving end. I wonder if the long distance TTL signals will harm the output pins of the board though (given the current spikes).

About

Avatar for Maarten @Maarten started