first off, I’m a noob when it comes to hardware/electronics. Barely started and not planning on getting too deep in it.
Now, what I am trying to do may not be possible, hence this question. I have this latching relay and it works as expected (not sure if it counts, but I have the 5V version of this, no the pictured 12V. Everything else seems the same though)
There are 2 pins in that white area that is the “low level trigger”. I found that I can take just 1 of the pins from the “low level trigger” and if I tap it to the DC “-” connector, it will latch (basically, acts like the button). It’s the one from the left; it will not work with the one from the right.
Now I’m trying to find a way to connect everything so that the relay is powered by it’s own 5V power source, the RPI is powered by it’s own power source, and I want to connect just 1 pin from the RPI to control the latching on the relay (so one of those 2 pins/wires on the relay).
Is there any way I can achieve this?
Your question omits details required to answer (specifically specifications for the module).
You CAN NOT control anything with 1 wire – electric circuits are called “circuits” because they need a complete current path – which requires a minimum of 2 wires.
PS I am reluctant to provide advice to inexperienced persons attempting to control mains power. The module pictured would only be safe (and comply with wiring regulations) if mounted in an enclosure with a barrier between mains and low voltage circuitry, and provided with suitable strain relief.
Short answer: “Yes, there is a way to achieve this.”
That said, your question omits some details that are needed for a complete answer. But we’ll start from what we know, or can reasonably assume, and go from there. One caveat: Your Raspberry Pi may be ruined if one of us makes a mistake: either I make a mistake in my instructions, or you make a mistake in executing them. I’ll cover some “safeguards”, but if your hardware knowledge is very limited, then your risk increases. If you’re OK with that, we’ll go ahead. If not, go back to software 🙂
From the information in your question, it seems reasonable to assume that the “low level trigger on the left” may be used for your “one pin connection” to the RPi. However, there is one important caveat:
DO NOT connect the
low level trigger on the leftdirectly to the RPi. It likely has 5VDC on it. If it does, and you connect it directly to a GPIO pin, your RPi will become a paperweight. This is because the RPi GPIO pins are biased at 3.3VDC, and they are very fragile.
Instead, you will need an “interface” between the
low level trigger on the left and the RPi. I’ll show this generically in the schematic below. Basically, it will work like this:
Your software program on the RPi will drive the GPIO pin you've chosen to an "active high" state (i.e. its output is 3.3VDC). The GPIO pin will be connected to the "base" terminal of the transistor Q1. Once the GPIO pin goes "high", transistor Q1 will be "turned on", and conduct current between its collector and emitter terminals.
And so, “this” is a way to achieve your objective. I’ll not go further as that may be a waste of time. Review this, and if you’d like to proceed, post a comment. We’ll go from there.