Drive relay with any voltage

LesJones

Joined Jan 8, 2017
4,509
I will try asking for clarification a different way. Are you saying that the unit that detects the 24 to 120 volt AC or DC gived an output that is or behaves like a switch contact that connects the 5Volt relay supply to the relay coil ?

Les.
 

Thread Starter

Jenn85

Joined Mar 11, 2023
10
Okay, I'm about ready to give up.
One last try--
I know the relay has it's own power supply but there is a signal that turns it on (ignore the interface circuit), correct?
So , what is the voltage and current required for that signal?
Sorry for confusion, thank you for your patience.

5vdc, ~150ma

Crutchow is asking how the relay is currently being activated. He is referring to the control signal not the power supply or the relay itself. There might not be a control signal like with car door locks as the circuit is activated for a short time.

An easy solution is to use a peak detector circuit with a comparator and optocoupler. Voltage over the threshold will turn on the output. Use voltage dividers at the input to make sure IC's do not get damaged by overvoltage. Use an RC circuit or 555 timer to provide delay or lockout functions if desired. If you set up the voltage dividers properly, you will be able to trigger from a variety input voltages.

Peak detectors work by charging a capacitor to the supply voltage. Since capacitors don't pass DC, the highest voltage appearing on the line will be temporarily stored in the capacitor as a voltage available at the output. This voltage is then compared against the preset values provided by the voltage divider(s).
Thank you, will look into this!

I will try asking for clarification a different way. Are you saying that the unit that detects the 24 to 120 volt AC or DC gived an output that is or behaves like a switch contact that connects the 5Volt relay supply to the relay coil ?

Les.
Exactly, the unit detects the voltage and acts like a switch that connects the 5v supply to the coil.

TY all <3
 

BobTPH

Joined Jun 5, 2013
11,555
You can do it with a resistor and two Schottky diodes. Though this will not be isolated, which may or may not be a problem.

Connect a 47 K 1W resistor to the input.

The other side of the resistor is the signal out.

Connect one diode, anode to the out and cathode to +5V.

Connect another diode with cathode to the out and anode to ground.

Yes, the diodes appear to be reversed. That is because you want them to conduct when the input is negative or > 5V.

This will limit the output to -0.3V to +53V.
If the input is DC, the positive must go to the resistor and negative to ground. For AC, the connections don’t matter.

Edited to add: The above creates a signal. A MOSFET is still needed to switch the 5V to the relay. A logic level MOSFET will be happy with that signal.
 
Last edited:

LesJones

Joined Jan 8, 2017
4,509
Now that we have established your input requirement we need to know how much current the relay coil requires. (You can tell us the current, the coil wattage rating or the coil resistance.) Do we have access to both the + and - of the 5 volt relay supply ?
This is what I suggest. A bridge rectifier on the input followed by 2 of the constant current ICs that AK suggested in series . (2 are required as 120 volt RMS AC has a peak voltage of 170 volts.) That would feed the input of an opto isolator. The output from the opto isolator would drive a BJT or small mosfet which would switch the current to your relay coil.

Les.
 

Thread Starter

Jenn85

Joined Mar 11, 2023
10
You can do it with a resistor and two Schottky diodes. Though this will not be isolated, which may or may not be a problem.

Connect a 47 K 1W resistor to the input.

The other side of the resistor is the signal out.

Connect one diode, anode to the out and cathode to +5V.

Connect another diode with cathode to the out and anode to ground.

Yes, the diodes appear to be reversed. That is because you want them to conduct when the input is negative or > 5V.

This will limit the output to -0.3V to +53V.
If the input is DC, the positive must go to the resistor and negative to ground. For AC, the connections don’t matter.

Edited to add: The above creates a signal. A MOSFET is still needed to switch the 5V to the relay. A logic level MOSFET will be happy with that signal.
Thank you for this. But yes, the signal should be isolated as the signal source can be sensitive and I wouldn’t want to cause any unwanted interference. I should have specified that.

Now that we have established your input requirement we need to know how much current the relay coil requires. (You can tell us the current, the coil wattage rating or the coil resistance.) Do we have access to both the + and - of the 5 volt relay supply ?
This is what I suggest. A bridge rectifier on the input followed by 2 of the constant current ICs that AK suggested in series . (2 are required as 120 volt RMS AC has a peak voltage of 170 volts.) That would feed the input of an opto isolator. The output from the opto isolator would drive a BJT or small mosfet which would switch the current to your relay coil.

Les.
Thank you.

Yes we do have access to the + and -.

But also, the constant current IC’s require a common ground? Wouldn’t work with 2 different power sources?

Here is the basic idea. 2 different power sources, should be isolated as not to cause any unwanted interference with the signal source.


IMG_0108.jpeg
 
Last edited:

BobTPH

Joined Jun 5, 2013
11,555
should be isolated as not to cause any unwanted interference with the signal source.
It sounds like you do not want to draw significant current from the source, to avoid disturbing.

That is not what isolated means. Isolated means there is no electrical connection between the input and the output. The optocoupler approach accomplished that by using light to carry the signal across the boundary. it requires drawing enough current to light an LED.

The reason I expect you need isolation is that the circuitry on the board must not be at mains potential since that is dangerous to anyone who might touch it. This assumes that when the input is at 120V AC it comes from the mains.
 

crutschow

Joined Mar 14, 2008
38,537
Below is the lTspice sim of a circuit using an opto isolator which should do what you want.
It uses a Darlington output opto which has a high transfer-gain, driving a MOSFET to minimize the required input current and power.

The sim shows the relay (bottom traces) turning on for both a 24Vac input (green trace) and a 120Vac input (yellow trace).
The maximum input is 2mA rms.

1698336260207.png
 
Last edited:

Thread Starter

Jenn85

Joined Mar 11, 2023
10
It sounds like you do not want to draw significant current from the source, to avoid disturbing.

That is not what isolated means. Isolated means there is no electrical connection between the input and the output. The optocoupler approach accomplished that by using light to carry the signal across the boundary. it requires drawing enough current to light an LED.

The reason I expect you need isolation is that the circuitry on the board must not be at mains potential since that is dangerous to anyone who might touch it. This assumes that when the input is at 120V AC it comes from the mains.

Below is the lTspice sim of a circuit using an opto isolator which should do what you want.
It uses a Darlington output opto which has a high transfer-gain, driving a MOSFET to minimize the required input current and power.

The sim shows the relay (bottom traces) turning on for both a 24Vac input (green trace) and a 120Vac input (yellow trace).
The maximum input is 2mA rms.

View attachment 305950

If you want to try the CLD approach, here is a schematic.
The upper traces show sim at 24v
The lower traces show sim at 120v

View attachment 305964

View attachment 305965
Hey everyone! Terribly sorry for late reply, hectic week at work.

And thank you all, especially you three, didn’t expect such big help! Hopefully one of these approaches works out, which I’m sure it will.

If any of you take donations pls reply I would love go buy you a cup of coffee at the least.

All the best!!
 
Top