- Sun Nov 28, 2021 9:46 am
Trying to drive relays from an ESP8266 is a recipe for disaster. Quite apart from the problems of back emf from the relays potentialy frying the ESP8266 the outputs were never designed for driving this kind of load. What you need to do is buffer the outputs using a driver cct. The simplest way I have found is to use to use a mosfet driver board which not only allows the relays to be driven correctly but allows you to interface the 3.3V output from the ESP8266 to the 5v or 12v needed to drive the relays. These boards are easy to find on ebay or similar for a few pence (cents) and will drive 8 pins. I'm sorry but I don't have a part number for the board.
I have used these boards on several projects to drive relays and other loads without problem and they are simple to set up. The H side is the higher voltage side and the L the lower voltage, in this case the 3.3v output from the ESP8266. The board is powered via the LV/HV pads together with the ground pad and are bi-directional.
I will try to attach a photo of the type of board I use to give you an idea of what it looks like. Hope this helps.
You do not have the required permissions to view the files attached to this post.