Does anyone know what is involved in making this kind of relay and the components I need?
I want to have a relay that can be switched via the arduino but if the arduino loses its power, the relay will remain in it's last state.
I need this for my project because I want to be able to turn things on/off with a relay and have it stay that way without the arduino needing to constantly keep the relay in the desired state.
Does anyone know what is involved in making this kind of relay and the components I need?
I want to have a relay that can be switched via the arduino but if the arduino loses its power, the relay will remain in it's last state.
I need this for my project because I want to be able to turn things on/off with a relay and have it stay that way without the arduino needing to constantly keep the relay in the desired state.
Any help would be much appreciated here.
Did you actually read the site you linked to? It gives the manufacturer of the relay and even a link to their data sheet. You don't need their board, just go buy the relay and wire it to an Arduino pin using a driver transistor and an external power supply.
Paul_KD7HB:
Did you actually read the site you linked to? It gives the manufacturer of the relay and even a link to their data sheet. You don't need their board, just go buy the relay and wire it to an Arduino pin using a driver transistor and an external power supply.
Paul
I wasn't aware I could just wire up directly to the relay. There seems to be other components on the complete PCB being sold and I wanted to understand how that works.
wolframore:
I thought he wanted to experiment for the challenge of it. You can get latching relay boards from China for next to nothing
But it just works like a normal relay. As soon as the arduino is turned off, the relay just switches back.
Sure you can push the button or use the trigger to switch the relay but the whole issue is when the arduino loses power. That board still seems to rely on receiving energisation or not from the arduino.
I'm looking at a bistable relay that uses that SET and RESET functionality. I couldn't find anything premade from china like that.
Do you have an example of one of the modules you're talking about?
wolframore:
... You can get latching relay boards from China for next to nothing
Yup and that’s what they’re worth, nothing because they are not latching relays. It’s a translation problem. Or just the usual misleading Chinese descriptions.
One can create a pseudo latching relay using the eeprom to store the relay state in an Arduino.
WattsThat:
Yup and that’s what they’re worth, nothing because they are not latching relays. It’s a translation problem. Or just the usual misleading Chinese descriptions.
One can create a pseudo latching relay using the eeprom to store the relay state in an Arduino.
Okay so I'm glad I was correct in assuming that. Thanks for clarifying. It wasn't as advertised and they claim it's "Bistable/latching", but it's not really.
However, I want to clarify my intent because EEPROM will only restore the last state once the arduino has been powered on again and this is not desirable.
I am using my project in a car and I need to be able to switch relays on or off and have them stay that way without switching at all again if the arduino loses power. For example, I have pop up car headlights. There is a relay that keeps the headlights either up or down for aesthetic purposes.
I want to be able to set the headlights to up or down (relay energised or not) and then when the car is turned off (thus arduino turns off), the relay remains however I set it before the arduino powered off. Using EEPROM means it will only restore the relays state once I power on the arduino again.
wolframore:
Here it is latching two coil search the part number it takes you to the Datasheet.
Thanks for that. I understand that's the relay component I should be using, but how does that tie in with all the other components for the product in my original link?
It looks like there are some transistors, diodes and resistors involved and since I'm fairly new to arduino, I want to understand whats happening in his circuit to effectively make my own PCB like that.
It’s basically like two relays so follow this for each of the coils
you will have to play with it to figure out the correct switching pins unless you can follow their diagram.
wolframore:
It’s basically like two relays so follow this for each of the coils
you will have to play with it to figure out the correct switching pins unless you can follow their diagram.
Thanks wolframore! That's really helpful!
Time to order some components then and get to work!
Per your original post, the only way you get a true bistable relay is to buy one, you don’t make one. Another point is that pop up auto headlights do not use relays, they’re motorized and stay where they were last moved to, the same way a servo or stepper motor works. Using a relay implies current flow to hold the lights in one position which just drains the battery.
BTW, bare latching relays are available on eBay.au.
Just mind the low current these small relays can handle. For heavy 12 volt automotive loads, you use them as a pilot relay and pass the real power through an appropriately sized device.
wolframore:
The transistor is for powering the coil (s) the diode is to block the emf from the coil as it’s basically an inductor as it shuts off.
Misunderstanding of the freewheel diode: The diode is forward biased immediately after the transistor
switches off allowing the coil current to wind-down slowly without needing to generate large voltages
at all - it doesn't block any high voltages and only needs to be rated for the supply voltage and winding
current. Inductors store energy and give it back as the current reduces, if you try to stop the current
suddenly that energy is available all at once to force the current to flow, generating whatever voltage
is necessary - the way to protect is not to fight the voltage (you'll lose), but to allow the current to reduce
gradually.
Mark is correct and being much more detailed, it drains through diode being forward biased at 0.6-0.7v but I meant to say it blocks the emf spike and the bouncing that happens with inductive component - which can make your mosfet misbehave and may even damage. Mark please go into detail if I've oversimplified.
WattsThat:
Per your original post, the only way you get a true bistable relay is to buy one, you don’t make one. Another point is that pop up auto headlights do not use relays, they’re motorized and stay where they were last moved to, the same way a servo or stepper motor works. Using a relay implies current flow to hold the lights in one position which just drains the battery.
BTW, bare latching relays are available on eBay.au.
Just mind the low current these small relays can handle. For heavy 12 volt automotive loads, you use them as a pilot relay and pass the real power through an appropriately sized device.
If the car is running, power doesn't matter due to the alternator. If the car is off, a bistable relay would simply remember the last state without consuming power. There is already an existing circuit in the car that switches the lights up or down with a pushbutton and doesn't consume power to keep them up or down. I've used a 12V relay at the moment to act as the button, but I just need the relay to remember the connection even when the car is off and the arduino is off, hence my need for a bistable latching relay.
I have made some SPDT 12V relays with a mosfet, flyback diode and resistor and they work well for controlling various things but it won't work for the purpose I need it for in the headlight circuit.
This is just for the appearance of the lights lifting up or down, not the ACTUAL light bulbs of the car so I really just need something to replace that button that does all of this without using constant power.
And unfortunately I couldn't find the circuit for the headlight positions thats in the car already so I'm not entirely sure how it works. Effectively, you push the button in, the lights pop up and stay up and don't use power constantly to keep them held up. You push the button again to unlatch it (latching click button) and they go down.