Is a Latching Relay the Solution? - Page 1
Forum section: electronics / beginners

author: mike519
author_rank: Contributor
timestamp: April 12, 2025, 04:06:53 pm
content: Hello again all,As I always preface, I am a newb so speak in grade 1 terms!I am trying to light a cluster of LEDs in parallel. Power is coming through a boost converter (not really relevant) and I need the power to be triggered on and off from a single positive trigger lead that outputs about 2.2v. See attached crude sketch,I have built a circuit that uses a momentary switch and 555 timer that latches on and off elsewhere in the project, however, I need to do this with just one trigger lead and not an in and an out like a switch. I have a simple 5V relay but think, from what I read, is a latching relay. Is there anything I can add onto the simple 5V relay (see attached pic) to make it latching? I have read about connecting the NC back to the trigger input but then I don't understand how a second trigger turns it back off.Something tells me its simple but I cannot figure it out in my grade 1 electronics brain.Thx

author: shabaz
author_rank: Frequent Contributor
timestamp: April 12, 2025, 06:47:58 pm
content: Hi,The sketch is missing. There's not enough info to give you well-focused answers currently.It's best to mention your actual end goal rather than just the smaller objective of having a trigger lead that you're trying to use to somehow control LEDs.Is the overall aim to (say) control home lighting? Or to create a lighting effect or something?Or train lighting?Is the trigger wire from a circuit you're in control of? Or some external device?What's your plan to re-synchronize things if (say) the source of the trigger signal resets? How will the source device be notified if the lighting is currently set on or off, or will that not matter?Is there any info on the cluster of LEDs that you mention, and are they powered from 5V?Are you familiar with using microcontrollers? If not, there's a chance what you're trying to do might be worth doing with (say) an Arduino. The learning curve to get going is low, and it will allow you to more easily fine-tune the behaviour/logic/timing to suit your end purpose, than experimenting with latching circuits or interfacing with latching relays.Any background info, diagrams, photos, links to what you're using, will all paint a picture to help give you more targeted advice rather than the general questions/information above.

author: BeBuLamar
author_rank: Super Contributor
timestamp: April 12, 2025, 08:50:44 pm
content: A toggle on/off circuit is actually not a simple one. A latching relay need 2 leads. One to latch it on and one to unlatch it.

author: themadhippy
author_rank: Super Contributor
timestamp: April 12, 2025, 09:06:54 pm
content: Quotedead easy,can do it with just half a 4013

author: mike519
author_rank: Contributor
timestamp: April 12, 2025, 10:23:33 pm
content: Quote from: shabaz on April 12, 2025, 06:47:58 pmSorry about that, of course the sketch would help...see below.So, I am building out a few circuits tied into one power source. In the end, it is all going inside a 1m long Battlestar Galactica 3D printed model to do a few different things all controlled by a remote.I have a lithium battery pack (with charger and BMS) as the power source. From there, it goes to a latching circuit with the 555 timer and momentary switch to turn the power on and off to the rest of the circuit. From there, it goes to a buck converter that takes it down to 5V. The output of that goes to the positive and negative rails on a solderable breakout board where I put most of the components. The power rail feeds an RX480E wireless receiver board that has four output triggers which seem to output 2.2V each. I have a four button remote that activates each trigger pin on this board.I can choose to have this board in toggle on/off mode, momentary mode, or latching mode. The issue is that I need a couple of the outputs to just be a momentary trigger and others to toggle a circuit on, then off again with a second push. I can't have one pin act one way and another pin act a different way. I am using three of the trigger outputs. One triggers a relay that sends a momentary negative signal to a small mp3/amp player board which plays the engine sound. That board needs a ground trigger. Its up and running fine.Another trigger pin triggers a pin on an arduino micro that will start a code that tells 8 LEDs (4 parallel sets of 2 in series...in one pair there is a port and a starboard LEDx4 on each side) to flicker in sequence as well as another trigger out that will start another sound output. These 3mm red LEDs go in some of the viper launch tubes so in the end, when I push the "launch" button on the remote, the RX480E triggers the arduino to start flickering the leds and playing the launch sound to simulate viper launches. Both of these first two just need momentary triggers.The third one is to turn 4 other LEDs on and stay on. This is what I am asking about above. Two of these other LEDs will have a bunch of fiber optic lines attached to the front of the LED, thereby lighting up windows, etc. The other two are landing bay lights. I need to be about to have the RX480e's momentary output turn these on at the first push then off at the next push. The RX480e only has a single positive trigger output so each circuit needs to go back to the main negative rail.For this last circuit, I had first thought about a relay but hadn't remembered that the trigger signal has to be on full time for the output to close. So I then thought I could use the same momentary latching circuit with the 555 to trigger the relay and keep it on, however, that circuit is looking for an in and an out for a switch as opposed to just one trigger in. This is where I get lost. I cannot figure it out.The link below is the circuit I built for the main power on/off and I just took out the LED in the video and put the output from pin 2 to the load. For this last circuit that feeds the LEDs, I had thought the trigger wire from the RX480E would be attached to the capacitor + or pin 3 on the 555 in this second latching circuit, but I cannot understand how this circuit would function without both the capacitor + AND pin 3.So, am I barking up the wrong tree with this last circuit using the same momentary latching circuit plus relay? If so, what is the easier route to go? If my thought IS correct, where would I put the trigger from the RX480e into the latching circuit and/or how would I modify this circuit otherwise.As mentioned previously, I did see a way of using this relay by connecting an output back to trigger but I'm not sure I understand that method at all.Thanks again

