Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By m-cin
#11788 To be honest with this setup of long cables going back and forth... it can easily break for thousands of reasons.

1. The Darlington circuit for relay coil drive looks strange. Why there is a resistor in collector? Normally you connect the coil here - two collectors short -> coil -> Vcc. Resistor between 1st emitter and 2nd base seems unnecessary.
1. Relay has a coil and contacts. Where is a second coil connection routed?
2. Schematics shows you short +5V with GND when relay is energised - is it really so?
3. Try to connect relay coil/Darlington GND and Vcc directly to the power source bypassing breadboard with possibly high AWG cable.

I personally use 4N33 for controlling relays. It gives an optoisolation so no return path for glitches through transistors.

HTH,
M.
User avatar
By ardhuru
#19114 I have had *very* similar problems. Strangely, and defying my logic, a 1k pullup to 3.3 from the output that is driving the transistor solved it. (I use a 2.2k bias to the base of the transistor)
User avatar
By roccomuso
#31674
jra wrote:The following lists about all of the combinations depending on what parts you have/are available where you live (NPN, PNP, N/P channel MOSFET):

http://www.electronics-tutorials.ws/blo ... rcuit.html

Which model relay are you using? If it is a 3V Songle (SRD-03VDC-SL-C or something like that) it will take 120-150 ma to energize. Make sure your power supply has enough to supply that and the ESP. A large capacitor to even out the spike when you trigger the relay would help.


Does the esp8266 correctly drives a 3V Songle relay? does the relay takes too much mA?

Where do i need to put the capacitor exactly?
User avatar
By martinayotte
#31681
roccomuso wrote:Does the esp8266 correctly drives a 3V Songle relay? does the relay takes too much mA?

Where do i need to put the capacitor exactly?


As the link you provided mentioned, the ESP is driving transistor or MOSFET which then drive the relay.
(ESP is not able to drive the relay directly, neither than other kinds of MCU)
You can also use driver chips like ULN2803.

The capacitor is something like 100uF or 470uF between GND and the 3.3V as near as possible from power pins of the ESP, it will have a role of a power reserve to avoid consumption spikes making ESP reset.