Arduino Uno, ESP8266, Relay 5vdc 4 channel

Need help for my project, i’m new user for using Arduino, my project have been connect to blynk successfully, i’m using Arduino Uno, ESP8266 and Relay 5vdc, when relay not connect to 220v ac, blynk nothing problem and still connected, but if i’m connect relay to 220v, then blynk disconnected every time, so, where is my mistake, please help.
Sorry for my bad english.

Hey there,
are you supplying enough power to the esp8266 ?

Yeah, i think is enough for supply esp8266 from arduino, cause if i’m trying to connect my relay without connecting to 220v, blynk is still connected normally

The Arduino 3.3v pin is not enough, you should use an external 3.3v power source, and you can post your whole sketch so we can take a look at it.

okay, i’ii try to get an external power supply.

thanks for the advice.

1 Like

this is my simple code

#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "*********************************";
// Your WiFi credentials.
// Set password to "" for open networks.

char ssid[] = "******";
char pass[] = "******";

// Hardware Serial on Mega, Leonardo, Micro...
//#define EspSerial Serial1
// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200
ESP8266 wifi(&Serial);

void setup()
 // Debug console
 Blynk.begin(auth, wifi, ssid, pass,"",8080);
void loop()
  Blynk.begin(auth, wifi, ssid, pass,"",8080);
 else {

@davsyah please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:


thanks for telling me, i’m new here

Strange code, which won’t work correctly because the serial port is being used for both Blynk messages…

and the connection to Blynk…

Also, I’m not sure what this is meant to achieve…