SPST Relay Multi Power Source

Thread Starter

dingo

Joined Mar 11, 2011
60
I have a battery that powers an arduino and the arduino energizes a switch. Beside a bad design, is it harmful that the switch is being energized by the battery and an output from the arduino? Would this cause harm to the arduino?

Does it make a difference if I put a diode on the output of the arduino like in diagram #2?
 

Attachments

Thread Starter

dingo

Joined Mar 11, 2011
60
I should say that the relay could loose power from one or both of the sources at any given point. So the relay needs to be on with either battery, arduino or both.
 

Bernard

Joined Aug 7, 2008
5,784
The whole thing seem a bit strange; but at minimum, add another diode between + supply & relay, cathode toward relay.
 

Dodgydave

Joined Jun 22, 2012
11,302
Can you explain this diagram? I'm not exactly too sure of myself when reading it.
It's better to drive a relay with a Diode across the coil, to prevent back emf when you remove power to the relay, otherwise it will damage the Arduino or Transistor driving it.

It's standard practice to drive a relay with a buffer transistor.
 

jameshayliie

Joined Feb 14, 2020
3
These have two terminals that can be connected or disconnected. Including two for the coil, such a relay has four terminals in total. It is ambiguous whether the pole is normally open or normally closed. The terminology "SPNO" and "SPNC" is sometimes used to resolve the ambiguity. Put the Diode in Parallel with the Relay, Cathode to Positive supply. Last time I had purchased some electronics equipment from cplfpc.com and Greatpcb.
 

Tonyr1084

Joined Sep 24, 2015
7,899
This is what @Dodgydave is suggesting:
1589290369070.png
HOWEVER: Your relay will only be switched on when the Arduino commands it. That's not in keeping with your set requirements where the relay can be powered EITHER BY Arduino or battery. Since the battery is powering the Arduino - if you want alternative switching you'd need a switch from relay negative to battery negative - thus bypassing Q1.

Like this:
1589290692323.png
 
Top