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

User avatar
By Barnabybear
#48850 Hi, if you just want to switch an AC light which you hadn't stated before. you might be as well using an opto coupled relay to save on extra components. I've used these without a problem. 3 + goes to 3.3V, 4 - goes to your GPIO and AC is switched on 1 & 2, nothing else needed other than a 6mm gap between high an low voltages. The output is inverted so you just have to reflect this in your code. Depending on which GPIOs you use the may flicker at startup or reset, in total you can have 4 on an ESP8266-01 if you set the Tx & Rx pins to function as GPIOs.
Link to post
User avatar
By Joe Job
#48854 Hi thanks for that so in Spain we have 2 wires blue and brown, brown is live and blue is neutral, with the set up I have at the moment AC in goes to COM, AC out goes to NC and blue goes directly to the light. So with the relay you use the AC in would go to 1 and AC out would go to 2? Is it possible to do this on a breadboard I am not working on PCB's yet?
User avatar
By Barnabybear
#48855 Hi,
So with the relay you use the AC in would go to 1 and AC out would go to 2?

Correct.
Is it possible to do this on a breadboard I am not working on PCB's yet?

The SSR (Soild State Relay) will fit on bread board but personaly I never would and you shouldn't! Just solder some wire onto the SSR leads then cover any exposed jounts. You'll only have 3.3V on the breadboard and that won't kill you.