What does the opto buy you? You're already got a relay that provides isolation. A resistive divider may be a cleaner solution. All things considered, without a schematic, all you're getting are guesses as to the appropriateness of an optocoupler. Further, depending upon the relay design, I'd be concerned that's not enough current to ensure proper contact engagement since power relays cannot be counted on to switch microamp signal levels.
Thank you for the link, most helpful.As with most eBay stuff from China, the reality and the description are two different things. What you have there is a not true bistable/latching relay. No, it's your run of the mill 50 cent 5 volt relay with some mystery four leaded device that does the trigger/hold of the relay. A true bistable relay holds its position without power, the relay you've linked to does not and it will always be off upon power up.The bad news is that this relay will require 60-80ma at all times when the relay is engaged. If you had intended to use this as a zero power latch for battery operation, it's not going to work.The good news is that it will most likely not need more than a few milliamperes on the trigger signal pin to get it to change state. You'll need to source current to the trigger pin so given the original connection diagrams, a low digital output to the opto input led will active the relay rather than a digital high.Edit: You could always read the coil voltage thru a voltage divider to know the relay state, if that matters to you.
I'm not necessarily discouraging eBay but many times the stuff isn't what they say it is. It can be a great resource when you're on a budget. Just remember the old phrase "buyer be aware" as it really suits the situation.Project requirements drive part specs and since you haven't provided any details, there is little point in speculating.FWIW, here is a DigiKey parametric search of the dual coil relays with contacts above 2 amps, sorted by price. These search tools are the easiest way to find a part for a specific application.Digikey latching relay search
How do you plan to power the relay coil(s)? Is the esp-12e outputs 5 or 3.3V?
I've been using this for my 12v power applications. works pretty good for the lower amperage stuff.still working on figuring out some of my higher amperage projects with it.