I am using an ESP32 development kit with a 5V eight relay block. Following this answer, I removed jumper JD-VCC and powered the relay block at the JD-VCC pins from an external 5V 2A adaptor. The relay IN pins are directly connected to ESP32 pins. gnd -> gnd and VCC of relay ->3v3 of the ESP32. The relays are heating. Is that normal? Is there any solution to prevent heating?
This is my test code:
Refer: https://electronics.stackexchange.com/questions/505318/how-to-properly-use-a-relay-module-with-jd-vcc-from-arduino-raspberry
*/
#define role1Penye 2 //klemens1
#define role2bld 4 //k2
#define role3bld 13 //k3
#define role4wtc 25 //k4
#define role5hrm 21 //k6
#define role6inverter 22 //k7
#define role7hrm 16 //k9
#define role8hrm 17 //k10
int roles[] = { role1Penye, role2bld, role3bld, role4wtc, role5hrm, role6inverter, role7hrm, role8hrm };
int numRoles = sizeof(roles) / sizeof(roles[0]);
void setup() {
// put your setup code here, to run once:
for (int i = 0; i < numRoles; i++) {
pinMode(roles[i], OUTPUT);
digitalWrite(roles[i], HIGH);
}
pinMode(14, OUTPUT); // bug
}
void loop() {
// put your main code here, to run repeatedly:
for (int i = 0; i < numRoles; i++) {
pinMode(roles[i], OUTPUT);
digitalWrite(roles[i], LOW);
delay(30000);
}
for (int i = 0; i < numRoles; i++) {
pinMode(roles[i], OUTPUT);
digitalWrite(roles[i], HIGH);
delay(30000);
}
}
This is my relay module: