Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By tzajaczk
#95851 I have a problem with this board that I use to control an automatism via APIs like URL:

httpClient.begin(client, "http://xxx.xxx.xxx.xxx:pppp/do_sthg?xxid=12345678&deviceType=0&token=abcd")

I use outputs D1 (with a led to indicate the correct connection to the local WIFI), D2 and D3 as dry contact inputs.
Near the board there are circuits with high current: doorbell, push buttons of a remote switch, switch on a light. The activation of one of these "switches" triggers one of my inputs and sends a command (involuntary) to the automatism. I suppose that it is an induction caused by the passage of the current with 230V near an input of 3V at the output of ESP.
How to avoid this interference?

Here are the libraries used and the declaration of the ESP inputs/outputs:

[i]#include <Arduino.h>
#include "ESP8266WiFi.h"
#include "ESP8266HTTPClient.h"
#include "WiFiClient.h"

#define PIN_LED_RED 5
#define PIN_BUTTON_OPEN 0
#define PIN_BUTTON_CLOSE 4[/i]
-----------------------
[i]pinMode(PIN_LED_ROUGE, OUTPUT);
pinMode(PIN_BOUTON_OPEN, INPUT_PULLUP);
pinMode(PIN_BOUTON_CLOSE, INPUT_PULLUP);[/i]

What's the best we can do?
Thanks in advance for your help ...