Hi all,
I'm new on this forum, but not with electronic and microcontrollers.
I usually solve my problem on my own, but this time i need help
I'm working on a simple project of plant watering.
My ESP32 controls a 3.3V relay that is driving a small 230V pump.
The problem is that the ESP sometimes crashes when driving off the relay.
This problem only comes when the power stage of the relay is connected to 230VAC and the pump
When the project is running without the pump, there is no problem. The relay works fine
When the problem happened, my debug console is showing a lot of incomprehensible characters. See attachement
Never see that before...
I checked the output current of the ESP's output pin : 0.54mA (i think its ok)
I checked all my wiring. You can find it in attachement.
For the test, i created a small program that is driving on and off the relay alternatively by 5s. Even with this small program, the problem is happening. Here is the code :
#define RLY 14
void setup() {
Serial.begin(9600);
pinMode(RLY, OUTPUT);
digitalWrite(RLY, LOW);
}
void loop() {
digitalWrite(RLY, HIGH);
Serial.println("rly ON");
delay(5000);
digitalWrite(RLY, LOW);
Serial.println("rly OFF");
delay(5000);
}
Anyone knows this kind of error ?
Do i have wiring problem or electrical issue ?
Thanks in advance for your help