I’d like to use a Feather Huzzah ESP8266 and a Featherwing latching relay to build a device to remotely turn on/off a 12v device. I would also like to know the status of the latching relay with LED status lights. (If you’re not familiar with the feather devices, the latching relay is basically just a shield for the ESP8266).
Please see the below sketch for more detail on how I plan on wiring.
120VAC → 12VDC Transformer → 5VDC Voltage Regulator → Feather Huzzah
Connect the 12V LEDs and the 12V device I’d like to control to the 12VDC transformer
Connect 12V (-) as to relay as ground for the Huzzah’s pins 5 and 4 which would be set INPUT_PULLUP
Pins 14 and 12 would be configured as OUTPUT and used to SET or UNSET the latching relay
Can I have both 3.3v and 12v devices connected to the same relay terminals if I run (-) to relay common and (+) directly to the devices?
Any other issues I’m overlooking?
Please can you clarify your diagram and show the contact arrangements inside the relay? You diagram shows 1 connection to common (so that suggests 1 set of contacts), 2 separate connections to normally open (so is that 2 sets of contacts or is that 2 wires to the same contact?) and 3 separate connections to normally closed (3 sets of contacts?).
It's not clear.
If, as I suspect, there is only 1 set of contacts and both wires to NO and all 3 wires to NC are actually connected together, then consider, for example, the circuit from the left hand LED to pin 4 of the Huzzah and ask yourself what that would do.
The relay has one each NO, C, and NC terminals. Yes, your suspicion is correct that both NO wires are connected at the terminal and and all three NC wires are connected.
My logic was that electricity flows one way in a circuit, from positive to negative. For the left LED, 12V would flow from 12V+, through the LED, to NC. And if closed, to C and to the common ground.
However, while that may work, I see there's a flaw that when the relay is open, instead of going to C, that 12V+ is probably going to go to Huzzah pin 4.
Regardless, it's an incomplete, poorly-designed circuit.
I'll look at running the indicator LEDs at 5v and activating via two other GPIO pins when necessary.
My logic was that electricity flows one way in a circuit, from positive to negative.
Yes, it does, any way it can find, not necessarily the way you want!
I see there's a flaw that when the relay is open, instead of going to C, that 12V+ is probably going to go to Huzzah pin 4.
That's what I wanted you to realise.
Now I am going to tease you by saying there is a way to do what you want, almost as you have drawn it, with a few extra components. I will leave you to work out how.