Page 1 of 2
relay control on same circuit
Posted:
Sun May 03, 2015 2:22 pm
by johved
Hei guys,
Im new here and frankly, about as novice as they come.
I had an idea about a remote controlled outlet and wanna try out the esp8266 for the Job. I made a sort-of circuit sketch, and im wondering if its even remotely correct. The thing is that i want the circuit to be driven by the same source as the outlet .
What can I use as the 220v to 5v converter?
Re: relay control on same circuit
Posted:
Sun May 03, 2015 6:22 pm
by ArnieO
Looks fine to me, providing you remember to connect CH_EN to 3.3V, and use a relay module, not only a simple relay. The modules are cheap om eBay and contain the necessary driver circuitry.
The 5V Power can for instance be a phone charger.
Re: relay control on same circuit
Posted:
Sun May 03, 2015 8:39 pm
by j0hncc
You may have some trouble with GPIO2 output. If your relay expects HIGH=ON, it may have a pull-down it which would cause ESP to boot into in a non-useful mode.
Also I think there is some brief output on GPIO0 and GPIO2 during boot up. If it's enough to trigger your relay module then it may bother you if (when!) the ESP resets.
Cheers,
John
Re: relay control on same circuit
Posted:
Mon May 04, 2015 6:54 am
by jra
I would use one of the widely available relay modules (Sainsmart or equivalent) because:
1) You can't build one any cheaper yourself
2) The ubiquitous Songle relays are not breadboard friendly
3) The inputs are opto-isolated
Implication of the last feature is that these modules are active-low so you'll want to keep this in mind when you decide what pins to drive it with.