Help needed shorting multiple ESPs to ground.

Hi,

I'm currently working on a project where I need to control multiple ESPs via one button.

I set up a pin via pinMode(buttonpin1, INPUT_PULLUP); I connected the pin to a button which shorts to ground. if (buttonState == LOW) calls my function correctly

BUT when I increase the length of the cable to the button it doesn't work anymore.

Im fairly new to electronics and would really appreciate a hint what to look at.

Cheers!

ok. seemed to have been a physics problem. The cable itself had so much mass, that it drained the pin after shorting to ground. A 10k resistor between the pin and the button cable did the trick.

You need an external pull-up resistor of a lower value if the cable is long, so that noise doesn't falsely register as a button press. Try something in the range 10k to 1k.

The cable itself had so much mass, that it drained the pin after shorting to ground. A 10k resistor between the pin and the button cable did the trick.

Not a valid assessment. The extra resistor acted with the pin capacitance as a low pass filter which reduced noise spike amplitude. Go with a larger pull-up resistor, make sure your cable is twisted pair or screened.

Hi,

I'm working on a ESP / Raspberry Pi camera array containing 67 units in total.

I want to control the all shutters simultaneously with a daisy chained button (internal pull up - short to ground). So far I was able to make it work with a small resistor at each pin, but I was wondering if there would be a simpler solution.

Does anybody have a hint or maybe a link to an document, where i could read up on the effects that are at play?

Cheers

Seems to be a continuation of this thread.

You could run into ground loop and phantom-power problems if you join multiple devices. Maybe wise to use an opto coupler on each ESP, close to the ESP.

Opto transistor: collector to an ESP input pin with (internal) pull up, opto emitter to ESP ground. Opto LEDs (can be multiple in a string), with a current limiting resistor, powered from some supply, and switched with the button (or with a transistor and some another processor). Most opto LEDs have a Vf of about 1.2volt at low current (~2mA should be enough). Leo..

@schaggo

TOPIC MERGED.

Could you take a few moments to Learn How To Use The Forum. Other general help and troubleshooting advice can be found here. It will help you get the best out of the forum.