Maximum viable wire length for a button

Status
Not open for further replies.

DJB

Member
I'm searching but not finding anything regarding general guidance around how far away things, like buttons, can be when wired directly to the Teensy.
Are we talking feet or just inches? Has anyone tested this?

I'm thinking there are likely viable alternatives to get around any limitations, but lets start with just the teensy and the digital pins.

Lets assume all wire is foil shielded, twisted pair?

Gage WireLengthTeensy Model
AWG 22
 
you can go for feet without hastle, so long as a pullup is near the teensy pin, the internal pullup should be fine too, don't try this for stuff like SPI or I2C, buttons are fine
 
The longer the cable the more the need for protection circuitry, as long cables pick up more noise from the surroundings. A simple
10--100nF ceramic cap to ground may be enough for many purposes, shorting out noise and RF pickup and transients.

It depends a lot on the environment too, home v. industrial or automotive, for instance.
 
In 2017 I helped in the building of a friend's art for Burning Man.

3wishes4.jpg


One of these 3 pieces had all the control electronics. The other 2 had just WS2812 LEDs and solenoid valves for the propane. Well, all 3 also flame sensor electronics, but nothing that actually controlled the project in the other two.

Most of the wiring happened the weekend before Burning Man and a lot of the work was focused on the user inputs and propane control. The LED stuff pretty much came last. With time running out, we tried just connecting 2 of the OctoWS2811 shield outputs to the ~25 feet cables that ran all the wires to the other 2 pieces. Surprisingly, it worked.

So based on that experience, you might say 25 feet of wire inside a cable is fine. It certainly did work all night long. That was also the night before the 2017 solar eclipse and Martin's place was in the area of totality, so a big party developed and many people enjoyed the fire & light show - at least after about 11pm when we got it running.

But then when they set it up at Burning Man, the LED communication to the other 2 pieces failed.

3wishes6-768x576.jpg


The frame for one of the 3 pieces was also damaged and partially lost on the journey from Oregon to Nevada, so they had quite a challenge. Everything had been perfect when it was set up in Martin's driveway, but then everything went wrong once they arrived at the Black Rock desert.

Eventually they learned that the LEDs were still working correctly, but only when the battery charger wasn't connected. In the driveway test, it ran from a fully charged battery and we had it running for maybe 4 hours. For use all week at Burning Man, the plan had been to run with a small gas generator powering a battery charger. Instead, after they got the frame damage fixed, they ended up having to run without the charger at night and they go recharge during the day.

Later when they wanted to take it to another event, I build these little RS485 transmitter boards to send the LED control signal down those long cables. With RS485, the project has worked very reliably even with the battery charger connected. We never did look into exactly why it interfered, whether it was ground voltage shift, electrical noise, or something else.

So the point is you can sometimes send a signal down 25 feet of wire. But as soon as something else in the system changes, that sort of long distance signal is pretty susceptible to interference. There is no simple answer, and it can be rather painful to learn of such problems after you've hauled a huge project and lots of propane out to the desert.
 
Status
Not open for further replies.
Back
Top