author: themadhippy
author_rank: Super Contributor
timestamp: April 12, 2025, 10:50:37 pm
content: Quoteso theres a few spare pins left on yer ardunio? if so why not use them.

author: shabaz
author_rank: Frequent Contributor
timestamp: April 12, 2025, 11:30:44 pm
content: It's quite low-tech to use those wireless remote controls because you're limited to just a few buttons to control things.If it were me, I'd consider using WiFi, with (say) a Pi Pico W, and then you could control all manner of things using your mobile phone and easily modify behaviour by uploading new firmware easily using the USB connection. All this just gives a lot more flexibility. But there's a learning curve to this if you've not done this before. Maybe that's better as a more longer-term thing to learn if you're new to that.Anyway, you've still got a few options if you stick with the wireless remote control system you're currently using to achieve your current aim. I've listed a few below (note: all these methods use a standard relay board (with transistor driver) or a MOSFET could be used if you like; no latching relay is used for these options):(1) One method could be to simply use a second RX480e receiver board too (i.e., pair both of them to the same transmitter, but set one for the latching mode that you want). I don't know if two can be simultaneously 'paired' in this way; I have never used such a receiver board, but there's a good chance it may work. Then, you can attach a relay board (i.e., a relay with a transistor driver) if that's what you're comfortable with.(2) Another method is to feed the momentary output into an Arduino (either the same one you're currently using or another one if you're uncomfortable with modifying the code on the first one), and then the latching is done in software (again, driving a transistor-controlled relay module).(3) Yet another method is to use a logic IC to implement a latching circuit. I feel it's more effort compared to the other options, though, but totally feasible. If you have some logic ICs lying around (for instance a flip-flop or a counter IC) then one of those may be repurposable for your task.

author: WattsThat
author_rank: Frequent Contributor
timestamp: April 13, 2025, 01:59:18 am
content: While a latching relay is one possible solution, it isn’t the best idea by far. It is though, the classicx-y problemsolution.You stated in reply #5 that you have an Arduino controlling some LED’s. I have to assume you found a blink/fade/whatever effect sketch for a Arduino Micro or Nano or the like, why not use the Arduino for all the control you need? It’s trivial to create toggled LED’s from an input pin on the Arduino from one of the four logic outputs on the RX480E.You do need to understand that the RX480E outputs are logic outputs that can only supply a maximum of 10 milliamps (that’s 0.01 amps) which could drive perhaps two modern, low current LED's directly but that probably not a great idea, a proper driver transistor or mosfet would be best for controlling LED’s. Hopefully the info you have for the Arduino provides a proper interface from the microcontroller output pins to the LED’s. If your Arduino is a 5 volt board and you’re powering the RX480 with 5 volts, you can safely connect the D0-D3 output pins directly to inputs on the Arduino and with a few lines of code achieve the toggle function you want.I think a good next step would be to post the details of the Arduino being used, a link is fine. We can use that to see how many I/O pins you have free and advise how to create a set-reset latch in Arduino code if that something you don’t know how to modify the blink/fade sketch you’re starting with.

author: mike519
author_rank: Contributor
timestamp: April 13, 2025, 07:13:07 pm
content: I am brand new to Arduino. I decided to try it for the four sets of flickering LEDs after watching a video on how to code this. I wasn't sure that I could run other processes on the same arduino at the same time but I have now looked up the "millis" function and I think I understand the principal. Indeed if I can figure this out, it would solve all of the problems and certainly save on components in the model. Going to zip over to an Arduino forum if I can't.Thanks all for pointing me in the right direction. If nothing else, the process thus far has taught me how to think through a few circuits and how they work.