Sorry if I'm asking this question in the wrong place, but this is my first time here. I uploaded a picture of my relay. I want to control this relay with an esp32. I've tried all kinds of connections, but the relay doesn't work. I've already ruined an esp
relay issue
relay issue
Hello!
Sorry if I'm asking this question in the wrong place, but this is my first time here. I uploaded a picture of my relay. I want to control this relay with an esp32. I've tried all kinds of connections, but the relay doesn't work. I've already ruined an esp
) The relay is powered by a 12V transformer, the esp is powered by 5V. I connected the + and - legs of the relay to the + and - legs of the transformer. I connected the ch legs to the Gipio legs. The previous relay, which was different, was connected in a similar way. I also tried leaving out the esp and trying to make it switch with only 5V, but it switched to both negative and positive. Maybe the relay is bad or I need more knowledge. Thanks for the help.
Sorry if I'm asking this question in the wrong place, but this is my first time here. I uploaded a picture of my relay. I want to control this relay with an esp32. I've tried all kinds of connections, but the relay doesn't work. I've already ruined an esp
- Attachments
-
- Relay.jpg (2.93 MiB) Viewed 198 times
Re: relay issue
Thanks for your reply.
I think I already tried that and the ESP was broken. Could I try the relay without the ESP by connecting 12V to the relay, 5V negative to COM, and 5V positive to one of the relays? Would this connection work?
I think I already tried that and the ESP was broken. Could I try the relay without the ESP by connecting 12V to the relay, 5V negative to COM, and 5V positive to one of the relays? Would this connection work?
Re: relay issue
Should work I think yes. Depends a bit on the circuitry on that relais PCB, but I wouldn't expect any issues.
Re: relay issue
If at all possible I'd really try to avoid using relays at all. If you get the control right, they still may generate so much EMI that your ESP crashes nonetheless.
If really want to use a relay then pay attention to these points:
- always add a flyback diode to the relay's coil, otherwise the induced voltage WILL destroy your gpio
- even better to use a MOSFET gate driver. It's not it's primary use, but it's designed to handle quite large currents
If you're switching large currents with the relay, expect arcs to occur. These will generate EMI and will probably crash your ESP.
If really want to use a relay then pay attention to these points:
- always add a flyback diode to the relay's coil, otherwise the induced voltage WILL destroy your gpio
- even better to use a MOSFET gate driver. It's not it's primary use, but it's designed to handle quite large currents
If you're switching large currents with the relay, expect arcs to occur. These will generate EMI and will probably crash your ESP.
Re: relay issue
First you need to know what is the circuit driving the relay.
That circuit may require more than a GPIO pin can supply.
Also, even though the ESP32 is powered by 5V, does not mean your going to get 5V on a GPIO pin. The ESP32 itself is a 3.3v only device.
That circuit may require more than a GPIO pin can supply.
Also, even though the ESP32 is powered by 5V, does not mean your going to get 5V on a GPIO pin. The ESP32 itself is a 3.3v only device.
Ya, for the relays you have this wont be a issue. maybe if your switching a contactor with 240vac to some insane load.If you're switching large currents with the relay, expect arcs to occur. These will generate EMI and will probably crash your ESP.
Who is online
Users browsing this forum: Qwantbot and 0 guests
