Hi, I was hoping to tap into the vast expertise for my simple project.
What I intend to do: Turn on a SRD-05VDC-SL-C relay based on a signal from an ESP8266
What I have done so far: To isolate and simplify the issue, I took out the wiring in the NO/NC terminals, so that by just hearing a click I can tell if the relay toggles back and forth:
My ESp pin 5v connects to the relay's vcc
My Esp pin gnd connects to the relay's gnd
My pin d4 connects to the relay's "in" pin.
No other connections at the moment to help me debug.
My issue:
When I download the program, the red light is on (indicating the relay is in the "off" state), then once the program starts, it turns the green light on. After that, in spite of the output of this line: "Serial.println(digitalRead(relayin));", showing that the ESp8266 is toggling the pin "HIGH" and "LOW",
the green light stays on.
I do notice that the green light's intensity dims a very little (but still stays on).
What else have I tried: I tried giving the 3.3V pin to the relay instead of the 5V. The green light turns off now, but the relay doesn't switch (no clicking sound).
The amzon product page says
This relay is an electrically operated device. It uses a low level triggered control signal (3.3-5VDC) to control the relay. T
You hsould post your complete sketch shown like in this tutorial
What exact type of ESP8266 are you using?
I it is a module with the blue LED you could use this blue LED as an indicator
and of course serial printing
Post ALL code and verbose error/serial logs in code tags. Also a wiring diagram, a photo of a hand drawn is fine. Use the Tools/Auto Format option before copying the code.